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

Unified Diff: src/interpreter/interpreter.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/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 ef7735e38ccbe00521091c3aee72ba62366b7b86..48b0f3ad12e74b18edb18e48621dce2e9911ad76 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -216,7 +216,9 @@ void Interpreter::DoLoadGlobal(Callable ic,
compiler::InterpreterAssembler* assembler) {
// Get the global object.
Node* context = __ GetContext();
- Node* global = __ LoadContextSlot(context, Context::GLOBAL_OBJECT_INDEX);
+ Node* native_context =
+ __ LoadContextSlot(context, Context::NATIVE_CONTEXT_INDEX);
+ Node* global = __ LoadContextSlot(native_context, Context::EXTENSION_INDEX);
// Load the global via the LoadIC.
Node* code_target = __ HeapConstant(ic.code());
@@ -330,7 +332,9 @@ void Interpreter::DoStoreGlobal(Callable ic,
compiler::InterpreterAssembler* assembler) {
// Get the global object.
Node* context = __ GetContext();
- Node* global = __ LoadContextSlot(context, Context::GLOBAL_OBJECT_INDEX);
+ Node* native_context =
+ __ LoadContextSlot(context, Context::NATIVE_CONTEXT_INDEX);
+ Node* global = __ LoadContextSlot(native_context, Context::EXTENSION_INDEX);
// Store the global via the StoreIC.
Node* code_target = __ HeapConstant(ic.code());
@@ -952,9 +956,8 @@ void Interpreter::DoCallJSRuntime(compiler::InterpreterAssembler* assembler) {
// Get the function to call from the native context.
Node* context = __ GetContext();
- Node* global = __ LoadContextSlot(context, Context::GLOBAL_OBJECT_INDEX);
Node* native_context =
- __ LoadObjectField(global, JSGlobalObject::kNativeContextOffset);
+ __ LoadContextSlot(context, Context::NATIVE_CONTEXT_INDEX);
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