6ea0095a35e0da1a5383d4196bf8faa9395552bf
[WebKit-https.git] / JavaScriptCore / jit / JIT.h
1 /*
2  * Copyright (C) 2008 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24  */
25
26 #ifndef JIT_h
27 #define JIT_h
28
29 #include <wtf/Platform.h>
30
31 #if ENABLE(JIT)
32
33 #define WTF_USE_CTI_REPATCH_PIC 1
34
35 #include "Interpreter.h"
36 #include "Opcode.h"
37 #include "RegisterFile.h"
38 #include "X86Assembler.h"
39 #include "Profiler.h"
40 #include <wtf/AlwaysInline.h>
41 #include <wtf/Vector.h>
42
43 #define CTI_ARGS_code 0x0C
44 #define CTI_ARGS_registerFile 0x0D
45 #define CTI_ARGS_callFrame 0x0E
46 #define CTI_ARGS_exception 0x0F
47 #define CTI_ARGS_profilerReference 0x10
48 #define CTI_ARGS_globalData 0x11
49
50 #define ARG_callFrame static_cast<CallFrame*>(ARGS[CTI_ARGS_callFrame])
51 #define ARG_registerFile static_cast<RegisterFile*>(ARGS[CTI_ARGS_registerFile])
52 #define ARG_exception static_cast<JSValue**>(ARGS[CTI_ARGS_exception])
53 #define ARG_profilerReference static_cast<Profiler**>(ARGS[CTI_ARGS_profilerReference])
54 #define ARG_globalData static_cast<JSGlobalData*>(ARGS[CTI_ARGS_globalData])
55
56 #define ARG_setCallFrame(newCallFrame) (ARGS[CTI_ARGS_callFrame] = (newCallFrame))
57
58 #define ARG_src1 static_cast<JSValue*>(ARGS[1])
59 #define ARG_src2 static_cast<JSValue*>(ARGS[2])
60 #define ARG_src3 static_cast<JSValue*>(ARGS[3])
61 #define ARG_src4 static_cast<JSValue*>(ARGS[4])
62 #define ARG_src5 static_cast<JSValue*>(ARGS[5])
63 #define ARG_id1 static_cast<Identifier*>(ARGS[1])
64 #define ARG_id2 static_cast<Identifier*>(ARGS[2])
65 #define ARG_id3 static_cast<Identifier*>(ARGS[3])
66 #define ARG_id4 static_cast<Identifier*>(ARGS[4])
67 #define ARG_int1 reinterpret_cast<intptr_t>(ARGS[1])
68 #define ARG_int2 reinterpret_cast<intptr_t>(ARGS[2])
69 #define ARG_int3 reinterpret_cast<intptr_t>(ARGS[3])
70 #define ARG_int4 reinterpret_cast<intptr_t>(ARGS[4])
71 #define ARG_int5 reinterpret_cast<intptr_t>(ARGS[5])
72 #define ARG_int6 reinterpret_cast<intptr_t>(ARGS[6])
73 #define ARG_func1 static_cast<FuncDeclNode*>(ARGS[1])
74 #define ARG_funcexp1 static_cast<FuncExprNode*>(ARGS[1])
75 #define ARG_registers1 static_cast<Register*>(ARGS[1])
76 #define ARG_regexp1 static_cast<RegExp*>(ARGS[1])
77 #define ARG_pni1 static_cast<JSPropertyNameIterator*>(ARGS[1])
78 #define ARG_instr1 static_cast<Instruction*>(ARGS[1])
79 #define ARG_instr2 static_cast<Instruction*>(ARGS[2])
80 #define ARG_instr3 static_cast<Instruction*>(ARGS[3])
81 #define ARG_instr4 static_cast<Instruction*>(ARGS[4])
82 #define ARG_instr5 static_cast<Instruction*>(ARGS[5])
83 #define ARG_instr6 static_cast<Instruction*>(ARGS[6])
84 #define ARG_returnAddress2 static_cast<void*>(ARGS[2])
85 #define ARG_codeBlock4 static_cast<CodeBlock*>(ARGS[4])
86
87 #define CTI_RETURN_ADDRESS_SLOT (ARGS[-1])
88
89 namespace JSC {
90
91     class CodeBlock;
92     class JSPropertyNameIterator;
93     class Interpreter;
94     class Register;
95     class RegisterFile;
96     class ScopeChainNode;
97     class SimpleJumpTable;
98     class StringJumpTable;
99     class StructureChain;
100
101     struct CallLinkInfo;
102     struct Instruction;
103     struct OperandTypes;
104     struct PolymorphicAccessStructureList;
105     struct StructureStubInfo;
106
107     typedef JSValue* (SFX_CALL *CTIHelper_j)(CTI_ARGS);
108     typedef JSObject* (SFX_CALL *CTIHelper_o)(CTI_ARGS);
109     typedef JSPropertyNameIterator* (SFX_CALL *CTIHelper_p)(CTI_ARGS);
110     typedef void (SFX_CALL *CTIHelper_v)(CTI_ARGS);
111     typedef void* (SFX_CALL *CTIHelper_s)(CTI_ARGS);
112     typedef int (SFX_CALL *CTIHelper_b)(CTI_ARGS);
113     typedef VoidPtrPair (SFX_CALL *CTIHelper_2)(CTI_ARGS);
114
115     struct CallRecord {
116         typedef X86Assembler::JmpSrc JmpSrc;
117
118         JmpSrc from;
119         void* to;
120         unsigned bytecodeIndex;
121
122         CallRecord()
123         {
124         }
125
126         CallRecord(JmpSrc f, CTIHelper_j t, unsigned i)
127             : from(f)
128             , to(reinterpret_cast<void*>(t))
129             , bytecodeIndex(i)
130         {
131         }
132
133         CallRecord(JmpSrc f, CTIHelper_o t, unsigned i)
134             : from(f)
135             , to(reinterpret_cast<void*>(t))
136             , bytecodeIndex(i)
137         {
138         }
139
140         CallRecord(JmpSrc f, CTIHelper_p t, unsigned i)
141             : from(f)
142             , to(reinterpret_cast<void*>(t))
143             , bytecodeIndex(i)
144         {
145         }
146         
147         CallRecord(JmpSrc f, CTIHelper_v t, unsigned i)
148             : from(f)
149             , to(reinterpret_cast<void*>(t))
150             , bytecodeIndex(i)
151         {
152         }
153         
154         CallRecord(JmpSrc f, CTIHelper_s t, unsigned i)
155             : from(f)
156             , to(reinterpret_cast<void*>(t))
157             , bytecodeIndex(i)
158         {
159         }
160         
161         CallRecord(JmpSrc f, CTIHelper_b t, unsigned i)
162             : from(f)
163             , to(reinterpret_cast<void*>(t))
164             , bytecodeIndex(i)
165         {
166         }
167
168         CallRecord(JmpSrc f, CTIHelper_2 t, unsigned i)
169             : from(f)
170             , to(reinterpret_cast<void*>(t))
171             , bytecodeIndex(i)
172         {
173         }
174
175         CallRecord(JmpSrc f, unsigned i)
176             : from(f)
177             , to(0)
178             , bytecodeIndex(i)
179         {
180         }
181     };
182
183     struct JmpTable {
184         typedef X86Assembler::JmpSrc JmpSrc;
185
186         JmpSrc from;
187         unsigned to;
188         
189         JmpTable(JmpSrc f, unsigned t)
190             : from(f)
191             , to(t)
192         {
193         }
194     };
195
196     struct SlowCaseEntry {
197         typedef X86Assembler::JmpSrc JmpSrc;
198
199         JmpSrc from;
200         unsigned to;
201         unsigned hint;
202         
203         SlowCaseEntry(JmpSrc f, unsigned t, unsigned h = 0)
204             : from(f)
205             , to(t)
206             , hint(h)
207         {
208         }
209     };
210
211     struct SwitchRecord {
212         enum Type {
213             Immediate,
214             Character,
215             String
216         };
217
218         Type type;
219
220         union {
221             SimpleJumpTable* simpleJumpTable;
222             StringJumpTable* stringJumpTable;
223         } jumpTable;
224
225         unsigned bytecodeIndex;
226         unsigned defaultOffset;
227
228         SwitchRecord(SimpleJumpTable* jumpTable, unsigned bytecodeIndex, unsigned defaultOffset, Type type)
229             : type(type)
230             , bytecodeIndex(bytecodeIndex)
231             , defaultOffset(defaultOffset)
232         {
233             this->jumpTable.simpleJumpTable = jumpTable;
234         }
235
236         SwitchRecord(StringJumpTable* jumpTable, unsigned bytecodeIndex, unsigned defaultOffset)
237             : type(String)
238             , bytecodeIndex(bytecodeIndex)
239             , defaultOffset(defaultOffset)
240         {
241             this->jumpTable.stringJumpTable = jumpTable;
242         }
243     };
244
245     struct StructureStubCompilationInfo {
246         typedef X86Assembler::JmpSrc JmpSrc;
247         typedef X86Assembler::JmpDst JmpDst;
248
249         JmpSrc callReturnLocation;
250         JmpDst hotPathBegin;
251         JmpSrc hotPathOther;
252         JmpDst coldPathOther;
253     };
254
255     extern "C" {
256         JSValue* ctiTrampoline(void* code, RegisterFile*, CallFrame*, JSValue** exception, Profiler**, JSGlobalData*);
257         void ctiVMThrowTrampoline();
258     };
259
260     void ctiSetReturnAddress(void** where, void* what);
261     void ctiRepatchCallByReturnAddress(void* where, void* what);
262
263     class JIT {
264         typedef X86Assembler::RegisterID RegisterID;
265         typedef X86Assembler::XMMRegisterID XMMRegisterID;
266         typedef X86Assembler::JmpSrc JmpSrc;
267         typedef X86Assembler::JmpDst JmpDst;
268
269         static const int repatchGetByIdDefaultStructure = -1;
270         // Magic number - initial offset cannot be representable as a signed 8bit value, or the X86Assembler
271         // will compress the displacement, and we may not be able to fit a repatched offset.
272         static const int repatchGetByIdDefaultOffset = 256;
273
274 #if USE(FAST_CALL_CTI_ARGUMENT)
275         static const int ctiArgumentInitSize = 2;
276 #elif USE(CTI_ARGUMENT)
277         static const int ctiArgumentInitSize = 4;
278 #else
279         static const int ctiArgumentInitSize = 0;
280 #endif
281         // These architecture specific value are used to enable repatching - see comment on op_put_by_id.
282         static const int repatchOffsetPutByIdStructure = 7;
283         static const int repatchOffsetPutByIdPropertyMapOffset = 22;
284         // These architecture specific value are used to enable repatching - see comment on op_get_by_id.
285         static const int repatchOffsetGetByIdStructure = 7;
286         static const int repatchOffsetGetByIdBranchToSlowCase = 13;
287         static const int repatchOffsetGetByIdPropertyMapOffset = 22;
288 #if ENABLE(OPCODE_SAMPLING)
289         static const int repatchOffsetGetByIdSlowCaseCall = 27 + 4 + ctiArgumentInitSize;
290 #else
291         static const int repatchOffsetGetByIdSlowCaseCall = 17 + 4 + ctiArgumentInitSize;
292 #endif
293         static const int repatchOffsetOpCallCall = 6;
294
295     public:
296         static void compile(JSGlobalData* globalData, CodeBlock* codeBlock)
297         {
298             JIT jit(globalData, codeBlock);
299             jit.privateCompile();
300         }
301
302         static void compileGetByIdSelf(JSGlobalData* globalData, CodeBlock* codeBlock, Structure* structure, size_t cachedOffset, void* returnAddress)
303         {
304             JIT jit(globalData, codeBlock);
305             jit.privateCompileGetByIdSelf(structure, cachedOffset, returnAddress);
306         }
307
308         static void compileGetByIdProto(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, Structure* structure, Structure* prototypeStructure, size_t cachedOffset, void* returnAddress)
309         {
310             JIT jit(globalData, codeBlock);
311             jit.privateCompileGetByIdProto(structure, prototypeStructure, cachedOffset, returnAddress, callFrame);
312         }
313
314 #if USE(CTI_REPATCH_PIC)
315         static void compileGetByIdSelfList(JSGlobalData* globalData, CodeBlock* codeBlock, StructureStubInfo* stubInfo, PolymorphicAccessStructureList* polymorphicStructures, int currentIndex, Structure* structure, size_t cachedOffset)
316         {
317             JIT jit(globalData, codeBlock);
318             jit.privateCompileGetByIdSelfList(stubInfo, polymorphicStructures, currentIndex, structure, cachedOffset);
319         }
320         static void compileGetByIdProtoList(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructureList, int currentIndex, Structure* structure, Structure* prototypeStructure, size_t cachedOffset)
321         {
322             JIT jit(globalData, codeBlock);
323             jit.privateCompileGetByIdProtoList(stubInfo, prototypeStructureList, currentIndex, structure, prototypeStructure, cachedOffset, callFrame);
324         }
325         static void compileGetByIdChainList(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructureList, int currentIndex, Structure* structure, StructureChain* chain, size_t count, size_t cachedOffset)
326         {
327             JIT jit(globalData, codeBlock);
328             jit.privateCompileGetByIdChainList(stubInfo, prototypeStructureList, currentIndex, structure, chain, count, cachedOffset, callFrame);
329         }
330 #endif
331
332         static void compileGetByIdChain(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, Structure* structure, StructureChain* chain, size_t count, size_t cachedOffset, void* returnAddress)
333         {
334             JIT jit(globalData, codeBlock);
335             jit.privateCompileGetByIdChain(structure, chain, count, cachedOffset, returnAddress, callFrame);
336         }
337
338         static void compilePutByIdReplace(JSGlobalData* globalData, CodeBlock* codeBlock, Structure* structure, size_t cachedOffset, void* returnAddress)
339         {
340             JIT jit(globalData, codeBlock);
341             jit.privateCompilePutByIdReplace(structure, cachedOffset, returnAddress);
342         }
343         
344         static void compilePutByIdTransition(JSGlobalData* globalData, CodeBlock* codeBlock, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, void* returnAddress)
345         {
346             JIT jit(globalData, codeBlock);
347             jit.privateCompilePutByIdTransition(oldStructure, newStructure, cachedOffset, chain, returnAddress);
348         }
349
350         static void compileCTIMachineTrampolines(JSGlobalData* globalData)
351         {
352             JIT jit(globalData);
353             jit.privateCompileCTIMachineTrampolines();
354         }
355         static void freeCTIMachineTrampolines(Interpreter*);
356
357         static void patchGetByIdSelf(CodeBlock* codeBlock, Structure* structure, size_t cachedOffset, void* returnAddress);
358         static void patchPutByIdReplace(CodeBlock* codeBlock, Structure* structure, size_t cachedOffset, void* returnAddress);
359
360         static void compilePatchGetArrayLength(JSGlobalData* globalData, CodeBlock* codeBlock, void* returnAddress)
361         {
362             JIT jit(globalData, codeBlock);
363             return jit.privateCompilePatchGetArrayLength(returnAddress);
364         }
365
366         static void linkCall(JSFunction* callee, CodeBlock* calleeCodeBlock, void* ctiCode, CallLinkInfo* callLinkInfo, int callerArgCount);
367         static void unlinkCall(CallLinkInfo*);
368
369         inline static JSValue* execute(void* code, RegisterFile* registerFile, CallFrame* callFrame, JSGlobalData* globalData, JSValue** exception)
370         {
371             return ctiTrampoline(code, registerFile, callFrame, exception, Profiler::enabledProfilerReference(), globalData);
372         }
373
374     private:
375         JIT(JSGlobalData*, CodeBlock* = 0);
376
377         void privateCompileMainPass();
378         void privateCompileLinkPass();
379         void privateCompileSlowCases();
380         void privateCompile();
381         void privateCompileGetByIdSelf(Structure*, size_t cachedOffset, void* returnAddress);
382         void privateCompileGetByIdProto(Structure*, Structure* prototypeStructure, size_t cachedOffset, void* returnAddress, CallFrame* callFrame);
383 #if USE(CTI_REPATCH_PIC)
384         void privateCompileGetByIdSelfList(StructureStubInfo*, PolymorphicAccessStructureList*, int, Structure*, size_t cachedOffset);
385         void privateCompileGetByIdProtoList(StructureStubInfo*, PolymorphicAccessStructureList*, int, Structure*, Structure* prototypeStructure, size_t cachedOffset, CallFrame* callFrame);
386         void privateCompileGetByIdChainList(StructureStubInfo*, PolymorphicAccessStructureList*, int, Structure*, StructureChain* chain, size_t count, size_t cachedOffset, CallFrame* callFrame);
387 #endif
388         void privateCompileGetByIdChain(Structure*, StructureChain*, size_t count, size_t cachedOffset, void* returnAddress, CallFrame* callFrame);
389         void privateCompilePutByIdReplace(Structure*, size_t cachedOffset, void* returnAddress);
390         void privateCompilePutByIdTransition(Structure*, Structure*, size_t cachedOffset, StructureChain*, void* returnAddress);
391
392         void privateCompileCTIMachineTrampolines();
393         void privateCompilePatchGetArrayLength(void* returnAddress);
394
395         void compileOpCall(OpcodeID, Instruction* instruction, unsigned i, unsigned callLinkInfoIndex);
396         void compileOpCallInitializeCallFrame();
397         void compileOpCallSetupArgs(Instruction*);
398         void compileOpCallEvalSetupArgs(Instruction*);
399         void compileOpConstructSetupArgs(Instruction*);
400         enum CompileOpStrictEqType { OpStrictEq, OpNStrictEq };
401         void compileOpStrictEq(Instruction* instruction, unsigned i, CompileOpStrictEqType type);
402         void putDoubleResultToJSNumberCellOrJSImmediate(XMMRegisterID xmmSource, RegisterID jsNumberCell, unsigned dst, JmpSrc* wroteJSNumberCell,  XMMRegisterID tempXmm, RegisterID tempReg1, RegisterID tempReg2);
403         void compileBinaryArithOp(OpcodeID, unsigned dst, unsigned src1, unsigned src2, OperandTypes opi, unsigned i);
404         void compileBinaryArithOpSlowCase(OpcodeID, Vector<SlowCaseEntry>::iterator& iter, unsigned dst, unsigned src1, unsigned src2, OperandTypes opi, unsigned i);
405
406         void emitGetVirtualRegister(int src, RegisterID dst, unsigned i);
407         void emitGetVirtualRegisters(int src1, RegisterID dst1, int src2, RegisterID dst2, unsigned i);
408         void emitPutVirtualRegister(unsigned dst, RegisterID from = X86::eax);
409
410         void emitPutCTIArg(RegisterID src, unsigned offset);
411         void emitPutCTIArgFromVirtualRegister(unsigned src, unsigned offset, RegisterID scratch);
412         void emitPutCTIArgConstant(unsigned value, unsigned offset);
413         void emitGetCTIArg(unsigned offset, RegisterID dst);
414
415         void emitInitRegister(unsigned dst);
416
417         void emitPutCTIParam(void* value, unsigned name);
418         void emitPutCTIParam(RegisterID from, unsigned name);
419         void emitGetCTIParam(unsigned name, RegisterID to);
420
421         void emitPutToCallFrameHeader(RegisterID from, RegisterFile::CallFrameHeaderEntry entry);
422         void emitGetFromCallFrameHeader(RegisterFile::CallFrameHeaderEntry entry, RegisterID to);
423
424         JSValue* getConstantImmediateNumericArg(unsigned src);
425         unsigned getDeTaggedConstantImmediate(JSValue* imm);
426
427         bool linkSlowCaseIfNotJSCell(const Vector<SlowCaseEntry>::iterator&, int vReg);
428         void emitJumpSlowCaseIfNotJSCell(RegisterID, unsigned bytecodeIndex);
429         void emitJumpSlowCaseIfNotJSCell(RegisterID, unsigned bytecodeIndex, int VReg);
430
431         void emitJumpSlowCaseIfNotImmNum(RegisterID, unsigned bytecodeIndex);
432         void emitJumpSlowCaseIfNotImmNums(RegisterID, RegisterID, unsigned bytecodeIndex);
433
434         JmpSrc checkStructure(RegisterID reg, Structure* structure);
435
436         void emitFastArithDeTagImmediate(RegisterID);
437         JmpSrc emitFastArithDeTagImmediateJumpIfZero(RegisterID);
438         void emitFastArithReTagImmediate(RegisterID);
439         void emitFastArithPotentiallyReTagImmediate(RegisterID);
440         void emitFastArithImmToInt(RegisterID);
441         void emitFastArithIntToImmOrSlowCase(RegisterID, unsigned bytecodeIndex);
442         void emitFastArithIntToImmNoCheck(RegisterID);
443
444         void emitTagAsBoolImmediate(RegisterID reg);
445
446         JmpSrc emitNakedCall(unsigned bytecodeIndex, RegisterID);
447         JmpSrc emitNakedCall(unsigned bytecodeIndex, void* function);
448         JmpSrc emitCTICall(unsigned bytecodeIndex, CTIHelper_j);
449         JmpSrc emitCTICall(unsigned bytecodeIndex, CTIHelper_o);
450         JmpSrc emitCTICall(unsigned bytecodeIndex, CTIHelper_p);
451         JmpSrc emitCTICall(unsigned bytecodeIndex, CTIHelper_v);
452         JmpSrc emitCTICall(unsigned bytecodeIndex, CTIHelper_s);
453         JmpSrc emitCTICall(unsigned bytecodeIndex, CTIHelper_b);
454         JmpSrc emitCTICall(unsigned bytecodeIndex, CTIHelper_2);
455
456         void emitGetVariableObjectRegister(RegisterID variableObject, int index, RegisterID dst);
457         void emitPutVariableObjectRegister(RegisterID src, RegisterID variableObject, int index);
458         
459         void emitSlowScriptCheck(unsigned bytecodeIndex);
460 #ifndef NDEBUG
461         void printBytecodeOperandTypes(unsigned src1, unsigned src2);
462 #endif
463
464         void killLastResultRegister();
465
466         X86Assembler m_assembler;
467         Interpreter* m_interpreter;
468         JSGlobalData* m_globalData;
469         CodeBlock* m_codeBlock;
470
471         Vector<CallRecord> m_calls;
472         Vector<JmpDst> m_labels;
473         Vector<StructureStubCompilationInfo> m_propertyAccessCompilationInfo;
474         Vector<StructureStubCompilationInfo> m_callStructureStubCompilationInfo;
475         Vector<JmpTable> m_jmpTable;
476
477         struct JSRInfo {
478             JmpDst addrPosition;
479             JmpDst target;
480
481             JSRInfo(const JmpDst& storeLocation, const JmpDst& targetLocation)
482                 : addrPosition(storeLocation)
483                 , target(targetLocation)
484             {
485             }
486         };
487
488         Vector<JSRInfo> m_jsrSites;
489         Vector<SlowCaseEntry> m_slowCases;
490         Vector<SwitchRecord> m_switches;
491
492         int m_lastResultBytecodeRegister;
493         unsigned m_jumpTargetsPosition;
494     };
495 }
496
497 #endif // ENABLE(JIT)
498
499 #endif // JIT_h