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" |
11 #include "src/codegen.h" | 11 #include "src/codegen.h" |
12 #include "src/globals.h" | 12 #include "src/globals.h" |
13 #include "src/ic/ic-state.h" | 13 #include "src/ic/ic-state.h" |
14 #include "src/interface-descriptors.h" | 14 #include "src/interface-descriptors.h" |
15 #include "src/macro-assembler.h" | 15 #include "src/macro-assembler.h" |
16 #include "src/ostreams.h" | 16 #include "src/ostreams.h" |
17 | 17 |
18 namespace v8 { | 18 namespace v8 { |
19 namespace internal { | 19 namespace internal { |
20 | 20 |
21 // List of code stubs used on all platforms. | 21 // List of code stubs used on all platforms. |
22 #define CODE_STUB_LIST_ALL_PLATFORMS(V) \ | 22 #define CODE_STUB_LIST_ALL_PLATFORMS(V) \ |
23 /* PlatformCodeStubs */ \ | 23 /* --- PlatformCodeStubs --- */ \ |
24 V(ArrayConstructor) \ | 24 V(ArrayConstructor) \ |
25 V(BinaryOpICWithAllocationSite) \ | 25 V(BinaryOpICWithAllocationSite) \ |
26 V(CallApiCallback) \ | 26 V(CallApiCallback) \ |
27 V(CallApiGetter) \ | 27 V(CallApiGetter) \ |
28 V(CallConstruct) \ | 28 V(CallConstruct) \ |
29 V(CallIC) \ | 29 V(CallIC) \ |
30 V(CEntry) \ | 30 V(CEntry) \ |
31 V(CompareIC) \ | 31 V(CompareIC) \ |
32 V(DoubleToI) \ | 32 V(DoubleToI) \ |
33 V(FunctionPrototype) \ | 33 V(FunctionPrototype) \ |
34 V(InternalArrayConstructor) \ | 34 V(InternalArrayConstructor) \ |
35 V(JSEntry) \ | 35 V(JSEntry) \ |
36 V(KeyedLoadICTrampoline) \ | 36 V(LoadIndexedString) \ |
37 V(LoadICTrampoline) \ | 37 V(MathPow) \ |
38 V(LoadGlobalICTrampoline) \ | 38 V(ProfileEntryHook) \ |
39 V(CallICTrampoline) \ | 39 V(RecordWrite) \ |
40 V(LoadIndexedString) \ | 40 V(RegExpExec) \ |
41 V(MathPow) \ | 41 V(StoreBufferOverflow) \ |
42 V(ProfileEntryHook) \ | 42 V(StoreElement) \ |
43 V(RecordWrite) \ | 43 V(SubString) \ |
44 V(RegExpExec) \ | 44 V(ToString) \ |
45 V(StoreBufferOverflow) \ | 45 V(ToName) \ |
46 V(StoreElement) \ | 46 V(StoreIC) \ |
47 V(StubFailureTrampoline) \ | 47 V(KeyedStoreIC) \ |
48 V(SubString) \ | 48 V(KeyedLoadIC) \ |
49 V(ToString) \ | 49 V(LoadIC) \ |
50 V(ToName) \ | 50 V(LoadGlobalIC) \ |
51 V(StoreICTrampoline) \ | 51 V(FastNewObject) \ |
52 V(KeyedStoreICTrampoline) \ | 52 V(FastNewRestParameter) \ |
53 V(StoreIC) \ | 53 V(FastNewSloppyArguments) \ |
54 V(KeyedStoreIC) \ | 54 V(FastNewStrictArguments) \ |
55 V(KeyedLoadIC) \ | 55 V(NameDictionaryLookup) \ |
56 V(LoadIC) \ | 56 /* This can be removed once there are no */ \ |
57 V(LoadGlobalIC) \ | 57 /* more deopting Hydrogen stubs. */ \ |
58 V(FastNewObject) \ | 58 V(StubFailureTrampoline) \ |
59 V(FastNewRestParameter) \ | 59 /* These are only called from FCG */ \ |
60 V(FastNewSloppyArguments) \ | 60 /* They can be removed when only the TF */ \ |
61 V(FastNewStrictArguments) \ | 61 /* version of the corresponding stub is */ \ |
62 /* HydrogenCodeStubs */ \ | 62 /* used universally */ \ |
63 V(BinaryOpIC) \ | 63 V(CallICTrampoline) \ |
64 V(BinaryOpWithAllocationSite) \ | 64 V(LoadICTrampoline) \ |
65 V(ElementsTransitionAndStore) \ | 65 V(KeyedLoadICTrampoline) \ |
66 V(FastArrayPush) \ | 66 V(KeyedStoreICTrampoline) \ |
67 V(FastCloneRegExp) \ | 67 V(StoreICTrampoline) \ |
68 V(FastCloneShallowArray) \ | 68 /* --- HydrogenCodeStubs --- */ \ |
69 V(FastFunctionBind) \ | 69 V(ElementsTransitionAndStore) \ |
70 V(GrowArrayElements) \ | 70 V(FastCloneRegExp) \ |
71 V(KeyedLoadGeneric) \ | 71 V(FastCloneShallowArray) \ |
72 V(LoadScriptContextField) \ | 72 V(GrowArrayElements) \ |
73 V(LoadDictionaryElement) \ | 73 V(NumberToString) \ |
74 V(NameDictionaryLookup) \ | 74 V(StringAdd) \ |
75 V(NumberToString) \ | 75 V(ToObject) \ |
76 V(ToObject) \ | 76 V(Typeof) \ |
77 V(Typeof) \ | 77 /* These builtins w/ JS linkage are */ \ |
78 V(RegExpConstructResult) \ | 78 /* just fast-cases of C++ builtins. They */ \ |
79 V(StoreFastElement) \ | 79 /* require varg support from TF */ \ |
80 V(StoreGlobalViaContext) \ | 80 V(FastArrayPush) \ |
81 V(StoreScriptContextField) \ | 81 V(FastFunctionBind) \ |
82 V(StringAdd) \ | 82 /* These will be ported/eliminated */ \ |
83 V(ToBooleanIC) \ | 83 /* as part of the new IC system, ask */ \ |
84 V(TransitionElementsKind) \ | 84 /* ishell before doing anything */ \ |
85 /* TurboFanCodeStubs */ \ | 85 V(KeyedLoadGeneric) \ |
86 V(AllocateHeapNumber) \ | 86 V(KeyedLoadSloppyArguments) \ |
87 V(AllocateFloat32x4) \ | 87 V(KeyedStoreSloppyArguments) \ |
88 V(AllocateInt32x4) \ | 88 V(LoadConstant) \ |
89 V(AllocateUint32x4) \ | 89 V(LoadDictionaryElement) \ |
90 V(AllocateBool32x4) \ | 90 V(LoadFastElement) \ |
91 V(AllocateInt16x8) \ | 91 V(LoadField) \ |
92 V(AllocateUint16x8) \ | 92 V(LoadScriptContextField) \ |
93 V(AllocateBool16x8) \ | 93 V(StoreFastElement) \ |
94 V(AllocateInt8x16) \ | 94 V(StoreField) \ |
95 V(AllocateUint8x16) \ | 95 V(StoreGlobal) \ |
96 V(AllocateBool8x16) \ | 96 V(StoreScriptContextField) \ |
97 V(ArrayNoArgumentConstructor) \ | 97 V(StoreTransition) \ |
98 V(ArraySingleArgumentConstructor) \ | 98 /* These should never be ported to TF */ \ |
99 V(ArrayNArgumentsConstructor) \ | 99 /* because they are either used only by */ \ |
100 V(CreateAllocationSite) \ | 100 /* FCG/Crankshaft or are deprecated */ \ |
101 V(CreateWeakCell) \ | 101 V(BinaryOpIC) \ |
102 V(StringLength) \ | 102 V(BinaryOpWithAllocationSite) \ |
103 V(Add) \ | 103 V(ToBooleanIC) \ |
104 V(Subtract) \ | 104 V(RegExpConstructResult) \ |
105 V(Multiply) \ | 105 V(TransitionElementsKind) \ |
106 V(Divide) \ | 106 V(StoreGlobalViaContext) \ |
107 V(Modulus) \ | 107 /* --- TurboFanCodeStubs --- */ \ |
108 V(ShiftRight) \ | 108 V(AllocateHeapNumber) \ |
109 V(ShiftRightLogical) \ | 109 V(AllocateFloat32x4) \ |
110 V(ShiftLeft) \ | 110 V(AllocateInt32x4) \ |
111 V(BitwiseAnd) \ | 111 V(AllocateUint32x4) \ |
112 V(BitwiseOr) \ | 112 V(AllocateBool32x4) \ |
113 V(BitwiseXor) \ | 113 V(AllocateInt16x8) \ |
114 V(Inc) \ | 114 V(AllocateUint16x8) \ |
115 V(InternalArrayNoArgumentConstructor) \ | 115 V(AllocateBool16x8) \ |
116 V(InternalArraySingleArgumentConstructor) \ | 116 V(AllocateInt8x16) \ |
117 V(Dec) \ | 117 V(AllocateUint8x16) \ |
118 V(FastCloneShallowObject) \ | 118 V(AllocateBool8x16) \ |
119 V(FastNewClosure) \ | 119 V(ArrayNoArgumentConstructor) \ |
120 V(FastNewFunctionContext) \ | 120 V(ArraySingleArgumentConstructor) \ |
121 V(InstanceOf) \ | 121 V(ArrayNArgumentsConstructor) \ |
122 V(LessThan) \ | 122 V(CreateAllocationSite) \ |
123 V(LessThanOrEqual) \ | 123 V(CreateWeakCell) \ |
124 V(GreaterThan) \ | 124 V(StringLength) \ |
125 V(GreaterThanOrEqual) \ | 125 V(Add) \ |
126 V(Equal) \ | 126 V(Subtract) \ |
127 V(NotEqual) \ | 127 V(Multiply) \ |
128 V(StrictEqual) \ | 128 V(Divide) \ |
129 V(StrictNotEqual) \ | 129 V(Modulus) \ |
130 V(StringEqual) \ | 130 V(ShiftRight) \ |
131 V(StringNotEqual) \ | 131 V(ShiftRightLogical) \ |
132 V(StringLessThan) \ | 132 V(ShiftLeft) \ |
133 V(StringLessThanOrEqual) \ | 133 V(BitwiseAnd) \ |
134 V(StringGreaterThan) \ | 134 V(BitwiseOr) \ |
135 V(StringGreaterThanOrEqual) \ | 135 V(BitwiseXor) \ |
136 V(ToInteger) \ | 136 V(Inc) \ |
137 V(ToLength) \ | 137 V(InternalArrayNoArgumentConstructor) \ |
138 V(HasProperty) \ | 138 V(InternalArraySingleArgumentConstructor) \ |
139 V(ForInFilter) \ | 139 V(Dec) \ |
140 V(GetProperty) \ | 140 V(FastCloneShallowObject) \ |
141 V(LoadICTrampolineTF) \ | 141 V(FastNewClosure) \ |
142 V(LoadICTF) \ | 142 V(FastNewFunctionContext) \ |
143 V(KeyedLoadICTrampolineTF) \ | 143 V(InstanceOf) \ |
144 V(KeyedLoadICTF) \ | 144 V(LessThan) \ |
145 /* IC Handler stubs */ \ | 145 V(LessThanOrEqual) \ |
146 V(KeyedLoadSloppyArguments) \ | 146 V(GreaterThan) \ |
147 V(KeyedStoreSloppyArguments) \ | 147 V(GreaterThanOrEqual) \ |
148 V(LoadApiGetter) \ | 148 V(Equal) \ |
149 V(LoadConstant) \ | 149 V(NotEqual) \ |
150 V(LoadFastElement) \ | 150 V(StrictEqual) \ |
151 V(LoadField) \ | 151 V(StrictNotEqual) \ |
152 V(LoadIndexedInterceptor) \ | 152 V(StringEqual) \ |
153 V(StoreField) \ | 153 V(StringNotEqual) \ |
154 V(StoreGlobal) \ | 154 V(StringLessThan) \ |
155 V(StoreInterceptor) \ | 155 V(StringLessThanOrEqual) \ |
156 V(StoreTransition) | 156 V(StringGreaterThan) \ |
| 157 V(StringGreaterThanOrEqual) \ |
| 158 V(ToInteger) \ |
| 159 V(ToLength) \ |
| 160 V(HasProperty) \ |
| 161 V(ForInFilter) \ |
| 162 V(GetProperty) \ |
| 163 V(LoadICTF) \ |
| 164 V(KeyedLoadICTF) \ |
| 165 V(StoreInterceptor) \ |
| 166 V(LoadApiGetter) \ |
| 167 V(LoadIndexedInterceptor) \ |
| 168 /* These are only called from FGC and */ \ |
| 169 /* can be removed when we use ignition */ \ |
| 170 /* only */ \ |
| 171 V(LoadICTrampolineTF) \ |
| 172 V(LoadGlobalICTrampoline) \ |
| 173 V(KeyedLoadICTrampolineTF) |
157 | 174 |
158 // List of code stubs only used on ARM 32 bits platforms. | 175 // List of code stubs only used on ARM 32 bits platforms. |
159 #if V8_TARGET_ARCH_ARM | 176 #if V8_TARGET_ARCH_ARM |
160 #define CODE_STUB_LIST_ARM(V) V(DirectCEntry) | 177 #define CODE_STUB_LIST_ARM(V) V(DirectCEntry) |
161 | 178 |
162 #else | 179 #else |
163 #define CODE_STUB_LIST_ARM(V) | 180 #define CODE_STUB_LIST_ARM(V) |
164 #endif | 181 #endif |
165 | 182 |
166 // List of code stubs only used on ARM 64 bits platforms. | 183 // List of code stubs only used on ARM 64 bits platforms. |
(...skipping 2964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3131 #undef DEFINE_HYDROGEN_CODE_STUB | 3148 #undef DEFINE_HYDROGEN_CODE_STUB |
3132 #undef DEFINE_CODE_STUB | 3149 #undef DEFINE_CODE_STUB |
3133 #undef DEFINE_CODE_STUB_BASE | 3150 #undef DEFINE_CODE_STUB_BASE |
3134 | 3151 |
3135 extern Representation RepresentationFromType(Type* type); | 3152 extern Representation RepresentationFromType(Type* type); |
3136 | 3153 |
3137 } // namespace internal | 3154 } // namespace internal |
3138 } // namespace v8 | 3155 } // namespace v8 |
3139 | 3156 |
3140 #endif // V8_CODE_STUBS_H_ | 3157 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |