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

Unified Diff: src/compiler/bytecode-graph-builder.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/arm64/builtins-arm64.cc ('k') | src/compiler/interpreter-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 920f00a830184ba171034eb23c46eb368c8eb7cf..fdbba747efae05390b71a9c6fc4de41ed2c68c92 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -155,8 +155,8 @@ Node* BytecodeGraphBuilder::Environment::LookupAccumulator() const {
Node* BytecodeGraphBuilder::Environment::LookupRegister(
interpreter::Register the_register) const {
- if (the_register.is_function_context()) {
- return builder()->GetFunctionContext();
+ if (the_register.is_current_context()) {
+ return Context();
} else if (the_register.is_function_closure()) {
return builder()->GetFunctionClosure();
} else if (the_register.is_new_target()) {
@@ -1034,9 +1034,10 @@ void BytecodeGraphBuilder::VisitKeyedStoreICStrictWide(
void BytecodeGraphBuilder::VisitPushContext(
const interpreter::BytecodeArrayIterator& iterator) {
- Node* context = environment()->LookupAccumulator();
- environment()->BindRegister(iterator.GetRegisterOperand(0), context);
- environment()->SetContext(context);
+ Node* new_context = environment()->LookupAccumulator();
+ environment()->BindRegister(iterator.GetRegisterOperand(0),
+ environment()->Context());
+ environment()->SetContext(new_context);
}
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/compiler/interpreter-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698