Index: src/interpreter/bytecodes.cc |
diff --git a/src/interpreter/bytecodes.cc b/src/interpreter/bytecodes.cc |
index 86964c7e6f9274a2122e71027d695a464f012df1..74b8904b29f91872d3c62001984ce6ba1c5bad47 100644 |
--- a/src/interpreter/bytecodes.cc |
+++ b/src/interpreter/bytecodes.cc |
@@ -228,6 +228,8 @@ std::ostream& Bytecodes::Decode(std::ostream& os, const uint8_t* bytecode_start, |
os << "<context>"; |
} else if (reg.is_function_closure()) { |
os << "<closure>"; |
+ } else if (reg.is_new_target()) { |
+ os << "<new.target>"; |
} else if (reg.is_parameter()) { |
int parameter_index = reg.ToParameterIndex(parameter_count); |
if (parameter_index == 0) { |
@@ -273,6 +275,8 @@ static const int kFunctionClosureRegisterIndex = |
-InterpreterFrameConstants::kFunctionFromRegisterPointer / kPointerSize; |
static const int kFunctionContextRegisterIndex = |
-InterpreterFrameConstants::kContextFromRegisterPointer / kPointerSize; |
+static const int kNewTargetRegisterIndex = |
+ -InterpreterFrameConstants::kNewTargetFromRegisterPointer / kPointerSize; |
// Registers occupy range 0-127 in 8-bit value leaving 128 unused values. |
@@ -318,6 +322,14 @@ bool Register::is_function_context() const { |
} |
+Register Register::new_target() { return Register(kNewTargetRegisterIndex); } |
+ |
+ |
+bool Register::is_new_target() const { |
+ return index() == kNewTargetRegisterIndex; |
+} |
+ |
+ |
int Register::MaxParameterIndex() { return kMaxParameterIndex; } |