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 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 casted_stub()->is_js_array()); | 1282 casted_stub()->is_js_array()); |
1283 | 1283 |
1284 return GetParameter(0); | 1284 return GetParameter(0); |
1285 } | 1285 } |
1286 | 1286 |
1287 | 1287 |
1288 Handle<Code> TransitionElementsKindStub::GenerateCode() { | 1288 Handle<Code> TransitionElementsKindStub::GenerateCode() { |
1289 return DoGenerateCode(this); | 1289 return DoGenerateCode(this); |
1290 } | 1290 } |
1291 | 1291 |
1292 template <> | |
1293 HValue* CodeStubGraphBuilder<AllocateStub>::BuildCodeStub() { | |
1294 HValue* result = | |
1295 Add<HAllocate>(GetParameter(0), HType::Tagged(), | |
1296 casted_stub()->pretenure_flag(), JS_OBJECT_TYPE); | |
1297 return result; | |
1298 } | |
1299 | |
1300 Handle<Code> AllocateStub::GenerateCode() { return DoGenerateCode(this); } | |
1301 | |
1302 HValue* CodeStubGraphBuilderBase::BuildArrayConstructor( | 1292 HValue* CodeStubGraphBuilderBase::BuildArrayConstructor( |
1303 ElementsKind kind, | 1293 ElementsKind kind, |
1304 AllocationSiteOverrideMode override_mode, | 1294 AllocationSiteOverrideMode override_mode, |
1305 ArgumentClass argument_class) { | 1295 ArgumentClass argument_class) { |
1306 HValue* constructor = GetParameter(ArrayConstructorStubBase::kConstructor); | 1296 HValue* constructor = GetParameter(ArrayConstructorStubBase::kConstructor); |
1307 HValue* alloc_site = GetParameter(ArrayConstructorStubBase::kAllocationSite); | 1297 HValue* alloc_site = GetParameter(ArrayConstructorStubBase::kAllocationSite); |
1308 JSArrayBuilder array_builder(this, kind, alloc_site, constructor, | 1298 JSArrayBuilder array_builder(this, kind, alloc_site, constructor, |
1309 override_mode); | 1299 override_mode); |
1310 HValue* result = NULL; | 1300 HValue* result = NULL; |
1311 switch (argument_class) { | 1301 switch (argument_class) { |
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2292 return Pop(); | 2282 return Pop(); |
2293 } | 2283 } |
2294 | 2284 |
2295 | 2285 |
2296 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2286 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
2297 return DoGenerateCode(this); | 2287 return DoGenerateCode(this); |
2298 } | 2288 } |
2299 | 2289 |
2300 } // namespace internal | 2290 } // namespace internal |
2301 } // namespace v8 | 2291 } // namespace v8 |
OLD | NEW |