890d99747ddf31f3dc2fbcfffd3765c8ea6254b5
[WebKit-https.git] / Source / JavaScriptCore / jit / JITStubs.h
1 /*
2  * Copyright (C) 2008 Apple Inc. All rights reserved.
3  * Copyright (C) Research In Motion Limited 2010. All rights reserved.
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
33 #include "CallData.h"
34 #include "Intrinsic.h"
35 #include "MacroAssemblerCodeRef.h"
36 #include "Register.h"
37 #include "ThunkGenerators.h"
38 #include <wtf/HashMap.h>
39
40 namespace JSC {
41
42     struct StructureStubInfo;
43
44     class CodeBlock;
45     class ExecutablePool;
46     class FunctionExecutable;
47     class Identifier;
48     class JSGlobalData;
49     class JSGlobalObject;
50     class JSObject;
51     class JSPropertyNameIterator;
52     class JSValue;
53     class JSValueEncodedAsPointer;
54     class NativeExecutable;
55     class Profiler;
56     class PropertySlot;
57     class PutPropertySlot;
58     class RegisterFile;
59     class RegExp;
60     class Structure;
61
62     template <typename T> class Weak;
63
64     union JITStubArg {
65         void* asPointer;
66         EncodedJSValue asEncodedJSValue;
67         int32_t asInt32;
68
69         JSValue jsValue() { return JSValue::decode(asEncodedJSValue); }
70         JSObject* jsObject() { return static_cast<JSObject*>(asPointer); }
71         Register* reg() { return static_cast<Register*>(asPointer); }
72         Identifier& identifier() { return *static_cast<Identifier*>(asPointer); }
73         int32_t int32() { return asInt32; }
74         CodeBlock* codeBlock() { return static_cast<CodeBlock*>(asPointer); }
75         FunctionExecutable* function() { return static_cast<FunctionExecutable*>(asPointer); }
76         RegExp* regExp() { return static_cast<RegExp*>(asPointer); }
77         JSPropertyNameIterator* propertyNameIterator() { return static_cast<JSPropertyNameIterator*>(asPointer); }
78         JSGlobalObject* globalObject() { return static_cast<JSGlobalObject*>(asPointer); }
79         JSString* jsString() { return static_cast<JSString*>(asPointer); }
80         Structure* structure() { return static_cast<Structure*>(asPointer); }
81         ReturnAddressPtr returnAddress() { return ReturnAddressPtr(asPointer); }
82     };
83     
84     struct TrampolineStructure {
85         MacroAssemblerCodePtr ctiStringLengthTrampoline;
86         MacroAssemblerCodePtr ctiVirtualCallLink;
87         MacroAssemblerCodePtr ctiVirtualConstructLink;
88         MacroAssemblerCodePtr ctiVirtualCall;
89         MacroAssemblerCodePtr ctiVirtualConstruct;
90         MacroAssemblerCodePtr ctiNativeCall;
91         MacroAssemblerCodePtr ctiNativeConstruct;
92         MacroAssemblerCodePtr ctiSoftModulo;
93     };
94
95 #if CPU(X86_64)
96     struct JITStackFrame {
97         void* reserved; // Unused
98         JITStubArg args[6];
99         void* padding[2]; // Maintain 32-byte stack alignment (possibly overkill).
100
101         void* code;
102         RegisterFile* registerFile;
103         CallFrame* callFrame;
104         void* unused1;
105         Profiler** enabledProfilerReference;
106         JSGlobalData* globalData;
107
108         void* savedRBX;
109         void* savedR15;
110         void* savedR14;
111         void* savedR13;
112         void* savedR12;
113         void* savedRBP;
114         void* savedRIP;
115
116         // When JIT code makes a call, it pushes its return address just below the rest of the stack.
117         ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; }
118     };
119 #elif CPU(X86)
120 #if COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC))
121 #pragma pack(push)
122 #pragma pack(4)
123 #endif // COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC))
124     struct JITStackFrame {
125         void* reserved; // Unused
126         JITStubArg args[6];
127 #if USE(JSVALUE32_64)
128         void* padding[2]; // Maintain 16-byte stack alignment.
129 #endif
130
131         void* savedEBX;
132         void* savedEDI;
133         void* savedESI;
134         void* savedEBP;
135         void* savedEIP;
136
137         void* code;
138         RegisterFile* registerFile;
139         CallFrame* callFrame;
140         void* unused1;
141         Profiler** enabledProfilerReference;
142         JSGlobalData* globalData;
143         
144         // When JIT code makes a call, it pushes its return address just below the rest of the stack.
145         ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; }
146     };
147 #if COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC))
148 #pragma pack(pop)
149 #endif // COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC))
150 #elif CPU(ARM_THUMB2)
151     struct JITStackFrame {
152         JITStubArg reserved; // Unused
153         JITStubArg args[6];
154
155         ReturnAddressPtr thunkReturnAddress;
156
157         void* preservedReturnAddress;
158         void* preservedR4;
159         void* preservedR5;
160         void* preservedR6;
161         void* preservedR7;
162         void* preservedR8;
163         void* preservedR9;
164         void* preservedR10;
165         void* preservedR11;
166
167         // These arguments passed in r1..r3 (r0 contained the entry code pointed, which is not preserved)
168         RegisterFile* registerFile;
169         CallFrame* callFrame;
170
171         // These arguments passed on the stack.
172         Profiler** enabledProfilerReference;
173         JSGlobalData* globalData;
174         
175         ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; }
176     };
177 #elif CPU(ARM_TRADITIONAL)
178 #if COMPILER(MSVC)
179 #pragma pack(push)
180 #pragma pack(4)
181 #endif // COMPILER(MSVC)
182     struct JITStackFrame {
183         JITStubArg padding; // Unused
184         JITStubArg args[7];
185
186         ReturnAddressPtr thunkReturnAddress;
187
188         void* preservedR4;
189         void* preservedR5;
190         void* preservedR6;
191         void* preservedR7;
192         void* preservedR8;
193         void* preservedLink;
194
195         RegisterFile* registerFile;
196         CallFrame* callFrame;
197         void* unused1;
198
199         // These arguments passed on the stack.
200         Profiler** enabledProfilerReference;
201         JSGlobalData* globalData;
202
203         // When JIT code makes a call, it pushes its return address just below the rest of the stack.
204         ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; }
205     };
206 #if COMPILER(MSVC)
207 #pragma pack(pop)
208 #endif // COMPILER(MSVC)
209 #elif CPU(MIPS)
210     struct JITStackFrame {
211         JITStubArg reserved; // Unused
212         JITStubArg args[6];
213
214 #if USE(JSVALUE32_64)
215         void* padding; // Make the overall stack length 8-byte aligned.
216 #endif
217
218         void* preservedGP; // store GP when using PIC code
219         void* preservedS0;
220         void* preservedS1;
221         void* preservedS2;
222         void* preservedReturnAddress;
223
224         ReturnAddressPtr thunkReturnAddress;
225
226         // These arguments passed in a1..a3 (a0 contained the entry code pointed, which is not preserved)
227         RegisterFile* registerFile;
228         CallFrame* callFrame;
229         void* unused1;
230
231         // These arguments passed on the stack.
232         Profiler** enabledProfilerReference;
233         JSGlobalData* globalData;
234
235         ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; }
236     };
237 #elif CPU(SH4)
238     struct JITStackFrame {
239         JITStubArg padding; // Unused
240         JITStubArg args[6];
241
242         ReturnAddressPtr thunkReturnAddress;
243         void* savedR10;
244         void* savedR11;
245         void* savedR13;
246         void* savedRPR;
247         void* savedR14;
248         void* savedTimeoutReg;
249
250         RegisterFile* registerFile;
251         CallFrame* callFrame;
252         JSValue* exception;
253         Profiler** enabledProfilerReference;
254         JSGlobalData* globalData;
255
256         ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; }
257     };
258 #else
259 #error "JITStackFrame not defined for this platform."
260 #endif
261
262 #define JITSTACKFRAME_ARGS_INDEX (OBJECT_OFFSETOF(JITStackFrame, args) / sizeof(void*))
263
264 #if ENABLE(JIT)
265
266 #define STUB_ARGS_DECLARATION void** args
267 #define STUB_ARGS (args)
268
269 #if CPU(X86)
270     #if COMPILER(MSVC)
271     #define JIT_STUB __fastcall
272     #elif COMPILER(GCC)
273     #define JIT_STUB  __attribute__ ((fastcall))
274     #elif COMPILER(SUNCC)
275     #define JIT_STUB
276     #else
277     #error "JIT_STUB function calls require fastcall conventions on x86, add appropriate directive/attribute here for your compiler!"
278     #endif
279 #else
280     #define JIT_STUB
281 #endif
282
283     extern "C" void ctiVMThrowTrampoline();
284     extern "C" void ctiOpThrowNotCaught();
285     extern "C" EncodedJSValue ctiTrampoline(void* code, RegisterFile*, CallFrame*, void* /*unused1*/, Profiler**, JSGlobalData*);
286 #if ENABLE(DFG_JIT)
287     extern "C" void ctiTrampolineEnd();
288
289     inline bool returnAddressIsInCtiTrampoline(ReturnAddressPtr returnAddress)
290     {
291         return returnAddress.value() >= bitwise_cast<void*>(&ctiTrampoline)
292             && returnAddress.value() < bitwise_cast<void*>(&ctiTrampolineEnd);
293     }
294 #endif
295
296     class JITThunks {
297     public:
298         JITThunks(JSGlobalData*);
299         ~JITThunks();
300
301         static void tryCacheGetByID(CallFrame*, CodeBlock*, ReturnAddressPtr returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot&, StructureStubInfo* stubInfo);
302         static void tryCachePutByID(CallFrame*, CodeBlock*, ReturnAddressPtr returnAddress, JSValue baseValue, const PutPropertySlot&, StructureStubInfo* stubInfo, bool direct);
303
304         MacroAssemblerCodePtr ctiStringLengthTrampoline() { return m_trampolineStructure.ctiStringLengthTrampoline; }
305         MacroAssemblerCodePtr ctiVirtualCallLink() { return m_trampolineStructure.ctiVirtualCallLink; }
306         MacroAssemblerCodePtr ctiVirtualConstructLink() { return m_trampolineStructure.ctiVirtualConstructLink; }
307         MacroAssemblerCodePtr ctiVirtualCall() { return m_trampolineStructure.ctiVirtualCall; }
308         MacroAssemblerCodePtr ctiVirtualConstruct() { return m_trampolineStructure.ctiVirtualConstruct; }
309         MacroAssemblerCodePtr ctiNativeCall() { return m_trampolineStructure.ctiNativeCall; }
310         MacroAssemblerCodePtr ctiNativeConstruct() { return m_trampolineStructure.ctiNativeConstruct; }
311         MacroAssemblerCodePtr ctiSoftModulo() { return m_trampolineStructure.ctiSoftModulo; }
312
313         MacroAssemblerCodeRef ctiStub(JSGlobalData*, ThunkGenerator);
314
315         NativeExecutable* hostFunctionStub(JSGlobalData*, NativeFunction, NativeFunction constructor);
316         NativeExecutable* hostFunctionStub(JSGlobalData*, NativeFunction, ThunkGenerator, Intrinsic);
317
318         void clearHostFunctionStubs();
319
320     private:
321         typedef HashMap<ThunkGenerator, MacroAssemblerCodeRef> CTIStubMap;
322         CTIStubMap m_ctiStubMap;
323         typedef HashMap<NativeFunction, Weak<NativeExecutable> > HostFunctionStubMap;
324         OwnPtr<HostFunctionStubMap> m_hostFunctionStubMap;
325         RefPtr<ExecutableMemoryHandle> m_executableMemory;
326
327         TrampolineStructure m_trampolineStructure;
328     };
329
330 extern "C" {
331     EncodedJSValue JIT_STUB cti_op_add(STUB_ARGS_DECLARATION);
332     EncodedJSValue JIT_STUB cti_op_bitand(STUB_ARGS_DECLARATION);
333     EncodedJSValue JIT_STUB cti_op_bitnot(STUB_ARGS_DECLARATION);
334     EncodedJSValue JIT_STUB cti_op_bitor(STUB_ARGS_DECLARATION);
335     EncodedJSValue JIT_STUB cti_op_bitxor(STUB_ARGS_DECLARATION);
336     EncodedJSValue JIT_STUB cti_op_call_NotJSFunction(STUB_ARGS_DECLARATION);
337     EncodedJSValue JIT_STUB cti_op_call_eval(STUB_ARGS_DECLARATION);
338     EncodedJSValue JIT_STUB cti_op_construct_NotJSConstruct(STUB_ARGS_DECLARATION);
339     EncodedJSValue JIT_STUB cti_op_create_this(STUB_ARGS_DECLARATION);
340     EncodedJSValue JIT_STUB cti_op_convert_this(STUB_ARGS_DECLARATION);
341     EncodedJSValue JIT_STUB cti_op_create_arguments(STUB_ARGS_DECLARATION);
342     EncodedJSValue JIT_STUB cti_op_del_by_id(STUB_ARGS_DECLARATION);
343     EncodedJSValue JIT_STUB cti_op_del_by_val(STUB_ARGS_DECLARATION);
344     EncodedJSValue JIT_STUB cti_op_div(STUB_ARGS_DECLARATION);
345     EncodedJSValue JIT_STUB cti_op_get_by_id(STUB_ARGS_DECLARATION);
346     EncodedJSValue JIT_STUB cti_op_get_by_id_array_fail(STUB_ARGS_DECLARATION);
347     EncodedJSValue JIT_STUB cti_op_get_by_id_custom_stub(STUB_ARGS_DECLARATION);
348     EncodedJSValue JIT_STUB cti_op_get_by_id_generic(STUB_ARGS_DECLARATION);
349     EncodedJSValue JIT_STUB cti_op_get_by_id_getter_stub(STUB_ARGS_DECLARATION);
350     EncodedJSValue JIT_STUB cti_op_get_by_id_method_check(STUB_ARGS_DECLARATION);
351     EncodedJSValue JIT_STUB cti_op_get_by_id_method_check_update(STUB_ARGS_DECLARATION);
352     EncodedJSValue JIT_STUB cti_op_get_by_id_proto_fail(STUB_ARGS_DECLARATION);
353     EncodedJSValue JIT_STUB cti_op_get_by_id_proto_list(STUB_ARGS_DECLARATION);
354     EncodedJSValue JIT_STUB cti_op_get_by_id_proto_list_full(STUB_ARGS_DECLARATION);
355     EncodedJSValue JIT_STUB cti_op_get_by_id_self_fail(STUB_ARGS_DECLARATION);
356     EncodedJSValue JIT_STUB cti_op_get_by_id_string_fail(STUB_ARGS_DECLARATION);
357     EncodedJSValue JIT_STUB cti_op_get_by_val(STUB_ARGS_DECLARATION);
358     EncodedJSValue JIT_STUB cti_op_get_by_val_byte_array(STUB_ARGS_DECLARATION);
359     EncodedJSValue JIT_STUB cti_op_get_by_val_string(STUB_ARGS_DECLARATION);
360     EncodedJSValue JIT_STUB cti_op_in(STUB_ARGS_DECLARATION);
361     EncodedJSValue JIT_STUB cti_op_instanceof(STUB_ARGS_DECLARATION);
362     EncodedJSValue JIT_STUB cti_op_is_boolean(STUB_ARGS_DECLARATION);
363     EncodedJSValue JIT_STUB cti_op_is_function(STUB_ARGS_DECLARATION);
364     EncodedJSValue JIT_STUB cti_op_is_number(STUB_ARGS_DECLARATION);
365     EncodedJSValue JIT_STUB cti_op_is_object(STUB_ARGS_DECLARATION);
366     EncodedJSValue JIT_STUB cti_op_is_string(STUB_ARGS_DECLARATION);
367     EncodedJSValue JIT_STUB cti_op_is_undefined(STUB_ARGS_DECLARATION);
368     EncodedJSValue JIT_STUB cti_op_less(STUB_ARGS_DECLARATION);
369     EncodedJSValue JIT_STUB cti_op_lesseq(STUB_ARGS_DECLARATION);
370     EncodedJSValue JIT_STUB cti_op_greater(STUB_ARGS_DECLARATION);
371     EncodedJSValue JIT_STUB cti_op_greatereq(STUB_ARGS_DECLARATION);
372     EncodedJSValue JIT_STUB cti_op_lshift(STUB_ARGS_DECLARATION);
373     EncodedJSValue JIT_STUB cti_op_mod(STUB_ARGS_DECLARATION);
374     EncodedJSValue JIT_STUB cti_op_mul(STUB_ARGS_DECLARATION);
375     EncodedJSValue JIT_STUB cti_op_negate(STUB_ARGS_DECLARATION);
376     EncodedJSValue JIT_STUB cti_op_not(STUB_ARGS_DECLARATION);
377     EncodedJSValue JIT_STUB cti_op_nstricteq(STUB_ARGS_DECLARATION);
378     EncodedJSValue JIT_STUB cti_op_post_dec(STUB_ARGS_DECLARATION);
379     EncodedJSValue JIT_STUB cti_op_post_inc(STUB_ARGS_DECLARATION);
380     EncodedJSValue JIT_STUB cti_op_pre_dec(STUB_ARGS_DECLARATION);
381     EncodedJSValue JIT_STUB cti_op_pre_inc(STUB_ARGS_DECLARATION);
382     EncodedJSValue JIT_STUB cti_op_resolve(STUB_ARGS_DECLARATION);
383     EncodedJSValue JIT_STUB cti_op_resolve_base(STUB_ARGS_DECLARATION);
384     EncodedJSValue JIT_STUB cti_op_resolve_base_strict_put(STUB_ARGS_DECLARATION);
385     EncodedJSValue JIT_STUB cti_op_ensure_property_exists(STUB_ARGS_DECLARATION);
386     EncodedJSValue JIT_STUB cti_op_resolve_global(STUB_ARGS_DECLARATION);
387     EncodedJSValue JIT_STUB cti_op_resolve_global_dynamic(STUB_ARGS_DECLARATION);
388     EncodedJSValue JIT_STUB cti_op_resolve_skip(STUB_ARGS_DECLARATION);
389     EncodedJSValue JIT_STUB cti_op_resolve_with_base(STUB_ARGS_DECLARATION);
390     EncodedJSValue JIT_STUB cti_op_resolve_with_this(STUB_ARGS_DECLARATION);
391     EncodedJSValue JIT_STUB cti_op_rshift(STUB_ARGS_DECLARATION);
392     EncodedJSValue JIT_STUB cti_op_strcat(STUB_ARGS_DECLARATION);
393     EncodedJSValue JIT_STUB cti_op_stricteq(STUB_ARGS_DECLARATION);
394     EncodedJSValue JIT_STUB cti_op_sub(STUB_ARGS_DECLARATION);
395     EncodedJSValue JIT_STUB cti_op_to_jsnumber(STUB_ARGS_DECLARATION);
396     EncodedJSValue JIT_STUB cti_op_to_primitive(STUB_ARGS_DECLARATION);
397     EncodedJSValue JIT_STUB cti_op_typeof(STUB_ARGS_DECLARATION);
398     EncodedJSValue JIT_STUB cti_op_urshift(STUB_ARGS_DECLARATION);
399     EncodedJSValue JIT_STUB cti_to_object(STUB_ARGS_DECLARATION);
400     JSObject* JIT_STUB cti_op_new_array(STUB_ARGS_DECLARATION);
401     JSObject* JIT_STUB cti_op_new_array_buffer(STUB_ARGS_DECLARATION);
402     JSObject* JIT_STUB cti_op_new_func(STUB_ARGS_DECLARATION);
403     JSObject* JIT_STUB cti_op_new_func_exp(STUB_ARGS_DECLARATION);
404     JSObject* JIT_STUB cti_op_new_object(STUB_ARGS_DECLARATION);
405     JSObject* JIT_STUB cti_op_new_regexp(STUB_ARGS_DECLARATION);
406     JSObject* JIT_STUB cti_op_push_activation(STUB_ARGS_DECLARATION);
407     JSObject* JIT_STUB cti_op_push_new_scope(STUB_ARGS_DECLARATION);
408     JSObject* JIT_STUB cti_op_push_scope(STUB_ARGS_DECLARATION);
409     JSObject* JIT_STUB cti_op_put_by_id_transition_realloc(STUB_ARGS_DECLARATION);
410     JSPropertyNameIterator* JIT_STUB cti_op_get_pnames(STUB_ARGS_DECLARATION);
411     int JIT_STUB cti_op_eq(STUB_ARGS_DECLARATION);
412     int JIT_STUB cti_op_eq_strings(STUB_ARGS_DECLARATION);
413     int JIT_STUB cti_op_jless(STUB_ARGS_DECLARATION);
414     int JIT_STUB cti_op_jlesseq(STUB_ARGS_DECLARATION);
415     int JIT_STUB cti_op_jgreater(STUB_ARGS_DECLARATION);
416     int JIT_STUB cti_op_jgreatereq(STUB_ARGS_DECLARATION);
417     int JIT_STUB cti_op_jtrue(STUB_ARGS_DECLARATION);
418     void* JIT_STUB cti_op_load_varargs(STUB_ARGS_DECLARATION);
419     int JIT_STUB cti_timeout_check(STUB_ARGS_DECLARATION);
420     int JIT_STUB cti_has_property(STUB_ARGS_DECLARATION);
421     void JIT_STUB cti_op_check_has_instance(STUB_ARGS_DECLARATION);
422     void JIT_STUB cti_op_debug(STUB_ARGS_DECLARATION);
423     void JIT_STUB cti_op_end(STUB_ARGS_DECLARATION);
424     void JIT_STUB cti_op_jmp_scopes(STUB_ARGS_DECLARATION);
425     void JIT_STUB cti_op_pop_scope(STUB_ARGS_DECLARATION);
426     void JIT_STUB cti_op_profile_did_call(STUB_ARGS_DECLARATION);
427     void JIT_STUB cti_op_profile_will_call(STUB_ARGS_DECLARATION);
428     void JIT_STUB cti_op_put_by_id(STUB_ARGS_DECLARATION);
429     void JIT_STUB cti_op_put_by_id_fail(STUB_ARGS_DECLARATION);
430     void JIT_STUB cti_op_put_by_id_generic(STUB_ARGS_DECLARATION);
431     void JIT_STUB cti_op_put_by_id_direct(STUB_ARGS_DECLARATION);
432     void JIT_STUB cti_op_put_by_id_direct_fail(STUB_ARGS_DECLARATION);
433     void JIT_STUB cti_op_put_by_id_direct_generic(STUB_ARGS_DECLARATION);
434     void JIT_STUB cti_op_put_by_index(STUB_ARGS_DECLARATION);
435     void JIT_STUB cti_op_put_by_val(STUB_ARGS_DECLARATION);
436     void JIT_STUB cti_op_put_by_val_byte_array(STUB_ARGS_DECLARATION);
437     void JIT_STUB cti_op_put_getter_setter(STUB_ARGS_DECLARATION);
438     void JIT_STUB cti_op_tear_off_activation(STUB_ARGS_DECLARATION);
439     void JIT_STUB cti_op_tear_off_arguments(STUB_ARGS_DECLARATION);
440     void JIT_STUB cti_op_throw_reference_error(STUB_ARGS_DECLARATION);
441 #if ENABLE(DFG_JIT)
442     void JIT_STUB cti_optimize_from_loop(STUB_ARGS_DECLARATION);
443     void JIT_STUB cti_optimize_from_ret(STUB_ARGS_DECLARATION);
444 #endif
445     void* JIT_STUB cti_op_call_arityCheck(STUB_ARGS_DECLARATION);
446     void* JIT_STUB cti_op_construct_arityCheck(STUB_ARGS_DECLARATION);
447     void* JIT_STUB cti_op_call_jitCompile(STUB_ARGS_DECLARATION);
448     void* JIT_STUB cti_op_construct_jitCompile(STUB_ARGS_DECLARATION);
449     void* JIT_STUB cti_op_switch_char(STUB_ARGS_DECLARATION);
450     void* JIT_STUB cti_op_switch_imm(STUB_ARGS_DECLARATION);
451     void* JIT_STUB cti_op_switch_string(STUB_ARGS_DECLARATION);
452     void* JIT_STUB cti_op_throw(STUB_ARGS_DECLARATION);
453     void* JIT_STUB cti_register_file_check(STUB_ARGS_DECLARATION);
454     void* JIT_STUB cti_vm_lazyLinkCall(STUB_ARGS_DECLARATION);
455     void* JIT_STUB cti_vm_lazyLinkConstruct(STUB_ARGS_DECLARATION);
456     void* JIT_STUB cti_vm_throw(STUB_ARGS_DECLARATION);
457 } // extern "C"
458
459 #endif // ENABLE(JIT)
460
461 } // namespace JSC
462
463 #endif // JITStubs_h