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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/factory.h" | 10 #include "src/factory.h" |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 FUNCTION_ADDR(Runtime_KeyedStoreIC_MissFromStubFailure)); | 633 FUNCTION_ADDR(Runtime_KeyedStoreIC_MissFromStubFailure)); |
634 } | 634 } |
635 } | 635 } |
636 | 636 |
637 | 637 |
638 CallInterfaceDescriptor HandlerStub::GetCallInterfaceDescriptor() const { | 638 CallInterfaceDescriptor HandlerStub::GetCallInterfaceDescriptor() const { |
639 if (kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC) { | 639 if (kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC) { |
640 return LoadWithVectorDescriptor(isolate()); | 640 return LoadWithVectorDescriptor(isolate()); |
641 } else { | 641 } else { |
642 DCHECK(kind() == Code::STORE_IC || kind() == Code::KEYED_STORE_IC); | 642 DCHECK(kind() == Code::STORE_IC || kind() == Code::KEYED_STORE_IC); |
643 return FLAG_vector_stores ? VectorStoreICDescriptor(isolate()) | 643 return VectorStoreICDescriptor(isolate()); |
644 : StoreDescriptor(isolate()); | |
645 } | 644 } |
646 } | 645 } |
647 | 646 |
648 | 647 |
649 void StoreFastElementStub::InitializeDescriptor( | 648 void StoreFastElementStub::InitializeDescriptor( |
650 CodeStubDescriptor* descriptor) { | 649 CodeStubDescriptor* descriptor) { |
651 descriptor->Initialize( | 650 descriptor->Initialize( |
652 FUNCTION_ADDR(Runtime_KeyedStoreIC_MissFromStubFailure)); | 651 FUNCTION_ADDR(Runtime_KeyedStoreIC_MissFromStubFailure)); |
653 } | 652 } |
654 | 653 |
655 | 654 |
656 void ElementsTransitionAndStoreStub::InitializeDescriptor( | 655 void ElementsTransitionAndStoreStub::InitializeDescriptor( |
657 CodeStubDescriptor* descriptor) { | 656 CodeStubDescriptor* descriptor) { |
658 descriptor->Initialize( | 657 descriptor->Initialize( |
659 FUNCTION_ADDR(Runtime_ElementsTransitionAndStoreIC_Miss)); | 658 FUNCTION_ADDR(Runtime_ElementsTransitionAndStoreIC_Miss)); |
660 } | 659 } |
661 | 660 |
662 | 661 |
663 void ToObjectStub::InitializeDescriptor(CodeStubDescriptor* descriptor) { | 662 void ToObjectStub::InitializeDescriptor(CodeStubDescriptor* descriptor) { |
664 descriptor->Initialize(Runtime::FunctionForId(Runtime::kToObject)->entry); | 663 descriptor->Initialize(Runtime::FunctionForId(Runtime::kToObject)->entry); |
665 } | 664 } |
666 | 665 |
667 | 666 |
668 CallInterfaceDescriptor StoreTransitionStub::GetCallInterfaceDescriptor() | 667 CallInterfaceDescriptor StoreTransitionStub::GetCallInterfaceDescriptor() |
669 const { | 668 const { |
670 if (FLAG_vector_stores) { | 669 return VectorStoreTransitionDescriptor(isolate()); |
671 return VectorStoreTransitionDescriptor(isolate()); | |
672 } | |
673 return StoreTransitionDescriptor(isolate()); | |
674 } | 670 } |
675 | 671 |
676 | 672 |
677 CallInterfaceDescriptor | 673 CallInterfaceDescriptor |
678 ElementsTransitionAndStoreStub::GetCallInterfaceDescriptor() const { | 674 ElementsTransitionAndStoreStub::GetCallInterfaceDescriptor() const { |
679 if (FLAG_vector_stores) { | 675 return VectorStoreTransitionDescriptor(isolate()); |
680 return VectorStoreTransitionDescriptor(isolate()); | |
681 } | |
682 return StoreTransitionDescriptor(isolate()); | |
683 } | 676 } |
684 | 677 |
685 | 678 |
686 void FastNewClosureStub::InitializeDescriptor(CodeStubDescriptor* descriptor) { | 679 void FastNewClosureStub::InitializeDescriptor(CodeStubDescriptor* descriptor) { |
687 descriptor->Initialize(Runtime::FunctionForId(Runtime::kNewClosure)->entry); | 680 descriptor->Initialize(Runtime::FunctionForId(Runtime::kNewClosure)->entry); |
688 } | 681 } |
689 | 682 |
690 | 683 |
691 void FastNewContextStub::InitializeDescriptor(CodeStubDescriptor* d) {} | 684 void FastNewContextStub::InitializeDescriptor(CodeStubDescriptor* d) {} |
692 | 685 |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 if (type->Is(Type::UntaggedPointer())) { | 1060 if (type->Is(Type::UntaggedPointer())) { |
1068 return Representation::External(); | 1061 return Representation::External(); |
1069 } | 1062 } |
1070 | 1063 |
1071 DCHECK(!type->Is(Type::Untagged())); | 1064 DCHECK(!type->Is(Type::Untagged())); |
1072 return Representation::Tagged(); | 1065 return Representation::Tagged(); |
1073 } | 1066 } |
1074 | 1067 |
1075 } // namespace internal | 1068 } // namespace internal |
1076 } // namespace v8 | 1069 } // namespace v8 |
OLD | NEW |