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/code-stub-assembler.h" | 10 #include "src/code-stub-assembler.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 /* These are only called from FCG */ \ | 59 /* These are only called from FCG */ \ |
60 /* They can be removed when only the TF */ \ | 60 /* They can be removed when only the TF */ \ |
61 /* version of the corresponding stub is */ \ | 61 /* version of the corresponding stub is */ \ |
62 /* used universally */ \ | 62 /* used universally */ \ |
63 V(CallICTrampoline) \ | 63 V(CallICTrampoline) \ |
64 V(LoadICTrampoline) \ | 64 V(LoadICTrampoline) \ |
65 V(KeyedLoadICTrampoline) \ | 65 V(KeyedLoadICTrampoline) \ |
66 V(KeyedStoreICTrampoline) \ | 66 V(KeyedStoreICTrampoline) \ |
67 V(StoreICTrampoline) \ | 67 V(StoreICTrampoline) \ |
68 /* --- HydrogenCodeStubs --- */ \ | 68 /* --- HydrogenCodeStubs --- */ \ |
69 V(NumberToString) \ | |
70 V(StringAdd) \ | 69 V(StringAdd) \ |
71 /* These builtins w/ JS linkage are */ \ | 70 /* These builtins w/ JS linkage are */ \ |
72 /* just fast-cases of C++ builtins. They */ \ | 71 /* just fast-cases of C++ builtins. They */ \ |
73 /* require varg support from TF */ \ | 72 /* require varg support from TF */ \ |
74 V(FastArrayPush) \ | 73 V(FastArrayPush) \ |
75 V(FastFunctionBind) \ | 74 V(FastFunctionBind) \ |
76 /* These will be ported/eliminated */ \ | 75 /* These will be ported/eliminated */ \ |
77 /* as part of the new IC system, ask */ \ | 76 /* as part of the new IC system, ask */ \ |
78 /* ishell before doing anything */ \ | 77 /* ishell before doing anything */ \ |
79 V(KeyedLoadGeneric) \ | 78 V(KeyedLoadGeneric) \ |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 V(ElementsTransitionAndStore) \ | 119 V(ElementsTransitionAndStore) \ |
121 V(FastCloneRegExp) \ | 120 V(FastCloneRegExp) \ |
122 V(FastCloneShallowArray) \ | 121 V(FastCloneShallowArray) \ |
123 V(FastCloneShallowObject) \ | 122 V(FastCloneShallowObject) \ |
124 V(FastNewClosure) \ | 123 V(FastNewClosure) \ |
125 V(FastNewFunctionContext) \ | 124 V(FastNewFunctionContext) \ |
126 V(KeyedLoadSloppyArguments) \ | 125 V(KeyedLoadSloppyArguments) \ |
127 V(KeyedStoreSloppyArguments) \ | 126 V(KeyedStoreSloppyArguments) \ |
128 V(LoadScriptContextField) \ | 127 V(LoadScriptContextField) \ |
129 V(StoreScriptContextField) \ | 128 V(StoreScriptContextField) \ |
| 129 V(NumberToString) \ |
130 V(GetProperty) \ | 130 V(GetProperty) \ |
131 V(LoadICTF) \ | 131 V(LoadICTF) \ |
132 V(KeyedLoadICTF) \ | 132 V(KeyedLoadICTF) \ |
133 V(StoreFastElement) \ | 133 V(StoreFastElement) \ |
134 V(StoreField) \ | 134 V(StoreField) \ |
135 V(StoreGlobal) \ | 135 V(StoreGlobal) \ |
136 V(StoreICTF) \ | 136 V(StoreICTF) \ |
137 V(StoreInterceptor) \ | 137 V(StoreInterceptor) \ |
138 V(StoreMap) \ | 138 V(StoreMap) \ |
139 V(StoreTransition) \ | 139 V(StoreTransition) \ |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT, | 840 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT, |
841 // Convert parameters when check fails (instead of throwing an exception). | 841 // Convert parameters when check fails (instead of throwing an exception). |
842 STRING_ADD_CONVERT = 1 << 2, | 842 STRING_ADD_CONVERT = 1 << 2, |
843 STRING_ADD_CONVERT_LEFT = STRING_ADD_CHECK_LEFT | STRING_ADD_CONVERT, | 843 STRING_ADD_CONVERT_LEFT = STRING_ADD_CHECK_LEFT | STRING_ADD_CONVERT, |
844 STRING_ADD_CONVERT_RIGHT = STRING_ADD_CHECK_RIGHT | STRING_ADD_CONVERT | 844 STRING_ADD_CONVERT_RIGHT = STRING_ADD_CHECK_RIGHT | STRING_ADD_CONVERT |
845 }; | 845 }; |
846 | 846 |
847 | 847 |
848 std::ostream& operator<<(std::ostream& os, const StringAddFlags& flags); | 848 std::ostream& operator<<(std::ostream& os, const StringAddFlags& flags); |
849 | 849 |
850 | 850 class NumberToStringStub final : public TurboFanCodeStub { |
851 class NumberToStringStub final : public HydrogenCodeStub { | |
852 public: | 851 public: |
853 explicit NumberToStringStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} | 852 explicit NumberToStringStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
854 | 853 |
855 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); | 854 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); |
856 DEFINE_HYDROGEN_CODE_STUB(NumberToString, HydrogenCodeStub); | 855 DEFINE_TURBOFAN_CODE_STUB(NumberToString, TurboFanCodeStub); |
857 }; | 856 }; |
858 | 857 |
859 class FastNewClosureStub : public TurboFanCodeStub { | 858 class FastNewClosureStub : public TurboFanCodeStub { |
860 public: | 859 public: |
861 explicit FastNewClosureStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 860 explicit FastNewClosureStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
862 | 861 |
863 static compiler::Node* Generate(CodeStubAssembler* assembler, | 862 static compiler::Node* Generate(CodeStubAssembler* assembler, |
864 compiler::Node* shared_info, | 863 compiler::Node* shared_info, |
865 compiler::Node* context); | 864 compiler::Node* context); |
866 | 865 |
(...skipping 2026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2893 #undef DEFINE_HYDROGEN_CODE_STUB | 2892 #undef DEFINE_HYDROGEN_CODE_STUB |
2894 #undef DEFINE_CODE_STUB | 2893 #undef DEFINE_CODE_STUB |
2895 #undef DEFINE_CODE_STUB_BASE | 2894 #undef DEFINE_CODE_STUB_BASE |
2896 | 2895 |
2897 extern Representation RepresentationFromMachineType(MachineType type); | 2896 extern Representation RepresentationFromMachineType(MachineType type); |
2898 | 2897 |
2899 } // namespace internal | 2898 } // namespace internal |
2900 } // namespace v8 | 2899 } // namespace v8 |
2901 | 2900 |
2902 #endif // V8_CODE_STUBS_H_ | 2901 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |