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<LoadFastElementStub>::BuildCodeStub() { | 580 HValue* CodeStubGraphBuilder<LoadFastElementStub>::BuildCodeStub() { |
| 581 LoadKeyedHoleMode hole_mode = casted_stub()->convert_hole_to_undefined() |
| 582 ? CONVERT_HOLE_TO_UNDEFINED |
| 583 : NEVER_RETURN_HOLE; |
| 584 |
581 HInstruction* load = BuildUncheckedMonomorphicElementAccess( | 585 HInstruction* load = BuildUncheckedMonomorphicElementAccess( |
582 GetParameter(LoadDescriptor::kReceiverIndex), | 586 GetParameter(LoadDescriptor::kReceiverIndex), |
583 GetParameter(LoadDescriptor::kNameIndex), NULL, | 587 GetParameter(LoadDescriptor::kNameIndex), NULL, |
584 casted_stub()->is_js_array(), casted_stub()->elements_kind(), LOAD, | 588 casted_stub()->is_js_array(), casted_stub()->elements_kind(), LOAD, |
585 NEVER_RETURN_HOLE, STANDARD_STORE); | 589 hole_mode, STANDARD_STORE); |
586 return load; | 590 return load; |
587 } | 591 } |
588 | 592 |
589 | 593 |
590 Handle<Code> LoadFastElementStub::GenerateCode() { | 594 Handle<Code> LoadFastElementStub::GenerateCode() { |
591 return DoGenerateCode(this); | 595 return DoGenerateCode(this); |
592 } | 596 } |
593 | 597 |
594 | 598 |
595 HLoadNamedField* CodeStubGraphBuilderBase::BuildLoadNamedField( | 599 HLoadNamedField* CodeStubGraphBuilderBase::BuildLoadNamedField( |
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2033 // need. | 2037 // need. |
2034 info()->MarkMustNotHaveEagerFrame(); | 2038 info()->MarkMustNotHaveEagerFrame(); |
2035 | 2039 |
2036 // Probe the stub cache. | 2040 // Probe the stub cache. |
2037 Add<HTailCallThroughMegamorphicCache>(receiver, name); | 2041 Add<HTailCallThroughMegamorphicCache>(receiver, name); |
2038 | 2042 |
2039 // We never continue. | 2043 // We never continue. |
2040 return graph()->GetConstant0(); | 2044 return graph()->GetConstant0(); |
2041 } | 2045 } |
2042 } } // namespace v8::internal | 2046 } } // namespace v8::internal |
OLD | NEW |