| Index: src/compiler/js-generic-lowering.cc
|
| diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
|
| index aa70f5279a851d9bb29490bd850b75bc85739a5e..ba3f2631d0e7b5e402947562e18a304a26ff5b27 100644
|
| --- a/src/compiler/js-generic-lowering.cc
|
| +++ b/src/compiler/js-generic-lowering.cc
|
| @@ -314,10 +314,15 @@ void JSGenericLowering::LowerJSLoadGlobal(Node* node) {
|
| Callable callable = CodeFactory::LoadICInOptimizedCode(
|
| isolate(), p.typeof_mode(), SLOPPY, UNINITIALIZED);
|
| // Load global object from the context.
|
| - Node* global = graph()->NewNode(machine()->Load(kMachAnyTagged), context,
|
| - jsgraph()->IntPtrConstant(Context::SlotOffset(
|
| - Context::GLOBAL_OBJECT_INDEX)),
|
| - effect, graph()->start());
|
| + Node* native_context =
|
| + graph()->NewNode(machine()->Load(kMachAnyTagged), context,
|
| + jsgraph()->IntPtrConstant(
|
| + Context::SlotOffset(Context::NATIVE_CONTEXT_INDEX)),
|
| + effect, graph()->start());
|
| + Node* global = graph()->NewNode(
|
| + machine()->Load(kMachAnyTagged), native_context,
|
| + jsgraph()->IntPtrConstant(Context::SlotOffset(Context::EXTENSION_INDEX)),
|
| + effect, graph()->start());
|
| node->InsertInput(zone(), 0, global);
|
| node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
|
| node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
|
| @@ -359,10 +364,15 @@ void JSGenericLowering::LowerJSStoreGlobal(Node* node) {
|
| Callable callable = CodeFactory::StoreICInOptimizedCode(
|
| isolate(), p.language_mode(), UNINITIALIZED);
|
| // Load global object from the context.
|
| - Node* global = graph()->NewNode(machine()->Load(kMachAnyTagged), context,
|
| - jsgraph()->IntPtrConstant(Context::SlotOffset(
|
| - Context::GLOBAL_OBJECT_INDEX)),
|
| - effect, graph()->start());
|
| + Node* native_context =
|
| + graph()->NewNode(machine()->Load(kMachAnyTagged), context,
|
| + jsgraph()->IntPtrConstant(
|
| + Context::SlotOffset(Context::NATIVE_CONTEXT_INDEX)),
|
| + effect, graph()->start());
|
| + Node* global = graph()->NewNode(
|
| + machine()->Load(kMachAnyTagged), native_context,
|
| + jsgraph()->IntPtrConstant(Context::SlotOffset(Context::EXTENSION_INDEX)),
|
| + effect, graph()->start());
|
| node->InsertInput(zone(), 0, global);
|
| node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
|
| DCHECK(p.feedback().index() != -1);
|
| @@ -429,15 +439,6 @@ void JSGenericLowering::LowerJSStoreContext(Node* node) {
|
| }
|
|
|
|
|
| -void JSGenericLowering::LowerJSLoadNativeContext(Node* node) {
|
| - node->ReplaceInput(
|
| - 1, jsgraph()->IntPtrConstant(JSGlobalObject::kNativeContextOffset -
|
| - kHeapObjectTag));
|
| - node->AppendInput(zone(), graph()->start());
|
| - NodeProperties::ChangeOp(node, machine()->Load(kMachAnyTagged));
|
| -}
|
| -
|
| -
|
| void JSGenericLowering::LowerJSLoadDynamic(Node* node) {
|
| const DynamicAccess& access = DynamicAccessOf(node->op());
|
| Runtime::FunctionId function_id =
|
|
|