OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 10 matching lines...) Expand all Loading... |
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #ifndef V8_BUILTINS_H_ | 28 #ifndef V8_BUILTINS_H_ |
29 #define V8_BUILTINS_H_ | 29 #define V8_BUILTINS_H_ |
30 | 30 |
31 | |
32 | |
33 namespace v8 { namespace internal { | 31 namespace v8 { namespace internal { |
34 | 32 |
35 | |
36 // Define list of builtins implemented in C. | 33 // Define list of builtins implemented in C. |
37 #define BUILTIN_LIST_C(V) \ | 34 #define BUILTIN_LIST_C(V) \ |
38 V(Illegal, 0) \ | 35 V(Illegal, 0) \ |
39 \ | 36 \ |
40 V(EmptyFunction, 0) \ | 37 V(EmptyFunction, 0) \ |
41 \ | 38 \ |
42 V(ArrayCode, 0) \ | 39 V(ArrayCode, 0) \ |
43 \ | 40 \ |
44 V(ArrayPush, 1) \ | 41 V(ArrayPush, 1) \ |
45 V(ArrayPop, 0) \ | 42 V(ArrayPop, 0) \ |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 \ | 80 \ |
84 V(StoreIC_Initialize, STORE_IC, UNINITIALIZED) \ | 81 V(StoreIC_Initialize, STORE_IC, UNINITIALIZED) \ |
85 V(StoreIC_Megamorphic, STORE_IC, MEGAMORPHIC) \ | 82 V(StoreIC_Megamorphic, STORE_IC, MEGAMORPHIC) \ |
86 V(StoreIC_DebugBreak, STORE_IC, DEBUG_BREAK) \ | 83 V(StoreIC_DebugBreak, STORE_IC, DEBUG_BREAK) \ |
87 \ | 84 \ |
88 V(KeyedStoreIC_Initialize, KEYED_STORE_IC, UNINITIALIZED) \ | 85 V(KeyedStoreIC_Initialize, KEYED_STORE_IC, UNINITIALIZED) \ |
89 V(KeyedStoreIC_Generic, KEYED_STORE_IC, MEGAMORPHIC) \ | 86 V(KeyedStoreIC_Generic, KEYED_STORE_IC, MEGAMORPHIC) \ |
90 V(KeyedStoreIC_DebugBreak, KEYED_STORE_IC, DEBUG_BREAK) \ | 87 V(KeyedStoreIC_DebugBreak, KEYED_STORE_IC, DEBUG_BREAK) \ |
91 \ | 88 \ |
92 /* Uses KeyedLoadIC_Initialize; must be after in list. */ \ | 89 /* Uses KeyedLoadIC_Initialize; must be after in list. */ \ |
| 90 V(FunctionCall, BUILTIN, UNINITIALIZED) \ |
93 V(FunctionApply, BUILTIN, UNINITIALIZED) | 91 V(FunctionApply, BUILTIN, UNINITIALIZED) |
94 | 92 |
95 | 93 |
96 // Define list of builtins implemented in JavaScript. | 94 // Define list of builtins implemented in JavaScript. |
97 #define BUILTINS_LIST_JS(V) \ | 95 #define BUILTINS_LIST_JS(V) \ |
98 V(EQUALS, 1) \ | 96 V(EQUALS, 1) \ |
99 V(STRICT_EQUALS, 1) \ | 97 V(STRICT_EQUALS, 1) \ |
100 V(COMPARE, 2) \ | 98 V(COMPARE, 2) \ |
101 V(ADD, 1) \ | 99 V(ADD, 1) \ |
102 V(SUB, 1) \ | 100 V(SUB, 1) \ |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 static int construct_call_pc_offset_; | 210 static int construct_call_pc_offset_; |
213 static int arguments_adaptor_call_pc_offset_; | 211 static int arguments_adaptor_call_pc_offset_; |
214 | 212 |
215 static void Generate_Adaptor(MacroAssembler* masm, | 213 static void Generate_Adaptor(MacroAssembler* masm, |
216 int argc, | 214 int argc, |
217 CFunctionId id); | 215 CFunctionId id); |
218 static void Generate_JSConstructCall(MacroAssembler* masm); | 216 static void Generate_JSConstructCall(MacroAssembler* masm); |
219 static void Generate_JSEntryTrampoline(MacroAssembler* masm); | 217 static void Generate_JSEntryTrampoline(MacroAssembler* masm); |
220 static void Generate_JSConstructEntryTrampoline(MacroAssembler* masm); | 218 static void Generate_JSConstructEntryTrampoline(MacroAssembler* masm); |
221 static void Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm); | 219 static void Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm); |
| 220 |
| 221 static void Generate_FunctionCall(MacroAssembler* masm); |
222 static void Generate_FunctionApply(MacroAssembler* masm); | 222 static void Generate_FunctionApply(MacroAssembler* masm); |
223 | 223 |
224 static void Generate_LoadIC_DebugBreak(MacroAssembler* masm); | 224 static void Generate_LoadIC_DebugBreak(MacroAssembler* masm); |
225 static void Generate_StoreIC_DebugBreak(MacroAssembler* masm); | 225 static void Generate_StoreIC_DebugBreak(MacroAssembler* masm); |
226 static void Generate_KeyedLoadIC_DebugBreak(MacroAssembler* masm); | 226 static void Generate_KeyedLoadIC_DebugBreak(MacroAssembler* masm); |
227 static void Generate_KeyedStoreIC_DebugBreak(MacroAssembler* masm); | 227 static void Generate_KeyedStoreIC_DebugBreak(MacroAssembler* masm); |
228 static void Generate_ConstructCall_DebugBreak(MacroAssembler* masm); | 228 static void Generate_ConstructCall_DebugBreak(MacroAssembler* masm); |
229 static void Generate_Return_DebugBreak(MacroAssembler* masm); | 229 static void Generate_Return_DebugBreak(MacroAssembler* masm); |
230 static void Generate_Return_DebugBreakEntry(MacroAssembler* masm); | 230 static void Generate_Return_DebugBreakEntry(MacroAssembler* masm); |
231 static void Generate_StubNoRegisters_DebugBreak(MacroAssembler* masm); | 231 static void Generate_StubNoRegisters_DebugBreak(MacroAssembler* masm); |
232 }; | 232 }; |
233 | 233 |
234 | |
235 } } // namespace v8::internal | 234 } } // namespace v8::internal |
236 | 235 |
237 #endif // V8_BUILTINS_H_ | 236 #endif // V8_BUILTINS_H_ |
OLD | NEW |