Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1163)

Unified Diff: src/interpreter/bytecodes.cc

Issue 1604923002: [Interpreter] Always store current context in the frames context slot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_fix_block_context_scope
Patch Set: Rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecodes.cc
diff --git a/src/interpreter/bytecodes.cc b/src/interpreter/bytecodes.cc
index 983bf9b3430dd82f2bd88a2b57e1b78db3a01243..4d4d6d603bfdf9499af19d6f6ff999bcbd1c73ca 100644
--- a/src/interpreter/bytecodes.cc
+++ b/src/interpreter/bytecodes.cc
@@ -294,7 +294,7 @@ std::ostream& Bytecodes::Decode(std::ostream& os, const uint8_t* bytecode_start,
case interpreter::OperandType::kReg8:
case interpreter::OperandType::kReg16: {
Register reg = DecodeRegister(operand_start, op_type);
- if (reg.is_function_context()) {
+ if (reg.is_current_context()) {
os << "<context>";
} else if (reg.is_function_closure()) {
os << "<closure>";
@@ -358,7 +358,7 @@ static const int kLastParamRegisterIndex =
-InterpreterFrameConstants::kLastParamFromRegisterPointer / kPointerSize;
static const int kFunctionClosureRegisterIndex =
-InterpreterFrameConstants::kFunctionFromRegisterPointer / kPointerSize;
-static const int kFunctionContextRegisterIndex =
+static const int kCurrentContextRegisterIndex =
-InterpreterFrameConstants::kContextFromRegisterPointer / kPointerSize;
static const int kNewTargetRegisterIndex =
-InterpreterFrameConstants::kNewTargetFromRegisterPointer / kPointerSize;
@@ -397,13 +397,13 @@ bool Register::is_function_closure() const {
}
-Register Register::function_context() {
- return Register(kFunctionContextRegisterIndex);
+Register Register::current_context() {
+ return Register(kCurrentContextRegisterIndex);
}
-bool Register::is_function_context() const {
- return index() == kFunctionContextRegisterIndex;
+bool Register::is_current_context() const {
+ return index() == kCurrentContextRegisterIndex;
}
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698