| 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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 template<> | 616 template<> |
| 617 HValue* CodeStubGraphBuilder<LoadFieldStub>::BuildCodeStub() { | 617 HValue* CodeStubGraphBuilder<LoadFieldStub>::BuildCodeStub() { |
| 618 return BuildLoadNamedField(GetParameter(0), casted_stub()->index()); | 618 return BuildLoadNamedField(GetParameter(0), casted_stub()->index()); |
| 619 } | 619 } |
| 620 | 620 |
| 621 | 621 |
| 622 Handle<Code> LoadFieldStub::GenerateCode() { | 622 Handle<Code> LoadFieldStub::GenerateCode() { |
| 623 return DoGenerateCode(this); | 623 return DoGenerateCode(this); |
| 624 } | 624 } |
| 625 | 625 |
| 626 | |
| 627 template <> | |
| 628 HValue* CodeStubGraphBuilder<ArrayBufferViewLoadFieldStub>::BuildCodeStub() { | |
| 629 return BuildArrayBufferViewFieldAccessor(GetParameter(0), nullptr, | |
| 630 casted_stub()->index()); | |
| 631 } | |
| 632 | |
| 633 | |
| 634 Handle<Code> ArrayBufferViewLoadFieldStub::GenerateCode() { | |
| 635 return DoGenerateCode(this); | |
| 636 } | |
| 637 | |
| 638 | 626 |
| 639 template <> | 627 template <> |
| 640 HValue* CodeStubGraphBuilder<LoadConstantStub>::BuildCodeStub() { | 628 HValue* CodeStubGraphBuilder<LoadConstantStub>::BuildCodeStub() { |
| 641 HValue* map = AddLoadMap(GetParameter(0), NULL); | 629 HValue* map = AddLoadMap(GetParameter(0), NULL); |
| 642 HObjectAccess descriptors_access = HObjectAccess::ForObservableJSObjectOffset( | 630 HObjectAccess descriptors_access = HObjectAccess::ForObservableJSObjectOffset( |
| 643 Map::kDescriptorsOffset, Representation::Tagged()); | 631 Map::kDescriptorsOffset, Representation::Tagged()); |
| 644 HValue* descriptors = Add<HLoadNamedField>(map, nullptr, descriptors_access); | 632 HValue* descriptors = Add<HLoadNamedField>(map, nullptr, descriptors_access); |
| 645 HObjectAccess value_access = HObjectAccess::ForObservableJSObjectOffset( | 633 HObjectAccess value_access = HObjectAccess::ForObservableJSObjectOffset( |
| 646 DescriptorArray::GetValueOffset(casted_stub()->constant_index())); | 634 DescriptorArray::GetValueOffset(casted_stub()->constant_index())); |
| 647 return Add<HLoadNamedField>(descriptors, nullptr, value_access); | 635 return Add<HLoadNamedField>(descriptors, nullptr, value_access); |
| (...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2045 // need. | 2033 // need. |
| 2046 info()->MarkMustNotHaveEagerFrame(); | 2034 info()->MarkMustNotHaveEagerFrame(); |
| 2047 | 2035 |
| 2048 // Probe the stub cache. | 2036 // Probe the stub cache. |
| 2049 Add<HTailCallThroughMegamorphicCache>(receiver, name); | 2037 Add<HTailCallThroughMegamorphicCache>(receiver, name); |
| 2050 | 2038 |
| 2051 // We never continue. | 2039 // We never continue. |
| 2052 return graph()->GetConstant0(); | 2040 return graph()->GetConstant0(); |
| 2053 } | 2041 } |
| 2054 } } // namespace v8::internal | 2042 } } // namespace v8::internal |
| OLD | NEW |