OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |