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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/field-index.h" | 9 #include "src/field-index.h" |
10 #include "src/hydrogen.h" | 10 #include "src/hydrogen.h" |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 } | 571 } |
572 | 572 |
573 | 573 |
574 Handle<Code> StoreScriptContextFieldStub::GenerateCode() { | 574 Handle<Code> StoreScriptContextFieldStub::GenerateCode() { |
575 return DoGenerateCode(this); | 575 return DoGenerateCode(this); |
576 } | 576 } |
577 | 577 |
578 | 578 |
579 template <> | 579 template <> |
580 HValue* CodeStubGraphBuilder<GrowArrayElementsStub>::BuildCodeStub() { | 580 HValue* CodeStubGraphBuilder<GrowArrayElementsStub>::BuildCodeStub() { |
| 581 ElementsKind kind = casted_stub()->elements_kind(); |
| 582 if (IsFastDoubleElementsKind(kind)) { |
| 583 info()->MarkAsSavesCallerDoubles(); |
| 584 } |
| 585 |
581 HValue* object = GetParameter(GrowArrayElementsDescriptor::kObjectIndex); | 586 HValue* object = GetParameter(GrowArrayElementsDescriptor::kObjectIndex); |
582 HValue* key = GetParameter(GrowArrayElementsDescriptor::kKeyIndex); | 587 HValue* key = GetParameter(GrowArrayElementsDescriptor::kKeyIndex); |
583 HValue* current_capacity = | 588 HValue* current_capacity = |
584 GetParameter(GrowArrayElementsDescriptor::kCapacityIndex); | 589 GetParameter(GrowArrayElementsDescriptor::kCapacityIndex); |
585 ElementsKind kind = casted_stub()->elements_kind(); | |
586 | 590 |
587 HValue* elements = AddLoadElements(object); | 591 HValue* elements = AddLoadElements(object); |
588 HValue* length = | 592 HValue* length = |
589 casted_stub()->is_js_array() | 593 casted_stub()->is_js_array() |
590 ? Add<HLoadNamedField>(object, static_cast<HValue*>(NULL), | 594 ? Add<HLoadNamedField>(object, static_cast<HValue*>(NULL), |
591 HObjectAccess::ForArrayLength(kind)) | 595 HObjectAccess::ForArrayLength(kind)) |
592 : current_capacity; | 596 : current_capacity; |
593 | 597 |
594 return BuildCheckAndGrowElementsCapacity(object, elements, kind, length, | 598 return BuildCheckAndGrowElementsCapacity(object, elements, kind, length, |
595 current_capacity, key); | 599 current_capacity, key); |
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2108 // need. | 2112 // need. |
2109 info()->MarkMustNotHaveEagerFrame(); | 2113 info()->MarkMustNotHaveEagerFrame(); |
2110 | 2114 |
2111 // Probe the stub cache. | 2115 // Probe the stub cache. |
2112 Add<HTailCallThroughMegamorphicCache>(receiver, name); | 2116 Add<HTailCallThroughMegamorphicCache>(receiver, name); |
2113 | 2117 |
2114 // We never continue. | 2118 // We never continue. |
2115 return graph()->GetConstant0(); | 2119 return graph()->GetConstant0(); |
2116 } | 2120 } |
2117 } } // namespace v8::internal | 2121 } } // namespace v8::internal |
OLD | NEW |