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 #ifndef V8_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 /* --- PlatformCodeStubs --- */ \ | 31 /* --- PlatformCodeStubs --- */ \ |
32 V(ArrayConstructor) \ | 32 V(ArrayConstructor) \ |
33 V(BinaryOpICWithAllocationSite) \ | 33 V(BinaryOpICWithAllocationSite) \ |
34 V(CallApiCallback) \ | 34 V(CallApiCallback) \ |
35 V(CallApiGetter) \ | 35 V(CallApiGetter) \ |
36 V(CallConstruct) \ | 36 V(CallConstruct) \ |
37 V(CallIC) \ | 37 V(CallIC) \ |
38 V(CEntry) \ | 38 V(CEntry) \ |
39 V(CompareIC) \ | 39 V(CompareIC) \ |
40 V(DoubleToI) \ | 40 V(DoubleToI) \ |
41 V(FunctionPrototype) \ | |
42 V(InternalArrayConstructor) \ | 41 V(InternalArrayConstructor) \ |
43 V(JSEntry) \ | 42 V(JSEntry) \ |
44 V(MathPow) \ | 43 V(MathPow) \ |
45 V(ProfileEntryHook) \ | 44 V(ProfileEntryHook) \ |
46 V(RecordWrite) \ | 45 V(RecordWrite) \ |
47 V(RegExpExec) \ | 46 V(RegExpExec) \ |
48 V(StoreBufferOverflow) \ | 47 V(StoreBufferOverflow) \ |
49 V(StoreSlowElement) \ | 48 V(StoreSlowElement) \ |
50 V(SubString) \ | 49 V(SubString) \ |
51 V(NameDictionaryLookup) \ | 50 V(NameDictionaryLookup) \ |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 return TailCallModeBits::decode(minor_key_); | 864 return TailCallModeBits::decode(minor_key_); |
866 } | 865 } |
867 | 866 |
868 private: | 867 private: |
869 void PrintState(std::ostream& os) const final; // NOLINT | 868 void PrintState(std::ostream& os) const final; // NOLINT |
870 | 869 |
871 DEFINE_CALL_INTERFACE_DESCRIPTOR(CallIC); | 870 DEFINE_CALL_INTERFACE_DESCRIPTOR(CallIC); |
872 DEFINE_TURBOFAN_CODE_STUB(CallIC, TurboFanCodeStub); | 871 DEFINE_TURBOFAN_CODE_STUB(CallIC, TurboFanCodeStub); |
873 }; | 872 }; |
874 | 873 |
875 | |
876 // TODO(verwaest): Translate to hydrogen code stub. | |
877 class FunctionPrototypeStub : public PlatformCodeStub { | |
878 public: | |
879 explicit FunctionPrototypeStub(Isolate* isolate) | |
880 : PlatformCodeStub(isolate) {} | |
881 | |
882 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | |
883 ExtraICState GetExtraICState() const override { return Code::LOAD_IC; } | |
884 | |
885 // TODO(mvstanton): only the receiver register is accessed. When this is | |
886 // translated to a hydrogen code stub, a new CallInterfaceDescriptor | |
887 // should be created that just uses that register for more efficient code. | |
888 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { | |
889 return LoadWithVectorDescriptor(isolate()); | |
890 } | |
891 | |
892 DEFINE_PLATFORM_CODE_STUB(FunctionPrototype, PlatformCodeStub); | |
893 }; | |
894 | |
895 class KeyedLoadSloppyArgumentsStub : public TurboFanCodeStub { | 874 class KeyedLoadSloppyArgumentsStub : public TurboFanCodeStub { |
896 public: | 875 public: |
897 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) | 876 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) |
898 : TurboFanCodeStub(isolate) {} | 877 : TurboFanCodeStub(isolate) {} |
899 | 878 |
900 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | 879 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
901 ExtraICState GetExtraICState() const override { return Code::LOAD_IC; } | 880 ExtraICState GetExtraICState() const override { return Code::LOAD_IC; } |
902 | 881 |
903 protected: | 882 protected: |
904 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 883 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1895 #undef DEFINE_PLATFORM_CODE_STUB | 1874 #undef DEFINE_PLATFORM_CODE_STUB |
1896 #undef DEFINE_HANDLER_CODE_STUB | 1875 #undef DEFINE_HANDLER_CODE_STUB |
1897 #undef DEFINE_HYDROGEN_CODE_STUB | 1876 #undef DEFINE_HYDROGEN_CODE_STUB |
1898 #undef DEFINE_CODE_STUB | 1877 #undef DEFINE_CODE_STUB |
1899 #undef DEFINE_CODE_STUB_BASE | 1878 #undef DEFINE_CODE_STUB_BASE |
1900 | 1879 |
1901 } // namespace internal | 1880 } // namespace internal |
1902 } // namespace v8 | 1881 } // namespace v8 |
1903 | 1882 |
1904 #endif // V8_CODE_STUBS_H_ | 1883 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |