]>
Commit | Line | Data |
---|---|---|
ba379fdc | 1 | /* |
93a37866 | 2 | * Copyright (C) 2008, 2013 Apple Inc. All rights reserved. |
14957cd0 | 3 | * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
ba379fdc A |
4 | * |
5 | * Redistribution and use in source and binary forms, with or without | |
6 | * modification, are permitted provided that the following conditions | |
7 | * are met: | |
8 | * | |
9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | |
14 | * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of | |
15 | * its contributors may be used to endorse or promote products derived | |
16 | * from this software without specific prior written permission. | |
17 | * | |
18 | * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | |
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
21 | * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | |
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | |
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
27 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
28 | */ | |
29 | ||
30 | #ifndef JITStubs_h | |
31 | #define JITStubs_h | |
32 | ||
14957cd0 | 33 | #include "CallData.h" |
6fe7ccc8 A |
34 | #include "Intrinsic.h" |
35 | #include "LowLevelInterpreter.h" | |
ba379fdc A |
36 | #include "MacroAssemblerCodeRef.h" |
37 | #include "Register.h" | |
93a37866 | 38 | #include "ResolveOperation.h" |
ba379fdc | 39 | |
ba379fdc A |
40 | namespace JSC { |
41 | ||
6fe7ccc8 A |
42 | #if ENABLE(JIT) |
43 | ||
93a37866 A |
44 | struct StructureStubInfo; |
45 | ||
46 | class ArrayAllocationProfile; | |
47 | class CodeBlock; | |
48 | class ExecutablePool; | |
49 | class FunctionExecutable; | |
50 | class Identifier; | |
51 | class VM; | |
52 | class JSGlobalObject; | |
53 | class JSObject; | |
54 | class JSPropertyNameIterator; | |
55 | class JSStack; | |
56 | class JSValue; | |
57 | class JSValueEncodedAsPointer; | |
58 | class LegacyProfiler; | |
59 | class NativeExecutable; | |
60 | class PropertySlot; | |
61 | class PutPropertySlot; | |
62 | class RegExp; | |
63 | class Structure; | |
64 | ||
65 | template <typename T> class Weak; | |
66 | ||
67 | union JITStubArg { | |
68 | void* asPointer; | |
69 | EncodedJSValue asEncodedJSValue; | |
70 | int32_t asInt32; | |
71 | ||
72 | JSValue jsValue() { return JSValue::decode(asEncodedJSValue); } | |
73 | JSObject* jsObject() { return static_cast<JSObject*>(asPointer); } | |
74 | Register* reg() { return static_cast<Register*>(asPointer); } | |
75 | Identifier& identifier() { return *static_cast<Identifier*>(asPointer); } | |
76 | int32_t int32() { return asInt32; } | |
77 | CodeBlock* codeBlock() { return static_cast<CodeBlock*>(asPointer); } | |
78 | FunctionExecutable* function() { return static_cast<FunctionExecutable*>(asPointer); } | |
79 | RegExp* regExp() { return static_cast<RegExp*>(asPointer); } | |
80 | JSPropertyNameIterator* propertyNameIterator() { return static_cast<JSPropertyNameIterator*>(asPointer); } | |
81 | JSGlobalObject* globalObject() { return static_cast<JSGlobalObject*>(asPointer); } | |
82 | JSString* jsString() { return static_cast<JSString*>(asPointer); } | |
83 | Structure* structure() { return static_cast<Structure*>(asPointer); } | |
84 | ReturnAddressPtr returnAddress() { return ReturnAddressPtr(asPointer); } | |
85 | ResolveOperations* resolveOperations() { return static_cast<ResolveOperations*>(asPointer); } | |
86 | PutToBaseOperation* putToBaseOperation() { return static_cast<PutToBaseOperation*>(asPointer); } | |
87 | ArrayAllocationProfile* arrayAllocationProfile() { return static_cast<ArrayAllocationProfile*>(asPointer); } | |
88 | }; | |
4e4e5a6f | 89 | |
93a37866 A |
90 | #if !OS(WINDOWS) && CPU(X86_64) |
91 | struct JITStackFrame { | |
92 | void* reserved; // Unused | |
93 | JITStubArg args[6]; | |
94 | void* padding[2]; // Maintain 32-byte stack alignment (possibly overkill). | |
95 | ||
96 | void* code; | |
97 | JSStack* stack; | |
98 | CallFrame* callFrame; | |
99 | void* unused1; | |
100 | void* unused2; | |
101 | VM* vm; | |
102 | ||
103 | void* savedRBX; | |
104 | void* savedR15; | |
105 | void* savedR14; | |
106 | void* savedR13; | |
107 | void* savedR12; | |
108 | void* savedRBP; | |
109 | void* savedRIP; | |
110 | ||
111 | // When JIT code makes a call, it pushes its return address just below the rest of the stack. | |
112 | ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; } | |
113 | }; | |
114 | #elif CPU(ARM64) | |
115 | struct JITStackFrame { | |
116 | JITStubArg args[6]; | |
117 | ||
118 | ReturnAddressPtr thunkReturnAddress; | |
119 | ||
120 | void* preservedReturnAddress; | |
121 | void* preservedX19; | |
122 | void* preservedX20; | |
123 | void* preservedX21; | |
124 | void* preservedX22; | |
125 | void* preservedX23; | |
126 | void* preservedX24; | |
127 | void* preservedX25; | |
128 | void* preservedX26; | |
129 | void* preservedX27; | |
130 | void* preservedX28; | |
131 | ||
132 | JSStack* stack; | |
133 | CallFrame* callFrame; | |
134 | LegacyProfiler** enabledProfilerReference; | |
135 | VM* vm; | |
136 | ||
137 | ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; } | |
138 | }; | |
139 | #elif OS(WINDOWS) && CPU(X86_64) | |
140 | struct JITStackFrame { | |
141 | void* shadow[4]; // Shadow space reserved for a callee's parameters home addresses | |
142 | void* reserved; // Unused, also maintains the 16-bytes stack alignment | |
143 | JITStubArg args[6]; | |
144 | ||
145 | void* savedRBX; | |
146 | void* savedR15; | |
147 | void* savedR14; | |
148 | void* savedR13; | |
149 | void* savedR12; | |
150 | void* savedRBP; | |
151 | void* savedRIP; | |
152 | ||
153 | // Home addresses for our register passed parameters | |
154 | // http://msdn.microsoft.com/en-us/library/ew5tede7.aspx | |
155 | void* code; | |
156 | JSStack* stack; | |
157 | CallFrame* callFrame; | |
158 | void* unused1; | |
159 | ||
160 | // Passed on the stack | |
161 | void* unused2; | |
162 | VM* vm; | |
163 | ||
164 | // When JIT code makes a call, it pushes its return address just below the rest of the stack. | |
165 | ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; } | |
166 | }; | |
f9bf01c6 | 167 | #elif CPU(X86) |
4e4e5a6f | 168 | #if COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC)) |
ba379fdc A |
169 | #pragma pack(push) |
170 | #pragma pack(4) | |
4e4e5a6f | 171 | #endif // COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC)) |
93a37866 A |
172 | struct JITStackFrame { |
173 | void* reserved; // Unused | |
174 | JITStubArg args[6]; | |
ba379fdc | 175 | #if USE(JSVALUE32_64) |
93a37866 | 176 | void* padding[2]; // Maintain 16-byte stack alignment. |
ba379fdc A |
177 | #endif |
178 | ||
93a37866 A |
179 | void* savedEBX; |
180 | void* savedEDI; | |
181 | void* savedESI; | |
182 | void* savedEBP; | |
183 | void* savedEIP; | |
184 | ||
185 | void* code; | |
186 | JSStack* stack; | |
187 | CallFrame* callFrame; | |
188 | void* unused1; | |
189 | void* unused2; | |
190 | VM* vm; | |
ba379fdc | 191 | |
93a37866 A |
192 | // When JIT code makes a call, it pushes its return address just below the rest of the stack. |
193 | ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; } | |
194 | }; | |
4e4e5a6f | 195 | #if COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC)) |
ba379fdc | 196 | #pragma pack(pop) |
4e4e5a6f | 197 | #endif // COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC)) |
f9bf01c6 | 198 | #elif CPU(ARM_THUMB2) |
93a37866 A |
199 | struct JITStackFrame { |
200 | JITStubArg reserved; // Unused | |
201 | JITStubArg args[6]; | |
202 | ||
203 | ReturnAddressPtr thunkReturnAddress; | |
204 | ||
205 | void* preservedReturnAddress; | |
206 | void* preservedR4; | |
207 | void* preservedR5; | |
208 | void* preservedR6; | |
209 | void* preservedR7; | |
210 | void* preservedR8; | |
211 | void* preservedR9; | |
212 | void* preservedR10; | |
213 | void* preservedR11; | |
214 | ||
215 | // These arguments passed in r1..r3 (r0 contained the entry code pointed, which is not preserved) | |
216 | JSStack* stack; | |
217 | CallFrame* callFrame; | |
218 | ||
219 | // These arguments passed on the stack. | |
220 | void* unused1; | |
221 | VM* vm; | |
ba379fdc | 222 | |
93a37866 A |
223 | ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; } |
224 | }; | |
f9bf01c6 | 225 | #elif CPU(ARM_TRADITIONAL) |
14957cd0 A |
226 | #if COMPILER(MSVC) |
227 | #pragma pack(push) | |
228 | #pragma pack(4) | |
229 | #endif // COMPILER(MSVC) | |
93a37866 A |
230 | struct JITStackFrame { |
231 | JITStubArg padding; // Unused | |
232 | JITStubArg args[7]; | |
233 | ||
234 | ReturnAddressPtr thunkReturnAddress; | |
235 | ||
236 | void* preservedR4; | |
237 | void* preservedR5; | |
238 | void* preservedR6; | |
239 | void* preservedR8; | |
240 | void* preservedR9; | |
241 | void* preservedR10; | |
242 | void* preservedR11; | |
243 | void* preservedLink; | |
244 | ||
245 | JSStack* stack; | |
246 | CallFrame* callFrame; | |
247 | void* unused1; | |
248 | ||
249 | // These arguments passed on the stack. | |
250 | void* unused2; | |
251 | VM* vm; | |
252 | ||
253 | // When JIT code makes a call, it pushes its return address just below the rest of the stack. | |
254 | ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; } | |
255 | }; | |
14957cd0 A |
256 | #if COMPILER(MSVC) |
257 | #pragma pack(pop) | |
258 | #endif // COMPILER(MSVC) | |
4e4e5a6f | 259 | #elif CPU(MIPS) |
93a37866 A |
260 | struct JITStackFrame { |
261 | JITStubArg reserved; // Unused | |
262 | JITStubArg args[6]; | |
4e4e5a6f | 263 | |
14957cd0 | 264 | #if USE(JSVALUE32_64) |
93a37866 | 265 | void* padding; // Make the overall stack length 8-byte aligned. |
14957cd0 A |
266 | #endif |
267 | ||
93a37866 A |
268 | void* preservedGP; // store GP when using PIC code |
269 | void* preservedS0; | |
270 | void* preservedS1; | |
271 | void* preservedS2; | |
272 | void* preservedS3; | |
273 | void* preservedS4; | |
274 | void* preservedReturnAddress; | |
4e4e5a6f | 275 | |
93a37866 | 276 | ReturnAddressPtr thunkReturnAddress; |
4e4e5a6f | 277 | |
93a37866 A |
278 | // These arguments passed in a1..a3 (a0 contained the entry code pointed, which is not preserved) |
279 | JSStack* stack; | |
280 | CallFrame* callFrame; | |
281 | void* unused1; | |
4e4e5a6f | 282 | |
93a37866 A |
283 | // These arguments passed on the stack. |
284 | void* unused2; | |
285 | VM* vm; | |
4e4e5a6f | 286 | |
93a37866 A |
287 | ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; } |
288 | }; | |
14957cd0 | 289 | #elif CPU(SH4) |
93a37866 A |
290 | struct JITStackFrame { |
291 | JITStubArg padding; // Unused | |
292 | JITStubArg args[6]; | |
293 | ||
294 | ReturnAddressPtr thunkReturnAddress; | |
295 | void* savedR10; | |
296 | void* savedR11; | |
297 | void* savedR13; | |
298 | void* savedRPR; | |
299 | void* savedR14; | |
300 | ||
301 | JSStack* stack; | |
302 | CallFrame* callFrame; | |
303 | JSValue* exception; | |
304 | void* unused1; | |
305 | VM* vm; | |
306 | ||
307 | ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; } | |
308 | }; | |
ba379fdc A |
309 | #else |
310 | #error "JITStackFrame not defined for this platform." | |
311 | #endif | |
312 | ||
f9bf01c6 A |
313 | #define JITSTACKFRAME_ARGS_INDEX (OBJECT_OFFSETOF(JITStackFrame, args) / sizeof(void*)) |
314 | ||
14957cd0 A |
315 | #define STUB_ARGS_DECLARATION void** args |
316 | #define STUB_ARGS (args) | |
ba379fdc | 317 | |
14957cd0 | 318 | #if CPU(X86) |
93a37866 A |
319 | #if COMPILER(MSVC) |
320 | #define JIT_STUB __fastcall | |
321 | #elif COMPILER(GCC) | |
322 | #define JIT_STUB __attribute__ ((fastcall)) | |
323 | #elif COMPILER(SUNCC) | |
324 | #define JIT_STUB | |
325 | #else | |
326 | #error "JIT_STUB function calls require fastcall conventions on x86, add appropriate directive/attribute here for your compiler!" | |
327 | #endif | |
ba379fdc | 328 | #else |
93a37866 | 329 | #define JIT_STUB |
ba379fdc A |
330 | #endif |
331 | ||
93a37866 A |
332 | extern "C" void ctiVMThrowTrampoline(); |
333 | extern "C" void ctiOpThrowNotCaught(); | |
334 | extern "C" EncodedJSValue ctiTrampoline(void* code, JSStack*, CallFrame*, void* /*unused1*/, void* /*unused2*/, VM*); | |
6fe7ccc8 | 335 | #if ENABLE(DFG_JIT) |
93a37866 | 336 | extern "C" void ctiTrampolineEnd(); |
6fe7ccc8 | 337 | |
93a37866 A |
338 | inline bool returnAddressIsInCtiTrampoline(ReturnAddressPtr returnAddress) |
339 | { | |
340 | return returnAddress.value() >= bitwise_cast<void*>(&ctiTrampoline) | |
341 | && returnAddress.value() < bitwise_cast<void*>(&ctiTrampolineEnd); | |
342 | } | |
6fe7ccc8 | 343 | #endif |
ba379fdc | 344 | |
93a37866 | 345 | void performPlatformSpecificJITAssertions(VM*); |
ba379fdc A |
346 | |
347 | extern "C" { | |
93a37866 A |
348 | EncodedJSValue JIT_STUB cti_op_add(STUB_ARGS_DECLARATION) WTF_INTERNAL; |
349 | EncodedJSValue JIT_STUB cti_op_bitand(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
350 | EncodedJSValue JIT_STUB cti_op_bitor(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
351 | EncodedJSValue JIT_STUB cti_op_bitxor(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
352 | EncodedJSValue JIT_STUB cti_op_call_NotJSFunction(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
353 | EncodedJSValue JIT_STUB cti_op_call_eval(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
354 | EncodedJSValue JIT_STUB cti_op_construct_NotJSConstruct(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
355 | EncodedJSValue JIT_STUB cti_op_check_has_instance(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
356 | EncodedJSValue JIT_STUB cti_op_create_this(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
357 | EncodedJSValue JIT_STUB cti_op_convert_this(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
358 | EncodedJSValue JIT_STUB cti_op_create_arguments(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
359 | EncodedJSValue JIT_STUB cti_op_del_by_id(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
360 | EncodedJSValue JIT_STUB cti_op_del_by_val(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
361 | EncodedJSValue JIT_STUB cti_op_div(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
362 | EncodedJSValue JIT_STUB cti_op_get_by_id(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
363 | EncodedJSValue JIT_STUB cti_op_get_by_id_array_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
364 | EncodedJSValue JIT_STUB cti_op_get_by_id_custom_stub(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
365 | EncodedJSValue JIT_STUB cti_op_get_by_id_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
366 | EncodedJSValue JIT_STUB cti_op_get_by_id_getter_stub(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
367 | EncodedJSValue JIT_STUB cti_op_get_by_id_proto_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
368 | EncodedJSValue JIT_STUB cti_op_get_by_id_proto_list(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
369 | EncodedJSValue JIT_STUB cti_op_get_by_id_proto_list_full(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
370 | EncodedJSValue JIT_STUB cti_op_get_by_id_self_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
371 | EncodedJSValue JIT_STUB cti_op_get_by_id_string_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
372 | EncodedJSValue JIT_STUB cti_op_get_by_val(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
373 | EncodedJSValue JIT_STUB cti_op_get_by_val_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
374 | EncodedJSValue JIT_STUB cti_op_get_by_val_string(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
375 | EncodedJSValue JIT_STUB cti_op_in(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
376 | EncodedJSValue JIT_STUB cti_op_instanceof(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
377 | EncodedJSValue JIT_STUB cti_op_is_boolean(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
378 | EncodedJSValue JIT_STUB cti_op_is_function(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
379 | EncodedJSValue JIT_STUB cti_op_is_number(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
380 | EncodedJSValue JIT_STUB cti_op_is_object(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
381 | EncodedJSValue JIT_STUB cti_op_is_string(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
382 | EncodedJSValue JIT_STUB cti_op_is_undefined(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
383 | EncodedJSValue JIT_STUB cti_op_less(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
384 | EncodedJSValue JIT_STUB cti_op_lesseq(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
385 | EncodedJSValue JIT_STUB cti_op_greater(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
386 | EncodedJSValue JIT_STUB cti_op_greatereq(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
387 | EncodedJSValue JIT_STUB cti_op_lshift(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
388 | EncodedJSValue JIT_STUB cti_op_mod(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
389 | EncodedJSValue JIT_STUB cti_op_mul(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
390 | EncodedJSValue JIT_STUB cti_op_negate(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
391 | EncodedJSValue JIT_STUB cti_op_not(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
392 | EncodedJSValue JIT_STUB cti_op_nstricteq(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
393 | EncodedJSValue JIT_STUB cti_op_dec(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
394 | EncodedJSValue JIT_STUB cti_op_inc(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
395 | EncodedJSValue JIT_STUB cti_op_resolve(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
396 | EncodedJSValue JIT_STUB cti_op_resolve_base(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
397 | EncodedJSValue JIT_STUB cti_op_resolve_base_strict_put(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
398 | EncodedJSValue JIT_STUB cti_op_resolve_with_base(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
399 | EncodedJSValue JIT_STUB cti_op_resolve_with_this(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
400 | void JIT_STUB cti_op_put_to_base(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
401 | EncodedJSValue JIT_STUB cti_op_rshift(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
402 | EncodedJSValue JIT_STUB cti_op_strcat(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
403 | EncodedJSValue JIT_STUB cti_op_stricteq(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
404 | EncodedJSValue JIT_STUB cti_op_sub(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
405 | EncodedJSValue JIT_STUB cti_op_to_number(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
406 | EncodedJSValue JIT_STUB cti_op_to_primitive(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
407 | EncodedJSValue JIT_STUB cti_op_typeof(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
408 | EncodedJSValue JIT_STUB cti_op_urshift(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
409 | EncodedJSValue JIT_STUB cti_to_object(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
410 | JSObject* JIT_STUB cti_op_new_array(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
411 | JSObject* JIT_STUB cti_op_new_array_with_size(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
412 | JSObject* JIT_STUB cti_op_new_array_buffer(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
413 | JSObject* JIT_STUB cti_op_new_func(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
414 | JSObject* JIT_STUB cti_op_new_func_exp(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
415 | JSObject* JIT_STUB cti_op_new_object(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
416 | JSObject* JIT_STUB cti_op_new_regexp(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
417 | JSObject* JIT_STUB cti_op_push_activation(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
418 | void JIT_STUB cti_op_push_name_scope(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
419 | void JIT_STUB cti_op_push_with_scope(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
420 | JSObject* JIT_STUB cti_op_put_by_id_transition_realloc(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
421 | JSPropertyNameIterator* JIT_STUB cti_op_get_pnames(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
422 | int JIT_STUB cti_op_eq(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
423 | int JIT_STUB cti_op_eq_strings(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
424 | int JIT_STUB cti_op_jless(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
425 | int JIT_STUB cti_op_jlesseq(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
426 | int JIT_STUB cti_op_jgreater(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
427 | int JIT_STUB cti_op_jgreatereq(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
428 | int JIT_STUB cti_op_jtrue(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
429 | void* JIT_STUB cti_op_load_varargs(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
430 | void JIT_STUB cti_handle_watchdog_timer(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
431 | int JIT_STUB cti_has_property(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
432 | void JIT_STUB cti_op_debug(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
433 | void JIT_STUB cti_op_end(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
434 | void JIT_STUB cti_op_pop_scope(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
435 | void JIT_STUB cti_op_profile_did_call(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
436 | void JIT_STUB cti_op_profile_will_call(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
437 | void JIT_STUB cti_op_put_by_id(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
438 | void JIT_STUB cti_op_put_by_id_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
439 | void JIT_STUB cti_op_put_by_id_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
440 | void JIT_STUB cti_op_put_by_id_direct(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
441 | void JIT_STUB cti_op_put_by_id_direct_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
442 | void JIT_STUB cti_op_put_by_id_direct_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
443 | void JIT_STUB cti_op_put_by_index(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
444 | void JIT_STUB cti_op_put_by_val(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
445 | void JIT_STUB cti_op_put_by_val_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
446 | void JIT_STUB cti_op_put_getter_setter(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
447 | void JIT_STUB cti_op_init_global_const_check(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
448 | void JIT_STUB cti_op_tear_off_activation(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
449 | void JIT_STUB cti_op_tear_off_arguments(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
450 | void JIT_STUB cti_op_throw_static_error(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
6fe7ccc8 | 451 | #if ENABLE(DFG_JIT) |
93a37866 | 452 | void JIT_STUB cti_optimize(STUB_ARGS_DECLARATION) WTF_INTERNAL; |
6fe7ccc8 | 453 | #endif |
93a37866 A |
454 | void* JIT_STUB cti_op_call_arityCheck(STUB_ARGS_DECLARATION) WTF_INTERNAL; |
455 | void* JIT_STUB cti_op_construct_arityCheck(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
456 | void* JIT_STUB cti_op_call_jitCompile(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
457 | void* JIT_STUB cti_op_construct_jitCompile(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
458 | void* JIT_STUB cti_op_switch_char(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
459 | void* JIT_STUB cti_op_switch_imm(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
460 | void* JIT_STUB cti_op_switch_string(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
461 | void* JIT_STUB cti_op_throw(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
462 | void* JIT_STUB cti_stack_check(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
463 | void* JIT_STUB cti_vm_lazyLinkCall(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
464 | void* JIT_STUB cti_vm_lazyLinkClosureCall(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
465 | void* JIT_STUB cti_vm_lazyLinkConstruct(STUB_ARGS_DECLARATION) WTF_INTERNAL; | |
466 | void* JIT_STUB cti_vm_throw(STUB_ARGS_DECLARATION) REFERENCED_FROM_ASM WTF_INTERNAL; | |
ba379fdc A |
467 | } // extern "C" |
468 | ||
93a37866 A |
469 | #elif ENABLE(LLINT_C_LOOP) |
470 | ||
471 | struct JITStackFrame { | |
472 | VM* vm; | |
473 | }; | |
474 | ||
475 | #endif // ENABLE(LLINT_C_LOOP) | |
ba379fdc | 476 | |
6fe7ccc8 A |
477 | } // namespace JSC |
478 | ||
ba379fdc | 479 | #endif // JITStubs_h |