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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1478303002: Revert of [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: 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.h ('k') | src/compiler/bytecode-graph-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index a6cbfddfe4dae09748db199793b0cee28939b230..8f748ccd59fa651a4e6a674274a603729b7c563f 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -3649,14 +3649,15 @@
Node* AstGraphBuilder::BuildLoadGlobalObject() {
- return BuildLoadNativeContextField(Context::EXTENSION_INDEX);
+ const Operator* load_op =
+ javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true);
+ return NewNode(load_op, GetFunctionContext());
}
Node* AstGraphBuilder::BuildLoadNativeContextField(int index) {
- const Operator* op =
- javascript()->LoadContext(0, Context::NATIVE_CONTEXT_INDEX, true);
- Node* native_context = NewNode(op, current_context());
+ Node* global = BuildLoadGlobalObject();
+ Node* native_context = NewNode(javascript()->LoadNativeContext(), global);
return NewNode(javascript()->LoadContext(0, index, true), native_context);
}
« no previous file with comments | « src/compiler.h ('k') | src/compiler/bytecode-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698