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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 1484723003: [runtime] Use "the hole" instead of smi 0 as sentinel for context extension. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. 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 | « no previous file | src/compiler/ast-graph-builder.cc » ('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 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 2128
2129 // Set up the fixed slots. 2129 // Set up the fixed slots.
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()->GetConstantHole());
2139 2139
2140 // Copy the native context from the previous context. 2140 // Copy the native context from the previous context.
2141 HValue* native_context = Add<HLoadNamedField>( 2141 HValue* native_context = Add<HLoadNamedField>(
2142 context(), nullptr, 2142 context(), nullptr,
2143 HObjectAccess::ForContextSlot(Context::NATIVE_CONTEXT_INDEX)); 2143 HObjectAccess::ForContextSlot(Context::NATIVE_CONTEXT_INDEX));
2144 Add<HStoreNamedField>(function_context, HObjectAccess::ForContextSlot( 2144 Add<HStoreNamedField>(function_context, HObjectAccess::ForContextSlot(
2145 Context::NATIVE_CONTEXT_INDEX), 2145 Context::NATIVE_CONTEXT_INDEX),
2146 native_context); 2146 native_context);
2147 2147
2148 // Initialize the rest of the slots to undefined. 2148 // Initialize the rest of the slots to undefined.
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 return Pop(); 2444 return Pop();
2445 } 2445 }
2446 2446
2447 2447
2448 Handle<Code> KeyedLoadGenericStub::GenerateCode() { 2448 Handle<Code> KeyedLoadGenericStub::GenerateCode() {
2449 return DoGenerateCode(this); 2449 return DoGenerateCode(this);
2450 } 2450 }
2451 2451
2452 } // namespace internal 2452 } // namespace internal
2453 } // namespace v8 2453 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698