OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 | 645 |
646 Handle<Code> TransitionElementsKindStub::GenerateCode(Isolate* isolate) { | 646 Handle<Code> TransitionElementsKindStub::GenerateCode(Isolate* isolate) { |
647 return DoGenerateCode(isolate, this); | 647 return DoGenerateCode(isolate, this); |
648 } | 648 } |
649 | 649 |
650 HValue* CodeStubGraphBuilderBase::BuildArrayConstructor( | 650 HValue* CodeStubGraphBuilderBase::BuildArrayConstructor( |
651 ElementsKind kind, | 651 ElementsKind kind, |
652 AllocationSiteOverrideMode override_mode, | 652 AllocationSiteOverrideMode override_mode, |
653 ArgumentClass argument_class) { | 653 ArgumentClass argument_class) { |
654 HValue* constructor = GetParameter(ArrayConstructorStubBase::kConstructor); | 654 HValue* constructor = GetParameter(ArrayConstructorStubBase::kConstructor); |
655 HValue* property_cell = GetParameter(ArrayConstructorStubBase::kPropertyCell); | 655 HValue* alloc_site = GetParameter(ArrayConstructorStubBase::kAllocationSite); |
656 // Walk through the property cell to the AllocationSite | |
657 HValue* alloc_site = Add<HLoadNamedField>(property_cell, | |
658 HObjectAccess::ForCellValue()); | |
659 JSArrayBuilder array_builder(this, kind, alloc_site, constructor, | 656 JSArrayBuilder array_builder(this, kind, alloc_site, constructor, |
660 override_mode); | 657 override_mode); |
661 HValue* result = NULL; | 658 HValue* result = NULL; |
662 switch (argument_class) { | 659 switch (argument_class) { |
663 case NONE: | 660 case NONE: |
664 result = array_builder.AllocateEmptyArray(); | 661 result = array_builder.AllocateEmptyArray(); |
665 break; | 662 break; |
666 case SINGLE: | 663 case SINGLE: |
667 result = BuildArraySingleArgumentConstructor(&array_builder); | 664 result = BuildArraySingleArgumentConstructor(&array_builder); |
668 break; | 665 break; |
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1342 return BuildUncheckedDictionaryElementLoad(receiver, key); | 1339 return BuildUncheckedDictionaryElementLoad(receiver, key); |
1343 } | 1340 } |
1344 | 1341 |
1345 | 1342 |
1346 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) { | 1343 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) { |
1347 return DoGenerateCode(isolate, this); | 1344 return DoGenerateCode(isolate, this); |
1348 } | 1345 } |
1349 | 1346 |
1350 | 1347 |
1351 } } // namespace v8::internal | 1348 } } // namespace v8::internal |
OLD | NEW |