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

Unified Diff: src/code-stubs-hydrogen.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/bootstrapper.cc ('k') | src/compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index dae884ac2214e3c2423aa1c80a23f7b94051f014..e4f75a4e0f2377bf69ed7c1f404c63141b3ab443 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -2137,14 +2137,13 @@ HValue* CodeStubGraphBuilder<FastNewContextStub>::BuildCodeStub() {
HObjectAccess::ForContextSlot(Context::EXTENSION_INDEX),
graph()->GetConstant0());
- // Copy the global object from the previous context.
- HValue* global_object = Add<HLoadNamedField>(
+ // Copy the native context from the previous context.
+ HValue* native_context = Add<HLoadNamedField>(
context(), nullptr,
- HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX));
- Add<HStoreNamedField>(function_context,
- HObjectAccess::ForContextSlot(
- Context::GLOBAL_OBJECT_INDEX),
- global_object);
+ HObjectAccess::ForContextSlot(Context::NATIVE_CONTEXT_INDEX));
+ Add<HStoreNamedField>(function_context, HObjectAccess::ForContextSlot(
+ Context::NATIVE_CONTEXT_INDEX),
+ native_context);
// Initialize the rest of the slots to undefined.
for (int i = Context::MIN_CONTEXT_SLOTS; i < length; ++i) {
« no previous file with comments | « src/bootstrapper.cc ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698