| 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/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 if (kind() == Code::STORE_IC) { | 611 if (kind() == Code::STORE_IC) { |
| 612 descriptor->Initialize(FUNCTION_ADDR(StoreIC_MissFromStubFailure)); | 612 descriptor->Initialize(FUNCTION_ADDR(StoreIC_MissFromStubFailure)); |
| 613 } else if (kind() == Code::KEYED_LOAD_IC) { | 613 } else if (kind() == Code::KEYED_LOAD_IC) { |
| 614 descriptor->Initialize(FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure)); | 614 descriptor->Initialize(FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure)); |
| 615 } | 615 } |
| 616 } | 616 } |
| 617 | 617 |
| 618 | 618 |
| 619 CallInterfaceDescriptor HandlerStub::GetCallInterfaceDescriptor() { | 619 CallInterfaceDescriptor HandlerStub::GetCallInterfaceDescriptor() { |
| 620 if (kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC) { | 620 if (kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC) { |
| 621 if (FLAG_vector_ics) { | 621 return VectorLoadICDescriptor(isolate()); |
| 622 return VectorLoadICDescriptor(isolate()); | |
| 623 } | |
| 624 return LoadDescriptor(isolate()); | |
| 625 } else { | 622 } else { |
| 626 DCHECK_EQ(Code::STORE_IC, kind()); | 623 DCHECK_EQ(Code::STORE_IC, kind()); |
| 627 return StoreDescriptor(isolate()); | 624 return StoreDescriptor(isolate()); |
| 628 } | 625 } |
| 629 } | 626 } |
| 630 | 627 |
| 631 | 628 |
| 632 void StoreFastElementStub::InitializeDescriptor( | 629 void StoreFastElementStub::InitializeDescriptor( |
| 633 CodeStubDescriptor* descriptor) { | 630 CodeStubDescriptor* descriptor) { |
| 634 descriptor->Initialize(FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure)); | 631 descriptor->Initialize(FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure)); |
| 635 } | 632 } |
| 636 | 633 |
| 637 | 634 |
| 638 void ElementsTransitionAndStoreStub::InitializeDescriptor( | 635 void ElementsTransitionAndStoreStub::InitializeDescriptor( |
| 639 CodeStubDescriptor* descriptor) { | 636 CodeStubDescriptor* descriptor) { |
| 640 descriptor->Initialize(FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss)); | 637 descriptor->Initialize(FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss)); |
| 641 } | 638 } |
| 642 | 639 |
| 643 | 640 |
| 644 CallInterfaceDescriptor StoreTransitionStub::GetCallInterfaceDescriptor() { | 641 CallInterfaceDescriptor StoreTransitionStub::GetCallInterfaceDescriptor() { |
| 645 return StoreTransitionDescriptor(isolate()); | 642 return StoreTransitionDescriptor(isolate()); |
| 646 } | 643 } |
| 647 | 644 |
| 648 | 645 |
| 649 void MegamorphicLoadStub::InitializeDescriptor(CodeStubDescriptor* d) {} | |
| 650 | |
| 651 | |
| 652 void FastNewClosureStub::InitializeDescriptor(CodeStubDescriptor* descriptor) { | 646 void FastNewClosureStub::InitializeDescriptor(CodeStubDescriptor* descriptor) { |
| 653 descriptor->Initialize( | 647 descriptor->Initialize( |
| 654 Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry); | 648 Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry); |
| 655 } | 649 } |
| 656 | 650 |
| 657 | 651 |
| 658 void FastNewContextStub::InitializeDescriptor(CodeStubDescriptor* d) {} | 652 void FastNewContextStub::InitializeDescriptor(CodeStubDescriptor* d) {} |
| 659 | 653 |
| 660 | 654 |
| 661 void TypeofStub::InitializeDescriptor(CodeStubDescriptor* descriptor) {} | 655 void TypeofStub::InitializeDescriptor(CodeStubDescriptor* descriptor) {} |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1020 } | 1014 } |
| 1021 | 1015 |
| 1022 | 1016 |
| 1023 InternalArrayConstructorStub::InternalArrayConstructorStub( | 1017 InternalArrayConstructorStub::InternalArrayConstructorStub( |
| 1024 Isolate* isolate) : PlatformCodeStub(isolate) { | 1018 Isolate* isolate) : PlatformCodeStub(isolate) { |
| 1025 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 1019 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 1026 } | 1020 } |
| 1027 | 1021 |
| 1028 | 1022 |
| 1029 } } // namespace v8::internal | 1023 } } // namespace v8::internal |
| OLD | NEW |