JITStubs.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. /*
  2. * Copyright (C) 2008, 2013 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. #ifndef JITStubs_h
  30. #define JITStubs_h
  31. #include "CallData.h"
  32. #include "Intrinsic.h"
  33. #include "JITStubTypes.h"
  34. #include "LowLevelInterpreter.h"
  35. #include "MacroAssemblerCodeRef.h"
  36. #include "Register.h"
  37. #include "ResolveOperation.h"
  38. #include "JITStubEntries.h"
  39. namespace JSC {
  40. #if ENABLE(JIT)
  41. struct StructureStubInfo;
  42. class ArrayAllocationProfile;
  43. class CodeBlock;
  44. class ExecutablePool;
  45. class FunctionExecutable;
  46. class Identifier;
  47. class VM;
  48. class JSGlobalObject;
  49. class JSObject;
  50. class JSPropertyNameIterator;
  51. class JSStack;
  52. class JSValue;
  53. class JSValueEncodedAsPointer;
  54. class LegacyProfiler;
  55. class NativeExecutable;
  56. class PropertySlot;
  57. class PutPropertySlot;
  58. class RegExp;
  59. class Structure;
  60. template <typename T> class Weak;
  61. union JITStubArg {
  62. void* asPointer;
  63. EncodedJSValue asEncodedJSValue;
  64. int32_t asInt32;
  65. JSValue jsValue() { return JSValue::decode(asEncodedJSValue); }
  66. JSObject* jsObject() { return static_cast<JSObject*>(asPointer); }
  67. Register* reg() { return static_cast<Register*>(asPointer); }
  68. Identifier& identifier() { return *static_cast<Identifier*>(asPointer); }
  69. int32_t int32() { return asInt32; }
  70. CodeBlock* codeBlock() { return static_cast<CodeBlock*>(asPointer); }
  71. FunctionExecutable* function() { return static_cast<FunctionExecutable*>(asPointer); }
  72. RegExp* regExp() { return static_cast<RegExp*>(asPointer); }
  73. JSPropertyNameIterator* propertyNameIterator() { return static_cast<JSPropertyNameIterator*>(asPointer); }
  74. JSGlobalObject* globalObject() { return static_cast<JSGlobalObject*>(asPointer); }
  75. JSString* jsString() { return static_cast<JSString*>(asPointer); }
  76. Structure* structure() { return static_cast<Structure*>(asPointer); }
  77. ReturnAddressPtr returnAddress() { return ReturnAddressPtr(asPointer); }
  78. ResolveOperations* resolveOperations() { return static_cast<ResolveOperations*>(asPointer); }
  79. PutToBaseOperation* putToBaseOperation() { return static_cast<PutToBaseOperation*>(asPointer); }
  80. ArrayAllocationProfile* arrayAllocationProfile() { return static_cast<ArrayAllocationProfile*>(asPointer); }
  81. };
  82. #if !OS(WINDOWS) && CPU(X86_64)
  83. struct JITStackFrame {
  84. void* reserved; // Unused
  85. JITStubArg args[6];
  86. void* padding[2]; // Maintain 32-byte stack alignment (possibly overkill).
  87. void* code;
  88. JSStack* stack;
  89. CallFrame* callFrame;
  90. void* unused1;
  91. void* unused2;
  92. VM* vm;
  93. void* savedRBX;
  94. void* savedR15;
  95. void* savedR14;
  96. void* savedR13;
  97. void* savedR12;
  98. void* savedRBP;
  99. void* savedRIP;
  100. // When JIT code makes a call, it pushes its return address just below the rest of the stack.
  101. ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; }
  102. };
  103. #elif OS(WINDOWS) && CPU(X86_64)
  104. struct JITStackFrame {
  105. void* shadow[4]; // Shadow space reserved for a callee's parameters home addresses
  106. void* reserved; // Unused, also maintains the 16-bytes stack alignment
  107. JITStubArg args[6];
  108. void* savedRBX;
  109. void* savedR15;
  110. void* savedR14;
  111. void* savedR13;
  112. void* savedR12;
  113. void* savedRBP;
  114. void* savedRIP;
  115. // Home addresses for our register passed parameters
  116. // http://msdn.microsoft.com/en-us/library/ew5tede7.aspx
  117. void* code;
  118. JSStack* stack;
  119. CallFrame* callFrame;
  120. void* unused1;
  121. // Passed on the stack
  122. void* unused2;
  123. VM* vm;
  124. // When JIT code makes a call, it pushes its return address just below the rest of the stack.
  125. ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; }
  126. };
  127. #elif CPU(X86)
  128. #if COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC))
  129. #pragma pack(push)
  130. #pragma pack(4)
  131. #endif // COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC))
  132. struct JITStackFrame {
  133. void* reserved; // Unused
  134. JITStubArg args[6];
  135. #if USE(JSVALUE32_64)
  136. void* padding[2]; // Maintain 16-byte stack alignment.
  137. #endif
  138. void* savedEBX;
  139. void* savedEDI;
  140. void* savedESI;
  141. void* savedEBP;
  142. void* savedEIP;
  143. void* code;
  144. JSStack* stack;
  145. CallFrame* callFrame;
  146. void* unused1;
  147. void* unused2;
  148. VM* vm;
  149. // When JIT code makes a call, it pushes its return address just below the rest of the stack.
  150. ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; }
  151. };
  152. #if COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC))
  153. #pragma pack(pop)
  154. #endif // COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC))
  155. #elif CPU(ARM_THUMB2)
  156. struct JITStackFrame {
  157. JITStubArg reserved; // Unused
  158. JITStubArg args[6];
  159. ReturnAddressPtr thunkReturnAddress;
  160. void* preservedReturnAddress;
  161. void* preservedR4;
  162. void* preservedR5;
  163. void* preservedR6;
  164. void* preservedR7;
  165. void* preservedR8;
  166. void* preservedR9;
  167. void* preservedR10;
  168. void* preservedR11;
  169. // These arguments passed in r1..r3 (r0 contained the entry code pointed, which is not preserved)
  170. JSStack* stack;
  171. CallFrame* callFrame;
  172. // These arguments passed on the stack.
  173. void* unused1;
  174. VM* vm;
  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. ReturnAddressPtr thunkReturnAddress;
  186. void* preservedR4;
  187. void* preservedR5;
  188. void* preservedR6;
  189. void* preservedR8;
  190. void* preservedR9;
  191. void* preservedR10;
  192. void* preservedR11;
  193. void* preservedLink;
  194. JSStack* stack;
  195. CallFrame* callFrame;
  196. void* unused1;
  197. // These arguments passed on the stack.
  198. void* unused2;
  199. VM* vm;
  200. // When JIT code makes a call, it pushes its return address just below the rest of the stack.
  201. ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; }
  202. };
  203. #if COMPILER(MSVC)
  204. #pragma pack(pop)
  205. #endif // COMPILER(MSVC)
  206. #elif CPU(MIPS)
  207. struct JITStackFrame {
  208. JITStubArg reserved; // Unused
  209. JITStubArg args[6];
  210. #if USE(JSVALUE32_64)
  211. void* padding; // Make the overall stack length 8-byte aligned.
  212. #endif
  213. void* preservedGP; // store GP when using PIC code
  214. void* preservedS0;
  215. void* preservedS1;
  216. void* preservedS2;
  217. void* preservedS3;
  218. void* preservedS4;
  219. void* preservedReturnAddress;
  220. ReturnAddressPtr thunkReturnAddress;
  221. // These arguments passed in a1..a3 (a0 contained the entry code pointed, which is not preserved)
  222. JSStack* stack;
  223. CallFrame* callFrame;
  224. void* unused1;
  225. // These arguments passed on the stack.
  226. void* unused2;
  227. VM* vm;
  228. ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; }
  229. };
  230. #elif CPU(SH4)
  231. struct JITStackFrame {
  232. JITStubArg padding; // Unused
  233. JITStubArg args[6];
  234. ReturnAddressPtr thunkReturnAddress;
  235. void* savedR10;
  236. void* savedR11;
  237. void* savedR13;
  238. void* savedRPR;
  239. void* savedR14;
  240. JSStack* stack;
  241. CallFrame* callFrame;
  242. JSValue* exception;
  243. void* unused1;
  244. VM* vm;
  245. ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; }
  246. };
  247. #else
  248. #error "JITStackFrame not defined for this platform."
  249. #endif
  250. #define JITSTACKFRAME_ARGS_INDEX (OBJECT_OFFSETOF(JITStackFrame, args) / sizeof(void*))
  251. #if CPU(X86)
  252. #if COMPILER(MSVC)
  253. #define JIT_STUB __fastcall
  254. #elif COMPILER(GCC)
  255. #define JIT_STUB __attribute__ ((fastcall))
  256. #elif COMPILER(SUNCC)
  257. #define JIT_STUB
  258. #else
  259. #error "JIT_STUB function calls require fastcall conventions on x86, add appropriate directive/attribute here for your compiler!"
  260. #endif
  261. #else
  262. #define JIT_STUB
  263. #endif
  264. #if !(ENABLE(DETACHED_JIT) && BUILDING_DETACHED_JIT)
  265. extern "C" void ctiVMThrowTrampoline();
  266. extern "C" void ctiOpThrowNotCaught();
  267. extern "C" EncodedJSValue ctiTrampoline(void* code, JSStack*, CallFrame*, void* /*unused1*/, void* /*unused2*/, VM*);
  268. #if ENABLE(DFG_JIT)
  269. extern "C" void ctiTrampolineEnd();
  270. inline bool returnAddressIsInCtiTrampoline(ReturnAddressPtr returnAddress)
  271. {
  272. return returnAddress.value() >= bitwise_cast<void*>(&ctiTrampoline)
  273. && returnAddress.value() < bitwise_cast<void*>(&ctiTrampolineEnd);
  274. }
  275. #endif
  276. void performPlatformSpecificJITAssertions(VM*);
  277. extern "C" {
  278. EncodedJSValue JIT_STUB cti_op_add(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  279. EncodedJSValue JIT_STUB cti_op_bitand(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  280. EncodedJSValue JIT_STUB cti_op_bitor(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  281. EncodedJSValue JIT_STUB cti_op_bitxor(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  282. EncodedJSValue JIT_STUB cti_op_call_NotJSFunction(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  283. EncodedJSValue JIT_STUB cti_op_call_eval(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  284. EncodedJSValue JIT_STUB cti_op_construct_NotJSConstruct(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  285. EncodedJSValue JIT_STUB cti_op_check_has_instance(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  286. EncodedJSValue JIT_STUB cti_op_create_this(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  287. EncodedJSValue JIT_STUB cti_op_convert_this(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  288. EncodedJSValue JIT_STUB cti_op_create_arguments(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  289. EncodedJSValue JIT_STUB cti_op_del_by_id(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  290. EncodedJSValue JIT_STUB cti_op_del_by_val(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  291. EncodedJSValue JIT_STUB cti_op_div(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  292. EncodedJSValue JIT_STUB cti_op_get_by_id(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  293. EncodedJSValue JIT_STUB cti_op_get_by_id_array_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  294. EncodedJSValue JIT_STUB cti_op_get_by_id_custom_stub(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  295. EncodedJSValue JIT_STUB cti_op_get_by_id_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  296. EncodedJSValue JIT_STUB cti_op_get_by_id_getter_stub(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  297. EncodedJSValue JIT_STUB cti_op_get_by_id_proto_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  298. EncodedJSValue JIT_STUB cti_op_get_by_id_proto_list(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  299. EncodedJSValue JIT_STUB cti_op_get_by_id_proto_list_full(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  300. EncodedJSValue JIT_STUB cti_op_get_by_id_self_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  301. EncodedJSValue JIT_STUB cti_op_get_by_id_string_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  302. EncodedJSValue JIT_STUB cti_op_get_by_val(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  303. EncodedJSValue JIT_STUB cti_op_get_by_val_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  304. EncodedJSValue JIT_STUB cti_op_get_by_val_string(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  305. EncodedJSValue JIT_STUB cti_op_in(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  306. EncodedJSValue JIT_STUB cti_op_instanceof(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  307. EncodedJSValue JIT_STUB cti_op_is_boolean(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  308. EncodedJSValue JIT_STUB cti_op_is_function(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  309. EncodedJSValue JIT_STUB cti_op_is_number(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  310. EncodedJSValue JIT_STUB cti_op_is_object(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  311. EncodedJSValue JIT_STUB cti_op_is_string(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  312. EncodedJSValue JIT_STUB cti_op_is_undefined(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  313. EncodedJSValue JIT_STUB cti_op_less(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  314. EncodedJSValue JIT_STUB cti_op_lesseq(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  315. EncodedJSValue JIT_STUB cti_op_greater(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  316. EncodedJSValue JIT_STUB cti_op_greatereq(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  317. EncodedJSValue JIT_STUB cti_op_lshift(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  318. EncodedJSValue JIT_STUB cti_op_mod(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  319. EncodedJSValue JIT_STUB cti_op_mul(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  320. EncodedJSValue JIT_STUB cti_op_negate(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  321. EncodedJSValue JIT_STUB cti_op_not(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  322. EncodedJSValue JIT_STUB cti_op_nstricteq(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  323. EncodedJSValue JIT_STUB cti_op_dec(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  324. EncodedJSValue JIT_STUB cti_op_inc(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  325. EncodedJSValue JIT_STUB cti_op_resolve(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  326. EncodedJSValue JIT_STUB cti_op_resolve_base(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  327. EncodedJSValue JIT_STUB cti_op_resolve_base_strict_put(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  328. EncodedJSValue JIT_STUB cti_op_resolve_with_base(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  329. EncodedJSValue JIT_STUB cti_op_resolve_with_this(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  330. void JIT_STUB cti_op_put_to_base(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  331. EncodedJSValue JIT_STUB cti_op_rshift(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  332. EncodedJSValue JIT_STUB cti_op_strcat(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  333. EncodedJSValue JIT_STUB cti_op_stricteq(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  334. EncodedJSValue JIT_STUB cti_op_sub(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  335. EncodedJSValue JIT_STUB cti_op_to_number(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  336. EncodedJSValue JIT_STUB cti_op_to_primitive(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  337. EncodedJSValue JIT_STUB cti_op_typeof(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  338. EncodedJSValue JIT_STUB cti_op_urshift(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  339. EncodedJSValue JIT_STUB cti_to_object(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  340. JSObject* JIT_STUB cti_op_new_array(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  341. JSObject* JIT_STUB cti_op_new_array_with_size(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  342. JSObject* JIT_STUB cti_op_new_array_buffer(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  343. JSObject* JIT_STUB cti_op_new_func(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  344. JSObject* JIT_STUB cti_op_new_func_exp(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  345. JSObject* JIT_STUB cti_op_new_object(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  346. JSObject* JIT_STUB cti_op_new_regexp(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  347. JSObject* JIT_STUB cti_op_push_activation(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  348. void JIT_STUB cti_op_push_name_scope(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  349. void JIT_STUB cti_op_push_with_scope(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  350. JSObject* JIT_STUB cti_op_put_by_id_transition_realloc(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  351. JSPropertyNameIterator* JIT_STUB cti_op_get_pnames(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  352. int JIT_STUB cti_op_eq(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  353. int JIT_STUB cti_op_eq_strings(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  354. int JIT_STUB cti_op_jless(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  355. int JIT_STUB cti_op_jlesseq(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  356. int JIT_STUB cti_op_jgreater(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  357. int JIT_STUB cti_op_jgreatereq(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  358. int JIT_STUB cti_op_jtrue(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  359. void* JIT_STUB cti_op_load_varargs(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  360. void JIT_STUB cti_handle_watchdog_timer(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  361. int JIT_STUB cti_has_property(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  362. void JIT_STUB cti_op_debug(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  363. void JIT_STUB cti_op_end(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  364. void JIT_STUB cti_op_pop_scope(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  365. void JIT_STUB cti_op_profile_did_call(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  366. void JIT_STUB cti_op_profile_will_call(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  367. void JIT_STUB cti_op_put_by_id(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  368. void JIT_STUB cti_op_put_by_id_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  369. void JIT_STUB cti_op_put_by_id_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  370. void JIT_STUB cti_op_put_by_id_direct(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  371. void JIT_STUB cti_op_put_by_id_direct_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  372. void JIT_STUB cti_op_put_by_id_direct_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  373. void JIT_STUB cti_op_put_by_index(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  374. void JIT_STUB cti_op_put_by_val(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  375. void JIT_STUB cti_op_put_by_val_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  376. void JIT_STUB cti_op_put_getter_setter(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  377. void JIT_STUB cti_op_init_global_const_check(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  378. void JIT_STUB cti_op_tear_off_activation(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  379. void JIT_STUB cti_op_tear_off_arguments(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  380. void JIT_STUB cti_op_throw_static_error(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  381. #if ENABLE(DFG_JIT)
  382. void JIT_STUB cti_optimize(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  383. #endif
  384. void* JIT_STUB cti_op_call_arityCheck(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  385. void* JIT_STUB cti_op_construct_arityCheck(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  386. void* JIT_STUB cti_op_call_jitCompile(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  387. void* JIT_STUB cti_op_construct_jitCompile(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  388. void* JIT_STUB cti_op_switch_char(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  389. void* JIT_STUB cti_op_switch_imm(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  390. void* JIT_STUB cti_op_switch_string(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  391. void* JIT_STUB cti_op_throw(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  392. void* JIT_STUB cti_stack_check(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  393. void* JIT_STUB cti_vm_lazyLinkCall(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  394. void* JIT_STUB cti_vm_lazyLinkClosureCall(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  395. void* JIT_STUB cti_vm_lazyLinkConstruct(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  396. void* JIT_STUB cti_vm_throw(STUB_ARGS_DECLARATION) REFERENCED_FROM_ASM WTF_INTERNAL;
  397. } // extern "C"
  398. #endif // #if !(ENABLE(DETACHED_JIT) && BUIDING_DETACHED_JIT)
  399. #elif ENABLE(LLINT_C_LOOP)
  400. struct JITStackFrame {
  401. VM* vm;
  402. };
  403. #endif // ENABLE(LLINT_C_LOOP)
  404. } // namespace JSC
  405. #endif // JITStubs_h