1/*
2 * Copyright (C) 2013-2017 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#pragma once
27
28#if ENABLE(JIT)
29
30#include "JITMathICForwards.h"
31#include "SlowPathReturnType.h"
32#include <wtf/Platform.h>
33#include <wtf/text/UniquedStringImpl.h>
34
35namespace JSC {
36
37typedef int64_t EncodedJSValue;
38
39class ArrayAllocationProfile;
40class ArrayProfile;
41class UnaryArithProfile;
42class BinaryArithProfile;
43class Butterfly;
44class CallFrame;
45class CallLinkInfo;
46class CodeBlock;
47class JSArray;
48class JSCell;
49class JSFunction;
50class JSGlobalObject;
51class JSLexicalEnvironment;
52class JSObject;
53class JSScope;
54class JSString;
55class JSValue;
56class RegExp;
57class RegExpObject;
58class Register;
59class Structure;
60class StructureStubInfo;
61class Symbol;
62class SymbolTable;
63class VM;
64class WatchpointSet;
65
66struct ByValInfo;
67struct InlineCallFrame;
68struct Instruction;
69
70extern "C" {
71
72typedef char* UnusedPtr;
73
74// These typedefs provide typechecking when generating calls out to helper routines;
75// this helps prevent calling a helper routine with the wrong arguments!
76/*
77 Key:
78 A: JSArray*
79 Aap: ArrayAllocationProfile*
80 Ap: ArrayProfile*
81 Arp: BinaryArithProfile*
82 B: Butterfly*
83 By: ByValInfo*
84 C: JSCell*
85 Cb: CodeBlock*
86 Cli: CallLinkInfo*
87 D: double
88 F: CallFrame*
89 G: JSGlobalObject*
90 I: UniquedStringImpl*
91 Icf: InlineCallFrame*
92 Idc: const Identifier*
93 J: EncodedJSValue
94 Mic: JITMathIC* (can be JITAddIC*, JITMulIC*, etc).
95 Jcp: const JSValue*
96 Jsc: JSScope*
97 Jsf: JSFunction*
98 Jss: JSString*
99 L: JSLexicalEnvironment*
100 O: JSObject*
101 P: pointer (char*)
102 Pc: Instruction* i.e. bytecode PC
103 Q: int64_t
104 R: Register
105 Re: RegExp*
106 Reo: RegExpObject*
107 S: size_t
108 Sprt: SlowPathReturnType
109 Ssi: StructureStubInfo*
110 St: Structure*
111 Symtab: SymbolTable*
112 Sym: Symbol*
113 T: StringImpl*
114 V: void
115 Vm: VM*
116 Ws: WatchpointSet*
117 Z: int32_t
118 Ui: uint32_t
119*/
120
121using J_JITOperation_GJMic = EncodedJSValue(JIT_OPERATION *)(JSGlobalObject*, EncodedJSValue, void*);
122using J_JITOperation_GP = EncodedJSValue(JIT_OPERATION *)(JSGlobalObject*, void*);
123using J_JITOperation_GPP = EncodedJSValue(JIT_OPERATION *)(JSGlobalObject*, void*, void*);
124using J_JITOperation_GPPP = EncodedJSValue(JIT_OPERATION *)(JSGlobalObject*, void*, void*, void*);
125using J_JITOperation_GJJ = EncodedJSValue(JIT_OPERATION *)(JSGlobalObject*, EncodedJSValue, EncodedJSValue);
126using J_JITOperation_GJJMic = EncodedJSValue(JIT_OPERATION *)(JSGlobalObject*, EncodedJSValue, EncodedJSValue, void*);
127using Z_JITOperation_GJZZ = int32_t(JIT_OPERATION *)(JSGlobalObject*, EncodedJSValue, int32_t, int32_t);
128using F_JITOperation_GFJZZ = CallFrame*(JIT_OPERATION *)(JSGlobalObject*, CallFrame*, EncodedJSValue, int32_t, int32_t);
129using Sprt_JITOperation_EGCli = SlowPathReturnType(JIT_OPERATION *)(CallFrame*, JSGlobalObject*, CallLinkInfo*);
130using V_JITOperation_Cb = void(JIT_OPERATION *)(CodeBlock*);
131using Z_JITOperation_G = int32_t (JIT_OPERATION *)(JSGlobalObject*);
132using P_JITOperation_VmStZB = char*(JIT_OPERATION *)(VM*, Structure*, int32_t, Butterfly*);
133using P_JITOperation_GStZB = char*(JIT_OPERATION *)(JSGlobalObject*, Structure*, int32_t, Butterfly*);
134using J_JITOperation_GJ = EncodedJSValue(JIT_OPERATION *)(JSGlobalObject*, EncodedJSValue);
135using J_JITOperation_GJI = EncodedJSValue(JIT_OPERATION *)(JSGlobalObject*, EncodedJSValue, UniquedStringImpl*);
136using V_JITOperation_GSsiJJI = void(JIT_OPERATION *)(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, EncodedJSValue, UniquedStringImpl*);
137using C_JITOperation_TT = uintptr_t(JIT_OPERATION *)(StringImpl*, StringImpl*);
138using C_JITOperation_B_GJssJss = uintptr_t(JIT_OPERATION *)(JSGlobalObject*, JSString*, JSString*);
139using S_JITOperation_GJJ = size_t(JIT_OPERATION *)(JSGlobalObject*, EncodedJSValue, EncodedJSValue);
140using V_JITOperation_GJJJ = void(JIT_OPERATION *)(JSGlobalObject*, EncodedJSValue, EncodedJSValue, EncodedJSValue);
141using J_JITOperation_GSsiJJ = EncodedJSValue(JIT_OPERATION *)(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, EncodedJSValue);
142using J_JITOperation_GSsiJJI = EncodedJSValue(JIT_OPERATION *)(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, EncodedJSValue, UniquedStringImpl*);
143using V_JITOperation_GCCJ = void(JIT_OPERATION *)(JSGlobalObject*, JSCell*, JSCell*, EncodedJSValue);
144using J_JITOperation_GSsiJI = EncodedJSValue(JIT_OPERATION *)(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*);
145using Z_JITOperation_GJZZ = int32_t(JIT_OPERATION *)(JSGlobalObject*, EncodedJSValue, int32_t, int32_t);
146using F_JITOperation_GFJZZ = CallFrame*(JIT_OPERATION *)(JSGlobalObject*, CallFrame*, EncodedJSValue, int32_t, int32_t);
147using D_JITOperation_DD = double(JIT_OPERATION *)(double, double);
148using D_JITOperation_D = double(JIT_OPERATION *)(double);
149
150// This method is used to lookup an exception hander, keyed by faultLocation, which is
151// the return location from one of the calls out to one of the helper operations above.
152
153void JIT_OPERATION operationLookupExceptionHandler(VM*) WTF_INTERNAL;
154void JIT_OPERATION operationLookupExceptionHandlerFromCallerFrame(VM*) WTF_INTERNAL;
155void JIT_OPERATION operationVMHandleException(VM*) WTF_INTERNAL;
156void JIT_OPERATION operationThrowStackOverflowErrorFromThunk(JSGlobalObject*) WTF_INTERNAL;
157
158void JIT_OPERATION operationThrowStackOverflowError(CodeBlock*) WTF_INTERNAL;
159int32_t JIT_OPERATION operationCallArityCheck(JSGlobalObject*) WTF_INTERNAL;
160int32_t JIT_OPERATION operationConstructArityCheck(JSGlobalObject*) WTF_INTERNAL;
161EncodedJSValue JIT_OPERATION operationTryGetById(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
162EncodedJSValue JIT_OPERATION operationTryGetByIdGeneric(JSGlobalObject*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
163EncodedJSValue JIT_OPERATION operationTryGetByIdOptimize(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
164EncodedJSValue JIT_OPERATION operationGetById(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
165EncodedJSValue JIT_OPERATION operationGetByIdGeneric(JSGlobalObject*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
166EncodedJSValue JIT_OPERATION operationGetByIdOptimize(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
167EncodedJSValue JIT_OPERATION operationGetByIdWithThis(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
168EncodedJSValue JIT_OPERATION operationGetByIdWithThisGeneric(JSGlobalObject*, EncodedJSValue, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
169EncodedJSValue JIT_OPERATION operationGetByIdWithThisOptimize(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
170EncodedJSValue JIT_OPERATION operationGetByIdDirect(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
171EncodedJSValue JIT_OPERATION operationGetByIdDirectGeneric(JSGlobalObject*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
172EncodedJSValue JIT_OPERATION operationGetByIdDirectOptimize(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
173EncodedJSValue JIT_OPERATION operationInById(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
174EncodedJSValue JIT_OPERATION operationInByIdGeneric(JSGlobalObject*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
175EncodedJSValue JIT_OPERATION operationInByIdOptimize(JSGlobalObject*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
176EncodedJSValue JIT_OPERATION operationInOptimize(JSGlobalObject*, StructureStubInfo*, JSCell*, UniquedStringImpl*) WTF_INTERNAL;
177EncodedJSValue JIT_OPERATION operationIn(JSGlobalObject*, StructureStubInfo*, JSCell*, UniquedStringImpl*) WTF_INTERNAL;
178EncodedJSValue JIT_OPERATION operationInByVal(JSGlobalObject*, JSCell*, EncodedJSValue) WTF_INTERNAL;
179void JIT_OPERATION operationPutByIdStrict(JSGlobalObject*, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl*) WTF_INTERNAL;
180void JIT_OPERATION operationPutByIdNonStrict(JSGlobalObject*, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl*) WTF_INTERNAL;
181void JIT_OPERATION operationPutByIdDirectStrict(JSGlobalObject*, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl*) WTF_INTERNAL;
182void JIT_OPERATION operationPutByIdDirectNonStrict(JSGlobalObject*, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl*) WTF_INTERNAL;
183void JIT_OPERATION operationPutByIdStrictOptimize(JSGlobalObject*, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl*) WTF_INTERNAL;
184void JIT_OPERATION operationPutByIdNonStrictOptimize(JSGlobalObject*, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl*) WTF_INTERNAL;
185void JIT_OPERATION operationPutByIdDirectStrictOptimize(JSGlobalObject*, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl*) WTF_INTERNAL;
186void JIT_OPERATION operationPutByIdDirectNonStrictOptimize(JSGlobalObject*, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl*) WTF_INTERNAL;
187void JIT_OPERATION operationPutByIdStrictBuildList(JSGlobalObject*, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl*) WTF_INTERNAL;
188void JIT_OPERATION operationPutByIdNonStrictBuildList(JSGlobalObject*, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl*) WTF_INTERNAL;
189void JIT_OPERATION operationPutByIdDirectStrictBuildList(JSGlobalObject*, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl*) WTF_INTERNAL;
190void JIT_OPERATION operationPutByIdDirectNonStrictBuildList(JSGlobalObject*, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl*) WTF_INTERNAL;
191void JIT_OPERATION operationPutByValOptimize(JSGlobalObject*, EncodedJSValue, EncodedJSValue, EncodedJSValue, ByValInfo*) WTF_INTERNAL;
192void JIT_OPERATION operationDirectPutByValOptimize(JSGlobalObject*, EncodedJSValue, EncodedJSValue, EncodedJSValue, ByValInfo*) WTF_INTERNAL;
193void JIT_OPERATION operationPutByValGeneric(JSGlobalObject*, EncodedJSValue, EncodedJSValue, EncodedJSValue, ByValInfo*) WTF_INTERNAL;
194void JIT_OPERATION operationDirectPutByValGeneric(JSGlobalObject*, EncodedJSValue, EncodedJSValue, EncodedJSValue, ByValInfo*) WTF_INTERNAL;
195EncodedJSValue JIT_OPERATION operationCallEval(JSGlobalObject*, CallFrame*) WTF_INTERNAL;
196SlowPathReturnType JIT_OPERATION operationLinkCall(CallFrame*, JSGlobalObject*, CallLinkInfo*) WTF_INTERNAL;
197SlowPathReturnType JIT_OPERATION operationLinkPolymorphicCall(CallFrame*, JSGlobalObject*, CallLinkInfo*) WTF_INTERNAL;
198SlowPathReturnType JIT_OPERATION operationVirtualCall(CallFrame*, JSGlobalObject*, CallLinkInfo*) WTF_INTERNAL;
199
200size_t JIT_OPERATION operationCompareLess(JSGlobalObject*, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
201size_t JIT_OPERATION operationCompareLessEq(JSGlobalObject*, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
202size_t JIT_OPERATION operationCompareGreater(JSGlobalObject*, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
203size_t JIT_OPERATION operationCompareGreaterEq(JSGlobalObject*, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
204size_t JIT_OPERATION operationCompareEq(JSGlobalObject*, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
205size_t JIT_OPERATION operationCompareStrictEq(JSGlobalObject*, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
206#if USE(JSVALUE64)
207EncodedJSValue JIT_OPERATION operationCompareStringEq(JSGlobalObject*, JSCell* left, JSCell* right) WTF_INTERNAL;
208#else
209size_t JIT_OPERATION operationCompareStringEq(JSGlobalObject*, JSCell* left, JSCell* right) WTF_INTERNAL;
210#endif
211EncodedJSValue JIT_OPERATION operationNewArrayWithProfile(JSGlobalObject*, ArrayAllocationProfile*, const JSValue* values, int32_t size) WTF_INTERNAL;
212EncodedJSValue JIT_OPERATION operationNewArrayWithSizeAndProfile(JSGlobalObject*, ArrayAllocationProfile*, EncodedJSValue size) WTF_INTERNAL;
213EncodedJSValue JIT_OPERATION operationNewFunction(VM*, JSScope*, JSCell*) WTF_INTERNAL;
214EncodedJSValue JIT_OPERATION operationNewFunctionWithInvalidatedReallocationWatchpoint(VM*, JSScope*, JSCell*) WTF_INTERNAL;
215EncodedJSValue JIT_OPERATION operationNewGeneratorFunction(VM*, JSScope*, JSCell*) WTF_INTERNAL;
216EncodedJSValue JIT_OPERATION operationNewGeneratorFunctionWithInvalidatedReallocationWatchpoint(VM*, JSScope*, JSCell*) WTF_INTERNAL;
217EncodedJSValue JIT_OPERATION operationNewAsyncFunction(VM*, JSScope*, JSCell*) WTF_INTERNAL;
218EncodedJSValue JIT_OPERATION operationNewAsyncFunctionWithInvalidatedReallocationWatchpoint(VM*, JSScope*, JSCell*) WTF_INTERNAL;
219EncodedJSValue JIT_OPERATION operationNewAsyncGeneratorFunction(VM*, JSScope*, JSCell*) WTF_INTERNAL;
220EncodedJSValue JIT_OPERATION operationNewAsyncGeneratorFunctionWithInvalidatedReallocationWatchpoint(VM*, JSScope*, JSCell*) WTF_INTERNAL;
221void JIT_OPERATION operationSetFunctionName(JSGlobalObject*, JSCell*, EncodedJSValue) WTF_INTERNAL;
222JSCell* JIT_OPERATION operationNewObject(VM*, Structure*) WTF_INTERNAL;
223JSCell* JIT_OPERATION operationNewPromise(VM*, Structure*) WTF_INTERNAL;
224JSCell* JIT_OPERATION operationNewInternalPromise(VM*, Structure*) WTF_INTERNAL;
225JSCell* JIT_OPERATION operationNewGenerator(VM*, Structure*) WTF_INTERNAL;
226JSCell* JIT_OPERATION operationNewAsyncGenerator(VM*, Structure*) WTF_INTERNAL;
227JSCell* JIT_OPERATION operationNewRegexp(JSGlobalObject*, JSCell*) WTF_INTERNAL;
228UnusedPtr JIT_OPERATION operationHandleTraps(JSGlobalObject*) WTF_INTERNAL;
229void JIT_OPERATION operationThrow(JSGlobalObject*, EncodedJSValue) WTF_INTERNAL;
230void JIT_OPERATION operationDebug(VM*, int32_t) WTF_INTERNAL;
231#if ENABLE(DFG_JIT)
232SlowPathReturnType JIT_OPERATION operationOptimize(VM*, uint32_t) WTF_INTERNAL;
233char* JIT_OPERATION operationTryOSREnterAtCatch(VM*, uint32_t) WTF_INTERNAL;
234char* JIT_OPERATION operationTryOSREnterAtCatchAndValueProfile(VM*, uint32_t) WTF_INTERNAL;
235#endif
236void JIT_OPERATION operationPutByIndex(JSGlobalObject*, EncodedJSValue, int32_t, EncodedJSValue);
237void JIT_OPERATION operationPutGetterById(JSGlobalObject*, JSCell*, UniquedStringImpl*, int32_t options, JSCell*) WTF_INTERNAL;
238void JIT_OPERATION operationPutSetterById(JSGlobalObject*, JSCell*, UniquedStringImpl*, int32_t options, JSCell*) WTF_INTERNAL;
239void JIT_OPERATION operationPutGetterByVal(JSGlobalObject*, JSCell*, EncodedJSValue, int32_t attribute, JSCell*) WTF_INTERNAL;
240void JIT_OPERATION operationPutSetterByVal(JSGlobalObject*, JSCell*, EncodedJSValue, int32_t attribute, JSCell*) WTF_INTERNAL;
241#if USE(JSVALUE64)
242void JIT_OPERATION operationPutGetterSetter(JSGlobalObject*, JSCell*, UniquedStringImpl*, int32_t attribute, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
243#else
244void JIT_OPERATION operationPutGetterSetter(JSGlobalObject*, JSCell*, UniquedStringImpl*, int32_t attribute, JSCell*, JSCell*) WTF_INTERNAL;
245#endif
246void JIT_OPERATION operationPushFunctionNameScope(JSGlobalObject*, int32_t, SymbolTable*, EncodedJSValue) WTF_INTERNAL;
247void JIT_OPERATION operationPopScope(JSGlobalObject*, int32_t) WTF_INTERNAL;
248
249EncodedJSValue JIT_OPERATION operationGetByValOptimize(JSGlobalObject*, StructureStubInfo*, ArrayProfile*, EncodedJSValue encodedBase, EncodedJSValue encodedSubscript) WTF_INTERNAL;
250EncodedJSValue JIT_OPERATION operationGetByValGeneric(JSGlobalObject*, StructureStubInfo*, ArrayProfile*, EncodedJSValue encodedBase, EncodedJSValue encodedSubscript) WTF_INTERNAL;
251EncodedJSValue JIT_OPERATION operationHasIndexedPropertyDefault(JSGlobalObject*, EncodedJSValue encodedBase, EncodedJSValue encodedSubscript, ByValInfo*) WTF_INTERNAL;
252EncodedJSValue JIT_OPERATION operationHasIndexedPropertyGeneric(JSGlobalObject*, EncodedJSValue encodedBase, EncodedJSValue encodedSubscript, ByValInfo*) WTF_INTERNAL;
253EncodedJSValue JIT_OPERATION operationDeleteByIdJSResult(JSGlobalObject*, EncodedJSValue base, UniquedStringImpl*) WTF_INTERNAL;
254size_t JIT_OPERATION operationDeleteById(JSGlobalObject*, EncodedJSValue base, UniquedStringImpl*) WTF_INTERNAL;
255EncodedJSValue JIT_OPERATION operationDeleteByValJSResult(JSGlobalObject*, EncodedJSValue base, EncodedJSValue target) WTF_INTERNAL;
256size_t JIT_OPERATION operationDeleteByVal(JSGlobalObject*, EncodedJSValue base, EncodedJSValue target) WTF_INTERNAL;
257JSCell* JIT_OPERATION operationPushWithScope(JSGlobalObject*, JSCell* currentScopeCell, EncodedJSValue object) WTF_INTERNAL;
258JSCell* JIT_OPERATION operationPushWithScopeObject(JSGlobalObject* globalObject, JSCell* currentScopeCell, JSObject* object) WTF_INTERNAL;
259JSCell* JIT_OPERATION operationGetPNames(JSGlobalObject*, JSObject*) WTF_INTERNAL;
260EncodedJSValue JIT_OPERATION operationInstanceOf(JSGlobalObject*, EncodedJSValue value, EncodedJSValue proto) WTF_INTERNAL;
261EncodedJSValue JIT_OPERATION operationInstanceOfGeneric(JSGlobalObject*, StructureStubInfo*, EncodedJSValue value, EncodedJSValue proto) WTF_INTERNAL;
262EncodedJSValue JIT_OPERATION operationInstanceOfOptimize(JSGlobalObject*, StructureStubInfo*, EncodedJSValue value, EncodedJSValue proto) WTF_INTERNAL;
263int32_t JIT_OPERATION operationSizeFrameForForwardArguments(JSGlobalObject*, EncodedJSValue arguments, int32_t numUsedStackSlots, int32_t firstVarArgOffset) WTF_INTERNAL;
264int32_t JIT_OPERATION operationSizeFrameForVarargs(JSGlobalObject*, EncodedJSValue arguments, int32_t numUsedStackSlots, int32_t firstVarArgOffset) WTF_INTERNAL;
265CallFrame* JIT_OPERATION operationSetupForwardArgumentsFrame(JSGlobalObject*, CallFrame*, EncodedJSValue, int32_t, int32_t length) WTF_INTERNAL;
266CallFrame* JIT_OPERATION operationSetupVarargsFrame(JSGlobalObject*, CallFrame*, EncodedJSValue arguments, int32_t firstVarArgOffset, int32_t length) WTF_INTERNAL;
267
268char* JIT_OPERATION operationSwitchCharWithUnknownKeyType(JSGlobalObject*, EncodedJSValue key, size_t tableIndex) WTF_INTERNAL;
269char* JIT_OPERATION operationSwitchImmWithUnknownKeyType(VM*, EncodedJSValue key, size_t tableIndex) WTF_INTERNAL;
270char* JIT_OPERATION operationSwitchStringWithUnknownKeyType(JSGlobalObject*, EncodedJSValue key, size_t tableIndex) WTF_INTERNAL;
271EncodedJSValue JIT_OPERATION operationGetFromScope(JSGlobalObject*, const Instruction* bytecodePC) WTF_INTERNAL;
272void JIT_OPERATION operationPutToScope(JSGlobalObject*, const Instruction* bytecodePC) WTF_INTERNAL;
273
274char* JIT_OPERATION operationReallocateButterflyToHavePropertyStorageWithInitialCapacity(VM*, JSObject*) WTF_INTERNAL;
275char* JIT_OPERATION operationReallocateButterflyToGrowPropertyStorage(VM*, JSObject*, size_t newSize) WTF_INTERNAL;
276
277void JIT_OPERATION operationWriteBarrierSlowPath(VM*, JSCell*);
278void JIT_OPERATION operationOSRWriteBarrier(VM*, JSCell*);
279
280void JIT_OPERATION operationExceptionFuzz(JSGlobalObject*);
281
282int32_t JIT_OPERATION operationCheckIfExceptionIsUncatchableAndNotifyProfiler(VM*);
283int32_t JIT_OPERATION operationInstanceOfCustom(JSGlobalObject*, EncodedJSValue encodedValue, JSObject* constructor, EncodedJSValue encodedHasInstance) WTF_INTERNAL;
284
285EncodedJSValue JIT_OPERATION operationValueAdd(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL;
286EncodedJSValue JIT_OPERATION operationValueAddProfiled(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, BinaryArithProfile*) WTF_INTERNAL;
287EncodedJSValue JIT_OPERATION operationValueAddProfiledOptimize(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, JITAddIC*) WTF_INTERNAL;
288EncodedJSValue JIT_OPERATION operationValueAddProfiledNoOptimize(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, JITAddIC*) WTF_INTERNAL;
289EncodedJSValue JIT_OPERATION operationValueAddOptimize(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, JITAddIC*) WTF_INTERNAL;
290EncodedJSValue JIT_OPERATION operationValueAddNoOptimize(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, JITAddIC*) WTF_INTERNAL;
291EncodedJSValue JIT_OPERATION operationValueMul(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL;
292EncodedJSValue JIT_OPERATION operationValueMulOptimize(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, JITMulIC*) WTF_INTERNAL;
293EncodedJSValue JIT_OPERATION operationValueMulNoOptimize(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, JITMulIC*) WTF_INTERNAL;
294EncodedJSValue JIT_OPERATION operationValueMulProfiledOptimize(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, JITMulIC*) WTF_INTERNAL;
295EncodedJSValue JIT_OPERATION operationValueMulProfiledNoOptimize(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, JITMulIC*) WTF_INTERNAL;
296EncodedJSValue JIT_OPERATION operationValueMulProfiled(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, BinaryArithProfile*) WTF_INTERNAL;
297EncodedJSValue JIT_OPERATION operationArithNegate(JSGlobalObject*, EncodedJSValue operand);
298EncodedJSValue JIT_OPERATION operationArithNegateProfiled(JSGlobalObject*, EncodedJSValue operand, UnaryArithProfile*);
299EncodedJSValue JIT_OPERATION operationArithNegateProfiledOptimize(JSGlobalObject*, EncodedJSValue encodedOperand, JITNegIC*);
300EncodedJSValue JIT_OPERATION operationArithNegateOptimize(JSGlobalObject*, EncodedJSValue encodedOperand, JITNegIC*);
301EncodedJSValue JIT_OPERATION operationValueSub(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL;
302EncodedJSValue JIT_OPERATION operationValueSubProfiled(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, BinaryArithProfile*) WTF_INTERNAL;
303EncodedJSValue JIT_OPERATION operationValueSubOptimize(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, JITSubIC*) WTF_INTERNAL;
304EncodedJSValue JIT_OPERATION operationValueSubNoOptimize(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, JITSubIC*) WTF_INTERNAL;
305EncodedJSValue JIT_OPERATION operationValueSubProfiledOptimize(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, JITSubIC*) WTF_INTERNAL;
306EncodedJSValue JIT_OPERATION operationValueSubProfiledNoOptimize(JSGlobalObject*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, JITSubIC*) WTF_INTERNAL;
307
308void JIT_OPERATION operationProcessTypeProfilerLog(VM*) WTF_INTERNAL;
309void JIT_OPERATION operationProcessShadowChickenLog(VM*) WTF_INTERNAL;
310
311} // extern "C"
312
313} // namespace JSC
314
315#endif // ENABLE(JIT)
316