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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 | 460 |
461 | 461 |
462 template <> | 462 template <> |
463 HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { | 463 HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { |
464 Factory* factory = isolate()->factory(); | 464 Factory* factory = isolate()->factory(); |
465 HValue* undefined = graph()->GetConstantUndefined(); | 465 HValue* undefined = graph()->GetConstantUndefined(); |
466 AllocationSiteMode alloc_site_mode = casted_stub()->allocation_site_mode(); | 466 AllocationSiteMode alloc_site_mode = casted_stub()->allocation_site_mode(); |
467 HValue* closure = GetParameter(0); | 467 HValue* closure = GetParameter(0); |
468 HValue* literal_index = GetParameter(1); | 468 HValue* literal_index = GetParameter(1); |
469 | 469 |
| 470 // TODO(turbofan): This codestub has regressed to need a frame on ia32 at some |
| 471 // point and wasn't caught since it wasn't built in the snapshot. We should |
| 472 // probably just replace with a TurboFan stub rather than fixing it. |
| 473 #if !V8_TARGET_ARCH_IA32 |
470 // This stub is very performance sensitive, the generated code must be tuned | 474 // This stub is very performance sensitive, the generated code must be tuned |
471 // so that it doesn't build and eager frame. | 475 // so that it doesn't build and eager frame. |
472 info()->MarkMustNotHaveEagerFrame(); | 476 info()->MarkMustNotHaveEagerFrame(); |
| 477 #endif |
473 | 478 |
474 HValue* literals_array = Add<HLoadNamedField>( | 479 HValue* literals_array = Add<HLoadNamedField>( |
475 closure, nullptr, HObjectAccess::ForLiteralsPointer()); | 480 closure, nullptr, HObjectAccess::ForLiteralsPointer()); |
476 | 481 |
477 HInstruction* allocation_site = Add<HLoadKeyed>( | 482 HInstruction* allocation_site = Add<HLoadKeyed>( |
478 literals_array, literal_index, nullptr, nullptr, FAST_ELEMENTS, | 483 literals_array, literal_index, nullptr, nullptr, FAST_ELEMENTS, |
479 NEVER_RETURN_HOLE, LiteralsArray::kOffsetToFirstLiteral - kHeapObjectTag); | 484 NEVER_RETURN_HOLE, LiteralsArray::kOffsetToFirstLiteral - kHeapObjectTag); |
480 IfBuilder checker(this); | 485 IfBuilder checker(this); |
481 checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site, | 486 checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site, |
482 undefined); | 487 undefined); |
(...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2054 } | 2059 } |
2055 | 2060 |
2056 | 2061 |
2057 template<> | 2062 template<> |
2058 HValue* CodeStubGraphBuilder<RegExpConstructResultStub>::BuildCodeStub() { | 2063 HValue* CodeStubGraphBuilder<RegExpConstructResultStub>::BuildCodeStub() { |
2059 // Determine the parameters. | 2064 // Determine the parameters. |
2060 HValue* length = GetParameter(RegExpConstructResultStub::kLength); | 2065 HValue* length = GetParameter(RegExpConstructResultStub::kLength); |
2061 HValue* index = GetParameter(RegExpConstructResultStub::kIndex); | 2066 HValue* index = GetParameter(RegExpConstructResultStub::kIndex); |
2062 HValue* input = GetParameter(RegExpConstructResultStub::kInput); | 2067 HValue* input = GetParameter(RegExpConstructResultStub::kInput); |
2063 | 2068 |
| 2069 // TODO(turbofan): This codestub has regressed to need a frame on ia32 at some |
| 2070 // point and wasn't caught since it wasn't built in the snapshot. We should |
| 2071 // probably just replace with a TurboFan stub rather than fixing it. |
| 2072 #if !V8_TARGET_ARCH_IA32 |
2064 info()->MarkMustNotHaveEagerFrame(); | 2073 info()->MarkMustNotHaveEagerFrame(); |
| 2074 #endif |
2065 | 2075 |
2066 return BuildRegExpConstructResult(length, index, input); | 2076 return BuildRegExpConstructResult(length, index, input); |
2067 } | 2077 } |
2068 | 2078 |
2069 | 2079 |
2070 Handle<Code> RegExpConstructResultStub::GenerateCode() { | 2080 Handle<Code> RegExpConstructResultStub::GenerateCode() { |
2071 return DoGenerateCode(this); | 2081 return DoGenerateCode(this); |
2072 } | 2082 } |
2073 | 2083 |
2074 | 2084 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2312 return Pop(); | 2322 return Pop(); |
2313 } | 2323 } |
2314 | 2324 |
2315 | 2325 |
2316 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2326 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
2317 return DoGenerateCode(this); | 2327 return DoGenerateCode(this); |
2318 } | 2328 } |
2319 | 2329 |
2320 } // namespace internal | 2330 } // namespace internal |
2321 } // namespace v8 | 2331 } // namespace v8 |
OLD | NEW |