summaryrefslogtreecommitdiff
path: root/deps/v8/src/interpreter/bytecode-register.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/interpreter/bytecode-register.cc')
-rw-r--r--deps/v8/src/interpreter/bytecode-register.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/deps/v8/src/interpreter/bytecode-register.cc b/deps/v8/src/interpreter/bytecode-register.cc
index e8eb347f16..5266f693d2 100644
--- a/deps/v8/src/interpreter/bytecode-register.cc
+++ b/deps/v8/src/interpreter/bytecode-register.cc
@@ -32,6 +32,10 @@ static const int kCallerPCOffsetRegisterIndex =
(InterpreterFrameConstants::kRegisterFileFromFp -
InterpreterFrameConstants::kCallerPCOffset) /
kSystemPointerSize;
+static const int kArgumentCountRegisterIndex =
+ (InterpreterFrameConstants::kRegisterFileFromFp -
+ InterpreterFrameConstants::kArgCOffset) /
+ kSystemPointerSize;
Register Register::FromParameterIndex(int index, int parameter_count) {
DCHECK_GE(index, 0);
@@ -83,6 +87,11 @@ Register Register::virtual_accumulator() {
return Register(kCallerPCOffsetRegisterIndex);
}
+// static
+Register Register::argument_count() {
+ return Register(kArgumentCountRegisterIndex);
+}
+
OperandSize Register::SizeOfOperand() const {
int32_t operand = ToOperand();
if (operand >= kMinInt8 && operand <= kMaxInt8) {