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

Unified Diff: src/interpreter/interpreter.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/interpreter/bytecode-generator.cc ('k') | src/isolate-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 48b0f3ad12e74b18edb18e48621dce2e9911ad76..ef7735e38ccbe00521091c3aee72ba62366b7b86 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -216,9 +216,7 @@
compiler::InterpreterAssembler* assembler) {
// Get the global object.
Node* context = __ GetContext();
- Node* native_context =
- __ LoadContextSlot(context, Context::NATIVE_CONTEXT_INDEX);
- Node* global = __ LoadContextSlot(native_context, Context::EXTENSION_INDEX);
+ Node* global = __ LoadContextSlot(context, Context::GLOBAL_OBJECT_INDEX);
// Load the global via the LoadIC.
Node* code_target = __ HeapConstant(ic.code());
@@ -332,9 +330,7 @@
compiler::InterpreterAssembler* assembler) {
// Get the global object.
Node* context = __ GetContext();
- Node* native_context =
- __ LoadContextSlot(context, Context::NATIVE_CONTEXT_INDEX);
- Node* global = __ LoadContextSlot(native_context, Context::EXTENSION_INDEX);
+ Node* global = __ LoadContextSlot(context, Context::GLOBAL_OBJECT_INDEX);
// Store the global via the StoreIC.
Node* code_target = __ HeapConstant(ic.code());
@@ -956,8 +952,9 @@
// Get the function to call from the native context.
Node* context = __ GetContext();
+ Node* global = __ LoadContextSlot(context, Context::GLOBAL_OBJECT_INDEX);
Node* native_context =
- __ LoadContextSlot(context, Context::NATIVE_CONTEXT_INDEX);
+ __ LoadObjectField(global, JSGlobalObject::kNativeContextOffset);
Node* function = __ LoadContextSlot(native_context, context_index);
// Call the function.
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/isolate-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698