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

Unified Diff: src/compiler/bytecode-graph-builder.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/bytecode-graph-builder.h ('k') | src/compiler/js-call-reducer.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 47a22df239854b4ef2568736d4c8bcaa87a2a32a..aca372689b845ca099564d0f42fb9b014298db9b 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -148,17 +148,10 @@ Node* BytecodeGraphBuilder::BuildLoadImmutableObjectField(Node* object,
}
-Node* BytecodeGraphBuilder::BuildLoadGlobalObject() {
- const Operator* load_op =
- javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true);
- return NewNode(load_op, GetFunctionContext());
-}
-
-
Node* BytecodeGraphBuilder::BuildLoadNativeContextField(int index) {
- Node* global = BuildLoadGlobalObject();
- Node* native_context =
- BuildLoadObjectField(global, JSGlobalObject::kNativeContextOffset);
+ const Operator* op =
+ javascript()->LoadContext(0, Context::NATIVE_CONTEXT_INDEX, true);
+ Node* native_context = NewNode(op, environment()->Context());
return NewNode(javascript()->LoadContext(0, index, true), native_context);
}
« no previous file with comments | « src/compiler/bytecode-graph-builder.h ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698