Index: src/interpreter/bytecodes.cc |
diff --git a/src/interpreter/bytecodes.cc b/src/interpreter/bytecodes.cc |
index 18c0a43e849da0460d2f8af682f4fa9e72182002..467612325dd86f0c34e508429f83e8fbd14942ba 100644 |
--- a/src/interpreter/bytecodes.cc |
+++ b/src/interpreter/bytecodes.cc |
@@ -218,6 +218,8 @@ std::ostream& operator<<(std::ostream& os, const OperandType& operand_type) { |
static const int kLastParamRegisterIndex = |
-InterpreterFrameConstants::kLastParamFromRegisterPointer / kPointerSize; |
+static const int kFunctionContextRegisterIndex = |
+ -InterpreterFrameConstants::kContextFromRegisterPointer / kPointerSize; |
// Registers occupy range 0-127 in 8-bit value leaving 128 unused values. |
@@ -243,6 +245,16 @@ int Register::ToParameterIndex(int parameter_count) const { |
} |
+Register Register::function_context() { |
+ return Register(kFunctionContextRegisterIndex); |
+} |
+ |
+ |
+bool Register::is_function_context() const { |
+ return index() == kFunctionContextRegisterIndex; |
+} |
+ |
+ |
int Register::MaxParameterIndex() { return kMaxParameterIndex; } |