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

Unified Diff: src/compiler/js-generic-lowering.cc

Issue 1480003002: [runtime] Replace global object link with native context link in all contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add patch from Orion for interpreter cementation test. Disable obsolete/invalid tests. Created 5 years, 1 month 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/compiler/js-call-reducer.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 =
« no previous file with comments | « src/compiler/js-call-reducer.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698