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

Unified Diff: src/interpreter/interpreter.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.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 160ce06f5f89e10d8f19d9ec938aae89c7229e37..38150c515c7fd441e6cc0049a830ddf5d4a1a056 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -816,12 +816,14 @@ void Interpreter::DoKeyedStoreICStrictWide(
// PushContext <context>
//
-// Pushes the accumulator as the current context, and saves it in <context>
+// Saves the current context in <context>, and pushes the accumulator as the
+// new current context.
void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) {
Node* reg_index = __ BytecodeOperandReg(0);
- Node* context = __ GetAccumulator();
- __ SetContext(context);
- __ StoreRegister(context, reg_index);
+ Node* new_context = __ GetAccumulator();
+ Node* old_context = __ GetContext();
+ __ StoreRegister(old_context, reg_index);
+ __ SetContext(new_context);
__ Dispatch();
}
« no previous file with comments | « src/interpreter/bytecodes.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698