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

Side by Side 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 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 unified diff | Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/compiler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include "src/bailout-reason.h" 7 #include "src/bailout-reason.h"
8 #include "src/crankshaft/hydrogen.h" 8 #include "src/crankshaft/hydrogen.h"
9 #include "src/crankshaft/lithium.h" 9 #include "src/crankshaft/lithium.h"
10 #include "src/field-index.h" 10 #include "src/field-index.h"
(...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2130 Add<HStoreNamedField>(function_context, 2130 Add<HStoreNamedField>(function_context,
2131 HObjectAccess::ForContextSlot(Context::CLOSURE_INDEX), 2131 HObjectAccess::ForContextSlot(Context::CLOSURE_INDEX),
2132 function); 2132 function);
2133 Add<HStoreNamedField>(function_context, 2133 Add<HStoreNamedField>(function_context,
2134 HObjectAccess::ForContextSlot(Context::PREVIOUS_INDEX), 2134 HObjectAccess::ForContextSlot(Context::PREVIOUS_INDEX),
2135 context()); 2135 context());
2136 Add<HStoreNamedField>(function_context, 2136 Add<HStoreNamedField>(function_context,
2137 HObjectAccess::ForContextSlot(Context::EXTENSION_INDEX), 2137 HObjectAccess::ForContextSlot(Context::EXTENSION_INDEX),
2138 graph()->GetConstant0()); 2138 graph()->GetConstant0());
2139 2139
2140 // Copy the global object from the previous context. 2140 // Copy the native context from the previous context.
2141 HValue* global_object = Add<HLoadNamedField>( 2141 HValue* native_context = Add<HLoadNamedField>(
2142 context(), nullptr, 2142 context(), nullptr,
2143 HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); 2143 HObjectAccess::ForContextSlot(Context::NATIVE_CONTEXT_INDEX));
2144 Add<HStoreNamedField>(function_context, 2144 Add<HStoreNamedField>(function_context, HObjectAccess::ForContextSlot(
2145 HObjectAccess::ForContextSlot( 2145 Context::NATIVE_CONTEXT_INDEX),
2146 Context::GLOBAL_OBJECT_INDEX), 2146 native_context);
2147 global_object);
2148 2147
2149 // Initialize the rest of the slots to undefined. 2148 // Initialize the rest of the slots to undefined.
2150 for (int i = Context::MIN_CONTEXT_SLOTS; i < length; ++i) { 2149 for (int i = Context::MIN_CONTEXT_SLOTS; i < length; ++i) {
2151 Add<HStoreNamedField>(function_context, 2150 Add<HStoreNamedField>(function_context,
2152 HObjectAccess::ForContextSlot(i), 2151 HObjectAccess::ForContextSlot(i),
2153 graph()->GetConstantUndefined()); 2152 graph()->GetConstantUndefined());
2154 } 2153 }
2155 2154
2156 return function_context; 2155 return function_context;
2157 } 2156 }
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
2445 return Pop(); 2444 return Pop();
2446 } 2445 }
2447 2446
2448 2447
2449 Handle<Code> KeyedLoadGenericStub::GenerateCode() { 2448 Handle<Code> KeyedLoadGenericStub::GenerateCode() {
2450 return DoGenerateCode(this); 2449 return DoGenerateCode(this);
2451 } 2450 }
2452 2451
2453 } // namespace internal 2452 } // namespace internal
2454 } // namespace v8 2453 } // namespace v8
OLDNEW
« 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