Chromium Code Reviews| 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 = NEVER_RETURN_HOLE; | |
| 582 if (casted_stub()->elements_kind() == FAST_HOLEY_ELEMENTS && | |
|
Jakob Kummerow
2015/04/23 13:40:00
Why do we need to check for elements kind again? T
mvstanton
2015/04/27 07:57:12
Indeed, good catch, fixed.
| |
| 583 casted_stub()->convert_hole_to_undefined()) { | |
| 584 hole_mode = CONVERT_HOLE_TO_UNDEFINED; | |
| 585 } | |
| 586 | |
| 581 HInstruction* load = BuildUncheckedMonomorphicElementAccess( | 587 HInstruction* load = BuildUncheckedMonomorphicElementAccess( |
| 582 GetParameter(LoadDescriptor::kReceiverIndex), | 588 GetParameter(LoadDescriptor::kReceiverIndex), |
| 583 GetParameter(LoadDescriptor::kNameIndex), NULL, | 589 GetParameter(LoadDescriptor::kNameIndex), NULL, |
| 584 casted_stub()->is_js_array(), casted_stub()->elements_kind(), LOAD, | 590 casted_stub()->is_js_array(), casted_stub()->elements_kind(), LOAD, |
| 585 NEVER_RETURN_HOLE, STANDARD_STORE); | 591 hole_mode, STANDARD_STORE); |
| 586 return load; | 592 return load; |
| 587 } | 593 } |
| 588 | 594 |
| 589 | 595 |
| 590 Handle<Code> LoadFastElementStub::GenerateCode() { | 596 Handle<Code> LoadFastElementStub::GenerateCode() { |
| 591 return DoGenerateCode(this); | 597 return DoGenerateCode(this); |
| 592 } | 598 } |
| 593 | 599 |
| 594 | 600 |
| 595 HLoadNamedField* CodeStubGraphBuilderBase::BuildLoadNamedField( | 601 HLoadNamedField* CodeStubGraphBuilderBase::BuildLoadNamedField( |
| (...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2033 // need. | 2039 // need. |
| 2034 info()->MarkMustNotHaveEagerFrame(); | 2040 info()->MarkMustNotHaveEagerFrame(); |
| 2035 | 2041 |
| 2036 // Probe the stub cache. | 2042 // Probe the stub cache. |
| 2037 Add<HTailCallThroughMegamorphicCache>(receiver, name); | 2043 Add<HTailCallThroughMegamorphicCache>(receiver, name); |
| 2038 | 2044 |
| 2039 // We never continue. | 2045 // We never continue. |
| 2040 return graph()->GetConstant0(); | 2046 return graph()->GetConstant0(); |
| 2041 } | 2047 } |
| 2042 } } // namespace v8::internal | 2048 } } // namespace v8::internal |
| OLD | NEW |