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); |
} |