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