2 * Copyright (C) 2013-2014 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
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.
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.
26 #ifndef JITOperations_h
27 #define JITOperations_h
31 #include "CallFrame.h"
32 #include "CommonSlowPaths.h"
33 #include "JITExceptions.h"
35 #include "JSCJSValue.h"
36 #include "MacroAssembler.h"
38 #include "SpillRegistersMode.h"
39 #include "StructureStubInfo.h"
40 #include "VariableWatchpointSet.h"
45 class ArrayAllocationProfile
;
47 #if CALLING_CONVENTION_IS_STDCALL
48 #define JIT_OPERATION CDECL
55 // These typedefs provide typechecking when generating calls out to helper routines;
56 // this helps prevent calling a helper routine with the wrong arguments!
60 Aap: ArrayAllocationProfile*
69 Idc: const Identifier*
76 Pc: Instruction* i.e. bytecode PC
80 Sprt: SlowPathReturnType
81 Ssi: StructureStubInfo*
85 Vws: VariableWatchpointSet*
89 typedef CallFrame
* JIT_OPERATION (*F_JITOperation_EFJJZ
)(ExecState
*, CallFrame
*, EncodedJSValue
, EncodedJSValue
, int32_t);
90 typedef CallFrame
* JIT_OPERATION (*F_JITOperation_EJZZ
)(ExecState
*, EncodedJSValue
, int32_t, int32_t);
91 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_E
)(ExecState
*);
92 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EA
)(ExecState
*, JSArray
*);
93 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EAZ
)(ExecState
*, JSArray
*, int32_t);
94 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EAapJ
)(ExecState
*, ArrayAllocationProfile
*, EncodedJSValue
);
95 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EAapJcpZ
)(ExecState
*, ArrayAllocationProfile
*, const JSValue
*, int32_t);
96 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EC
)(ExecState
*, JSCell
*);
97 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_ECC
)(ExecState
*, JSCell
*, JSCell
*);
98 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_ECI
)(ExecState
*, JSCell
*, StringImpl
*);
99 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_ECJ
)(ExecState
*, JSCell
*, EncodedJSValue
);
100 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EDA
)(ExecState
*, double, JSArray
*);
101 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EE
)(ExecState
*, ExecState
*);
102 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EI
)(ExecState
*, StringImpl
*);
103 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EJ
)(ExecState
*, EncodedJSValue
);
104 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EJA
)(ExecState
*, EncodedJSValue
, JSArray
*);
105 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EJIdc
)(ExecState
*, EncodedJSValue
, const Identifier
*);
106 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EJJ
)(ExecState
*, EncodedJSValue
, EncodedJSValue
);
107 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EJssZ
)(ExecState
*, JSString
*, int32_t);
108 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EJP
)(ExecState
*, EncodedJSValue
, void*);
109 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EP
)(ExecState
*, void*);
110 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EPP
)(ExecState
*, void*, void*);
111 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EPS
)(ExecState
*, void*, size_t);
112 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EPc
)(ExecState
*, Instruction
*);
113 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_ESS
)(ExecState
*, size_t, size_t);
114 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_ESsiCI
)(ExecState
*, StructureStubInfo
*, JSCell
*, StringImpl
*);
115 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_ESsiJI
)(ExecState
*, StructureStubInfo
*, EncodedJSValue
, StringImpl
*);
116 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EZ
)(ExecState
*, int32_t);
117 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EZIcfZ
)(ExecState
*, int32_t, InlineCallFrame
*, int32_t);
118 typedef EncodedJSValue
JIT_OPERATION (*J_JITOperation_EZZ
)(ExecState
*, int32_t, int32_t);
119 typedef JSCell
* JIT_OPERATION (*C_JITOperation_E
)(ExecState
*);
120 typedef JSCell
* JIT_OPERATION (*C_JITOperation_EZ
)(ExecState
*, int32_t);
121 typedef JSCell
* JIT_OPERATION (*C_JITOperation_EC
)(ExecState
*, JSCell
*);
122 typedef JSCell
* JIT_OPERATION (*C_JITOperation_ECC
)(ExecState
*, JSCell
*, JSCell
*);
123 typedef JSCell
* JIT_OPERATION (*C_JITOperation_EIcf
)(ExecState
*, InlineCallFrame
*);
124 typedef JSCell
* JIT_OPERATION (*C_JITOperation_EJ
)(ExecState
*, EncodedJSValue
);
125 typedef JSCell
* JIT_OPERATION (*C_JITOperation_EJssSt
)(ExecState
*, JSString
*, Structure
*);
126 typedef JSCell
* JIT_OPERATION (*C_JITOperation_EJssJss
)(ExecState
*, JSString
*, JSString
*);
127 typedef JSCell
* JIT_OPERATION (*C_JITOperation_EJssJssJss
)(ExecState
*, JSString
*, JSString
*, JSString
*);
128 typedef JSCell
* JIT_OPERATION (*C_JITOperation_EO
)(ExecState
*, JSObject
*);
129 typedef JSCell
* JIT_OPERATION (*C_JITOperation_EOZ
)(ExecState
*, JSObject
*, int32_t);
130 typedef JSCell
* JIT_OPERATION (*C_JITOperation_ESt
)(ExecState
*, Structure
*);
131 typedef JSCell
* JIT_OPERATION (*C_JITOperation_EZ
)(ExecState
*, int32_t);
132 typedef double JIT_OPERATION (*D_JITOperation_D
)(double);
133 typedef double JIT_OPERATION (*D_JITOperation_DD
)(double, double);
134 typedef double JIT_OPERATION (*D_JITOperation_ZZ
)(int32_t, int32_t);
135 typedef double JIT_OPERATION (*D_JITOperation_EJ
)(ExecState
*, EncodedJSValue
);
136 typedef int64_t JIT_OPERATION(*Q_JITOperation_J
)(EncodedJSValue
);
137 typedef int64_t JIT_OPERATION(*Q_JITOperation_D
)(double);
138 typedef int32_t JIT_OPERATION (*Z_JITOperation_D
)(double);
139 typedef int32_t JIT_OPERATION (*Z_JITOperation_E
)(ExecState
*);
140 typedef size_t JIT_OPERATION (*S_JITOperation_ECC
)(ExecState
*, JSCell
*, JSCell
*);
141 typedef size_t JIT_OPERATION (*S_JITOperation_EJ
)(ExecState
*, EncodedJSValue
);
142 typedef size_t JIT_OPERATION (*S_JITOperation_EJJ
)(ExecState
*, EncodedJSValue
, EncodedJSValue
);
143 typedef size_t JIT_OPERATION (*S_JITOperation_EOJss
)(ExecState
*, JSObject
*, JSString
*);
144 typedef size_t JIT_OPERATION (*S_JITOperation_J
)(EncodedJSValue
);
145 typedef SlowPathReturnType
JIT_OPERATION (*Sprt_JITOperation_EZ
)(ExecState
*, int32_t);
146 typedef void JIT_OPERATION (*V_JITOperation
)();
147 typedef void JIT_OPERATION (*V_JITOperation_E
)(ExecState
*);
148 typedef void JIT_OPERATION (*V_JITOperation_EC
)(ExecState
*, JSCell
*);
149 typedef void JIT_OPERATION (*V_JITOperation_ECb
)(ExecState
*, CodeBlock
*);
150 typedef void JIT_OPERATION (*V_JITOperation_ECC
)(ExecState
*, JSCell
*, JSCell
*);
151 typedef void JIT_OPERATION (*V_JITOperation_ECIcf
)(ExecState
*, JSCell
*, InlineCallFrame
*);
152 typedef void JIT_OPERATION (*V_JITOperation_ECICC
)(ExecState
*, JSCell
*, Identifier
*, JSCell
*, JSCell
*);
153 typedef void JIT_OPERATION (*V_JITOperation_ECCIcf
)(ExecState
*, JSCell
*, JSCell
*, InlineCallFrame
*);
154 typedef void JIT_OPERATION (*V_JITOperation_ECJJ
)(ExecState
*, JSCell
*, EncodedJSValue
, EncodedJSValue
);
155 typedef void JIT_OPERATION (*V_JITOperation_ECPSPS
)(ExecState
*, JSCell
*, void*, size_t, void*, size_t);
156 typedef void JIT_OPERATION (*V_JITOperation_ECZ
)(ExecState
*, JSCell
*, int32_t);
157 typedef void JIT_OPERATION (*V_JITOperation_ECC
)(ExecState
*, JSCell
*, JSCell
*);
158 typedef void JIT_OPERATION (*V_JITOperation_EIdJZ
)(ExecState
*, Identifier
*, EncodedJSValue
, int32_t);
159 typedef void JIT_OPERATION (*V_JITOperation_EJ
)(ExecState
*, EncodedJSValue
);
160 typedef void JIT_OPERATION (*V_JITOperation_EJCI
)(ExecState
*, EncodedJSValue
, JSCell
*, StringImpl
*);
161 typedef void JIT_OPERATION (*V_JITOperation_EJIdJJ
)(ExecState
*, EncodedJSValue
, Identifier
*, EncodedJSValue
, EncodedJSValue
);
162 typedef void JIT_OPERATION (*V_JITOperation_EJJJ
)(ExecState
*, EncodedJSValue
, EncodedJSValue
, EncodedJSValue
);
163 typedef void JIT_OPERATION (*V_JITOperation_EJPP
)(ExecState
*, EncodedJSValue
, void*, void*);
164 typedef void JIT_OPERATION (*V_JITOperation_EJZJ
)(ExecState
*, EncodedJSValue
, int32_t, EncodedJSValue
);
165 typedef void JIT_OPERATION (*V_JITOperation_EJZ
)(ExecState
*, EncodedJSValue
, int32_t);
166 typedef void JIT_OPERATION (*V_JITOperation_EOZD
)(ExecState
*, JSObject
*, int32_t, double);
167 typedef void JIT_OPERATION (*V_JITOperation_EOZJ
)(ExecState
*, JSObject
*, int32_t, EncodedJSValue
);
168 typedef void JIT_OPERATION (*V_JITOperation_EPc
)(ExecState
*, Instruction
*);
169 typedef void JIT_OPERATION (*V_JITOperation_EPZJ
)(ExecState
*, void*, int32_t, EncodedJSValue
);
170 typedef void JIT_OPERATION (*V_JITOperation_ESsiJJI
)(ExecState
*, StructureStubInfo
*, EncodedJSValue
, EncodedJSValue
, StringImpl
*);
171 typedef void JIT_OPERATION (*V_JITOperation_EVwsJ
)(ExecState
*, VariableWatchpointSet
*, EncodedJSValue
);
172 typedef void JIT_OPERATION (*V_JITOperation_EZ
)(ExecState
*, int32_t);
173 typedef void JIT_OPERATION (*V_JITOperation_EVm
)(ExecState
*, VM
*);
174 typedef char* JIT_OPERATION (*P_JITOperation_E
)(ExecState
*);
175 typedef char* JIT_OPERATION (*P_JITOperation_EC
)(ExecState
*, JSCell
*);
176 typedef char* JIT_OPERATION (*P_JITOperation_ECli
)(ExecState
*, CallLinkInfo
*);
177 typedef char* JIT_OPERATION (*P_JITOperation_EJS
)(ExecState
*, EncodedJSValue
, size_t);
178 typedef char* JIT_OPERATION (*P_JITOperation_EO
)(ExecState
*, JSObject
*);
179 typedef char* JIT_OPERATION (*P_JITOperation_EOS
)(ExecState
*, JSObject
*, size_t);
180 typedef char* JIT_OPERATION (*P_JITOperation_EOZ
)(ExecState
*, JSObject
*, int32_t);
181 typedef char* JIT_OPERATION (*P_JITOperation_EPS
)(ExecState
*, void*, size_t);
182 typedef char* JIT_OPERATION (*P_JITOperation_ES
)(ExecState
*, size_t);
183 typedef char* JIT_OPERATION (*P_JITOperation_ESJss
)(ExecState
*, size_t, JSString
*);
184 typedef char* JIT_OPERATION (*P_JITOperation_ESt
)(ExecState
*, Structure
*);
185 typedef char* JIT_OPERATION (*P_JITOperation_EStJ
)(ExecState
*, Structure
*, EncodedJSValue
);
186 typedef char* JIT_OPERATION (*P_JITOperation_EStPS
)(ExecState
*, Structure
*, void*, size_t);
187 typedef char* JIT_OPERATION (*P_JITOperation_EStSS
)(ExecState
*, Structure
*, size_t, size_t);
188 typedef char* JIT_OPERATION (*P_JITOperation_EStZ
)(ExecState
*, Structure
*, int32_t);
189 typedef char* JIT_OPERATION (*P_JITOperation_EZZ
)(ExecState
*, int32_t, int32_t);
190 typedef StringImpl
* JIT_OPERATION (*I_JITOperation_EJss
)(ExecState
*, JSString
*);
191 typedef JSString
* JIT_OPERATION (*Jss_JITOperation_EZ
)(ExecState
*, int32_t);
193 // This method is used to lookup an exception hander, keyed by faultLocation, which is
194 // the return location from one of the calls out to one of the helper operations above.
196 void JIT_OPERATION
lookupExceptionHandler(VM
*, ExecState
*) WTF_INTERNAL
;
197 void JIT_OPERATION
operationVMHandleException(ExecState
*) WTF_INTERNAL
;
199 void JIT_OPERATION
operationThrowStackOverflowError(ExecState
*, CodeBlock
*) WTF_INTERNAL
;
200 int32_t JIT_OPERATION
operationCallArityCheck(ExecState
*) WTF_INTERNAL
;
201 int32_t JIT_OPERATION
operationConstructArityCheck(ExecState
*) WTF_INTERNAL
;
202 EncodedJSValue JIT_OPERATION
operationGetById(ExecState
*, StructureStubInfo
*, EncodedJSValue
, StringImpl
*) WTF_INTERNAL
;
203 EncodedJSValue JIT_OPERATION
operationGetByIdBuildList(ExecState
*, StructureStubInfo
*, EncodedJSValue
, StringImpl
*) WTF_INTERNAL
;
204 EncodedJSValue JIT_OPERATION
operationGetByIdOptimize(ExecState
*, StructureStubInfo
*, EncodedJSValue
, StringImpl
*) WTF_INTERNAL
;
205 EncodedJSValue JIT_OPERATION
operationInOptimize(ExecState
*, StructureStubInfo
*, JSCell
*, StringImpl
*);
206 EncodedJSValue JIT_OPERATION
operationIn(ExecState
*, StructureStubInfo
*, JSCell
*, StringImpl
*);
207 EncodedJSValue JIT_OPERATION
operationGenericIn(ExecState
*, JSCell
*, EncodedJSValue
);
208 void JIT_OPERATION
operationPutByIdStrict(ExecState
*, StructureStubInfo
*, EncodedJSValue encodedValue
, EncodedJSValue encodedBase
, StringImpl
*) WTF_INTERNAL
;
209 void JIT_OPERATION
operationPutByIdNonStrict(ExecState
*, StructureStubInfo
*, EncodedJSValue encodedValue
, EncodedJSValue encodedBase
, StringImpl
*) WTF_INTERNAL
;
210 void JIT_OPERATION
operationPutByIdDirectStrict(ExecState
*, StructureStubInfo
*, EncodedJSValue encodedValue
, EncodedJSValue encodedBase
, StringImpl
*) WTF_INTERNAL
;
211 void JIT_OPERATION
operationPutByIdDirectNonStrict(ExecState
*, StructureStubInfo
*, EncodedJSValue encodedValue
, EncodedJSValue encodedBase
, StringImpl
*) WTF_INTERNAL
;
212 void JIT_OPERATION
operationPutByIdStrictOptimize(ExecState
*, StructureStubInfo
*, EncodedJSValue encodedValue
, EncodedJSValue encodedBase
, StringImpl
*) WTF_INTERNAL
;
213 void JIT_OPERATION
operationPutByIdNonStrictOptimize(ExecState
*, StructureStubInfo
*, EncodedJSValue encodedValue
, EncodedJSValue encodedBase
, StringImpl
*) WTF_INTERNAL
;
214 void JIT_OPERATION
operationPutByIdDirectStrictOptimize(ExecState
*, StructureStubInfo
*, EncodedJSValue encodedValue
, EncodedJSValue encodedBase
, StringImpl
*) WTF_INTERNAL
;
215 void JIT_OPERATION
operationPutByIdDirectNonStrictOptimize(ExecState
*, StructureStubInfo
*, EncodedJSValue encodedValue
, EncodedJSValue encodedBase
, StringImpl
*) WTF_INTERNAL
;
216 void JIT_OPERATION
operationPutByIdStrictBuildList(ExecState
*, StructureStubInfo
*, EncodedJSValue encodedValue
, EncodedJSValue encodedBase
, StringImpl
*) WTF_INTERNAL
;
217 void JIT_OPERATION
operationPutByIdNonStrictBuildList(ExecState
*, StructureStubInfo
*, EncodedJSValue encodedValue
, EncodedJSValue encodedBase
, StringImpl
*) WTF_INTERNAL
;
218 void JIT_OPERATION
operationPutByIdDirectStrictBuildList(ExecState
*, StructureStubInfo
*, EncodedJSValue encodedValue
, EncodedJSValue encodedBase
, StringImpl
*) WTF_INTERNAL
;
219 void JIT_OPERATION
operationPutByIdDirectNonStrictBuildList(ExecState
*, StructureStubInfo
*, EncodedJSValue encodedValue
, EncodedJSValue encodedBase
, StringImpl
*) WTF_INTERNAL
;
220 void JIT_OPERATION
operationReallocateStorageAndFinishPut(ExecState
*, JSObject
*, Structure
*, PropertyOffset
, EncodedJSValue
) WTF_INTERNAL
;
221 void JIT_OPERATION
operationPutByVal(ExecState
*, EncodedJSValue
, EncodedJSValue
, EncodedJSValue
) WTF_INTERNAL
;
222 void JIT_OPERATION
operationDirectPutByVal(ExecState
*, EncodedJSValue
, EncodedJSValue
, EncodedJSValue
) WTF_INTERNAL
;
223 void JIT_OPERATION
operationPutByValGeneric(ExecState
*, EncodedJSValue
, EncodedJSValue
, EncodedJSValue
) WTF_INTERNAL
;
224 void JIT_OPERATION
operationDirectPutByValGeneric(ExecState
*, EncodedJSValue
, EncodedJSValue
, EncodedJSValue
) WTF_INTERNAL
;
225 EncodedJSValue JIT_OPERATION
operationCallEval(ExecState
*, ExecState
*) WTF_INTERNAL
;
226 char* JIT_OPERATION
operationLinkCall(ExecState
*, CallLinkInfo
*) WTF_INTERNAL
;
227 char* JIT_OPERATION
operationLinkClosureCall(ExecState
*, CallLinkInfo
*) WTF_INTERNAL
;
228 char* JIT_OPERATION
operationVirtualCall(ExecState
*, CallLinkInfo
*) WTF_INTERNAL
;
229 char* JIT_OPERATION
operationVirtualConstruct(ExecState
*, CallLinkInfo
*) WTF_INTERNAL
;
230 char* JIT_OPERATION
operationLinkConstruct(ExecState
*, CallLinkInfo
*) WTF_INTERNAL
;
231 char* JIT_OPERATION
operationLinkCallThatPreservesRegs(ExecState
*, CallLinkInfo
*) WTF_INTERNAL
;
232 char* JIT_OPERATION
operationLinkClosureCallThatPreservesRegs(ExecState
*, CallLinkInfo
*) WTF_INTERNAL
;
233 char* JIT_OPERATION
operationVirtualCallThatPreservesRegs(ExecState
*, CallLinkInfo
*) WTF_INTERNAL
;
234 char* JIT_OPERATION
operationVirtualConstructThatPreservesRegs(ExecState
*, CallLinkInfo
*) WTF_INTERNAL
;
235 char* JIT_OPERATION
operationLinkConstructThatPreservesRegs(ExecState
*, CallLinkInfo
*) WTF_INTERNAL
;
237 size_t JIT_OPERATION
operationCompareLess(ExecState
*, EncodedJSValue
, EncodedJSValue
) WTF_INTERNAL
;
238 size_t JIT_OPERATION
operationCompareLessEq(ExecState
*, EncodedJSValue
, EncodedJSValue
) WTF_INTERNAL
;
239 size_t JIT_OPERATION
operationCompareGreater(ExecState
*, EncodedJSValue
, EncodedJSValue
) WTF_INTERNAL
;
240 size_t JIT_OPERATION
operationCompareGreaterEq(ExecState
*, EncodedJSValue
, EncodedJSValue
) WTF_INTERNAL
;
241 size_t JIT_OPERATION
operationConvertJSValueToBoolean(ExecState
*, EncodedJSValue
) WTF_INTERNAL
;
242 size_t JIT_OPERATION
operationCompareEq(ExecState
*, EncodedJSValue
, EncodedJSValue
) WTF_INTERNAL
;
244 EncodedJSValue JIT_OPERATION
operationCompareStringEq(ExecState
*, JSCell
* left
, JSCell
* right
) WTF_INTERNAL
;
246 size_t JIT_OPERATION
operationCompareStringEq(ExecState
*, JSCell
* left
, JSCell
* right
) WTF_INTERNAL
;
248 size_t JIT_OPERATION
operationHasProperty(ExecState
*, JSObject
*, JSString
*) WTF_INTERNAL
;
249 EncodedJSValue JIT_OPERATION
operationNewArrayWithProfile(ExecState
*, ArrayAllocationProfile
*, const JSValue
* values
, int32_t size
) WTF_INTERNAL
;
250 EncodedJSValue JIT_OPERATION
operationNewArrayBufferWithProfile(ExecState
*, ArrayAllocationProfile
*, const JSValue
* values
, int32_t size
) WTF_INTERNAL
;
251 EncodedJSValue JIT_OPERATION
operationNewArrayWithSizeAndProfile(ExecState
*, ArrayAllocationProfile
*, EncodedJSValue size
) WTF_INTERNAL
;
252 EncodedJSValue JIT_OPERATION
operationNewFunction(ExecState
*, JSCell
*) WTF_INTERNAL
;
253 JSCell
* JIT_OPERATION
operationNewObject(ExecState
*, Structure
*) WTF_INTERNAL
;
254 EncodedJSValue JIT_OPERATION
operationNewRegexp(ExecState
*, void*) WTF_INTERNAL
;
255 void JIT_OPERATION
operationHandleWatchdogTimer(ExecState
*) WTF_INTERNAL
;
256 void JIT_OPERATION
operationThrowStaticError(ExecState
*, EncodedJSValue
, int32_t) WTF_INTERNAL
;
257 void JIT_OPERATION
operationThrow(ExecState
*, EncodedJSValue
) WTF_INTERNAL
;
258 void JIT_OPERATION
operationDebug(ExecState
*, int32_t) WTF_INTERNAL
;
260 SlowPathReturnType JIT_OPERATION
operationOptimize(ExecState
*, int32_t) WTF_INTERNAL
;
262 void JIT_OPERATION
operationPutByIndex(ExecState
*, EncodedJSValue
, int32_t, EncodedJSValue
);
264 void JIT_OPERATION
operationPutGetterSetter(ExecState
*, EncodedJSValue
, Identifier
*, EncodedJSValue
, EncodedJSValue
) WTF_INTERNAL
;
266 void JIT_OPERATION
operationPutGetterSetter(ExecState
*, JSCell
*, Identifier
*, JSCell
*, JSCell
*) WTF_INTERNAL
;
268 void JIT_OPERATION
operationPushNameScope(ExecState
*, Identifier
*, EncodedJSValue
, int32_t) WTF_INTERNAL
;
269 void JIT_OPERATION
operationPushWithScope(ExecState
*, EncodedJSValue
) WTF_INTERNAL
;
270 void JIT_OPERATION
operationPopScope(ExecState
*) WTF_INTERNAL
;
271 void JIT_OPERATION
operationProfileDidCall(ExecState
*, EncodedJSValue
) WTF_INTERNAL
;
272 void JIT_OPERATION
operationProfileWillCall(ExecState
*, EncodedJSValue
) WTF_INTERNAL
;
273 EncodedJSValue JIT_OPERATION
operationCheckHasInstance(ExecState
*, EncodedJSValue
, EncodedJSValue baseVal
) WTF_INTERNAL
;
274 JSCell
* JIT_OPERATION
operationCreateActivation(ExecState
*, int32_t offset
) WTF_INTERNAL
;
275 JSCell
* JIT_OPERATION
operationCreateArguments(ExecState
*) WTF_INTERNAL
;
276 JSCell
* JIT_OPERATION
operationCreateArgumentsDuringOSRExit(ExecState
*) WTF_INTERNAL
;
277 EncodedJSValue JIT_OPERATION
operationGetArgumentsLength(ExecState
*, int32_t) WTF_INTERNAL
;
278 EncodedJSValue JIT_OPERATION
operationGetByValDefault(ExecState
*, EncodedJSValue encodedBase
, EncodedJSValue encodedSubscript
) WTF_INTERNAL
;
279 EncodedJSValue JIT_OPERATION
operationGetByValGeneric(ExecState
*, EncodedJSValue encodedBase
, EncodedJSValue encodedSubscript
) WTF_INTERNAL
;
280 EncodedJSValue JIT_OPERATION
operationGetByValString(ExecState
*, EncodedJSValue encodedBase
, EncodedJSValue encodedSubscript
) WTF_INTERNAL
;
281 void JIT_OPERATION
operationTearOffActivation(ExecState
*, JSCell
*) WTF_INTERNAL
;
282 void JIT_OPERATION
operationTearOffArguments(ExecState
*, JSCell
*, JSCell
*) WTF_INTERNAL
;
283 EncodedJSValue JIT_OPERATION
operationDeleteById(ExecState
*, EncodedJSValue base
, const Identifier
*) WTF_INTERNAL
;
284 JSCell
* JIT_OPERATION
operationGetPNames(ExecState
*, JSObject
*) WTF_INTERNAL
;
285 EncodedJSValue JIT_OPERATION
operationInstanceOf(ExecState
*, EncodedJSValue
, EncodedJSValue proto
) WTF_INTERNAL
;
286 CallFrame
* JIT_OPERATION
operationSizeFrameForVarargs(ExecState
*, EncodedJSValue arguments
, int32_t firstFreeRegister
, int32_t firstVarArgOffset
) WTF_INTERNAL
;
287 CallFrame
* JIT_OPERATION
operationLoadVarargs(ExecState
*, CallFrame
*, EncodedJSValue thisValue
, EncodedJSValue arguments
, int32_t firstVarArgOffset
) WTF_INTERNAL
;
288 EncodedJSValue JIT_OPERATION
operationToObject(ExecState
*, EncodedJSValue
) WTF_INTERNAL
;
290 char* JIT_OPERATION
operationSwitchCharWithUnknownKeyType(ExecState
*, EncodedJSValue key
, size_t tableIndex
) WTF_INTERNAL
;
291 char* JIT_OPERATION
operationSwitchImmWithUnknownKeyType(ExecState
*, EncodedJSValue key
, size_t tableIndex
) WTF_INTERNAL
;
292 char* JIT_OPERATION
operationSwitchStringWithUnknownKeyType(ExecState
*, EncodedJSValue key
, size_t tableIndex
) WTF_INTERNAL
;
293 EncodedJSValue JIT_OPERATION
operationResolveScope(ExecState
*, int32_t identifierIndex
) WTF_INTERNAL
;
294 EncodedJSValue JIT_OPERATION
operationGetFromScope(ExecState
*, Instruction
* bytecodePC
) WTF_INTERNAL
;
295 void JIT_OPERATION
operationPutToScope(ExecState
*, Instruction
* bytecodePC
) WTF_INTERNAL
;
297 void JIT_OPERATION
operationFlushWriteBarrierBuffer(ExecState
*, JSCell
*);
298 void JIT_OPERATION
operationWriteBarrier(ExecState
*, JSCell
*, JSCell
*);
299 void JIT_OPERATION
operationUnconditionalWriteBarrier(ExecState
*, JSCell
*);
300 void JIT_OPERATION
operationOSRWriteBarrier(ExecState
*, JSCell
*);
302 void JIT_OPERATION
operationInitGlobalConst(ExecState
*, Instruction
*);
304 void JIT_OPERATION
operationExceptionFuzz();
308 inline P_JITOperation_ECli
operationLinkFor(
309 CodeSpecializationKind kind
, RegisterPreservationMode registers
)
314 case RegisterPreservationNotRequired
:
315 return operationLinkCall
;
316 case MustPreserveRegisters
:
317 return operationLinkCallThatPreservesRegs
;
320 case CodeForConstruct
:
322 case RegisterPreservationNotRequired
:
323 return operationLinkConstruct
;
324 case MustPreserveRegisters
:
325 return operationLinkConstructThatPreservesRegs
;
329 RELEASE_ASSERT_NOT_REACHED();
333 inline P_JITOperation_ECli
operationVirtualFor(
334 CodeSpecializationKind kind
, RegisterPreservationMode registers
)
339 case RegisterPreservationNotRequired
:
340 return operationVirtualCall
;
341 case MustPreserveRegisters
:
342 return operationVirtualCallThatPreservesRegs
;
345 case CodeForConstruct
:
347 case RegisterPreservationNotRequired
:
348 return operationVirtualConstruct
;
349 case MustPreserveRegisters
:
350 return operationVirtualConstructThatPreservesRegs
;
354 RELEASE_ASSERT_NOT_REACHED();
358 inline P_JITOperation_ECli
operationLinkClosureCallFor(RegisterPreservationMode registers
)
361 case RegisterPreservationNotRequired
:
362 return operationLinkClosureCall
;
363 case MustPreserveRegisters
:
364 return operationLinkClosureCallThatPreservesRegs
;
366 RELEASE_ASSERT_NOT_REACHED();
372 #endif // ENABLE(JIT)
374 #endif // JITOperations_h