|
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
|
2 * vim: set ts=8 sts=4 et sw=4 tw=99: |
|
3 * This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 #ifndef jit_MOpcodes_h |
|
8 #define jit_MOpcodes_h |
|
9 |
|
10 namespace js { |
|
11 namespace jit { |
|
12 |
|
13 #define MIR_OPCODE_LIST(_) \ |
|
14 _(Constant) \ |
|
15 _(CloneLiteral) \ |
|
16 _(Parameter) \ |
|
17 _(Callee) \ |
|
18 _(TableSwitch) \ |
|
19 _(Goto) \ |
|
20 _(Test) \ |
|
21 _(TypeObjectDispatch) \ |
|
22 _(FunctionDispatch) \ |
|
23 _(Compare) \ |
|
24 _(Phi) \ |
|
25 _(Beta) \ |
|
26 _(OsrValue) \ |
|
27 _(OsrScopeChain) \ |
|
28 _(OsrReturnValue) \ |
|
29 _(OsrArgumentsObject) \ |
|
30 _(ReturnFromCtor) \ |
|
31 _(CheckOverRecursed) \ |
|
32 _(DefVar) \ |
|
33 _(DefFun) \ |
|
34 _(CreateThis) \ |
|
35 _(CreateThisWithProto) \ |
|
36 _(CreateThisWithTemplate) \ |
|
37 _(CreateArgumentsObject) \ |
|
38 _(GetArgumentsObjectArg) \ |
|
39 _(SetArgumentsObjectArg) \ |
|
40 _(ComputeThis) \ |
|
41 _(LoadArrowThis) \ |
|
42 _(Call) \ |
|
43 _(ApplyArgs) \ |
|
44 _(ArraySplice) \ |
|
45 _(Bail) \ |
|
46 _(AssertFloat32) \ |
|
47 _(GetDynamicName) \ |
|
48 _(FilterArgumentsOrEval) \ |
|
49 _(CallDirectEval) \ |
|
50 _(BitNot) \ |
|
51 _(TypeOf) \ |
|
52 _(ToId) \ |
|
53 _(BitAnd) \ |
|
54 _(BitOr) \ |
|
55 _(BitXor) \ |
|
56 _(Lsh) \ |
|
57 _(Rsh) \ |
|
58 _(Ursh) \ |
|
59 _(MinMax) \ |
|
60 _(Abs) \ |
|
61 _(Sqrt) \ |
|
62 _(Atan2) \ |
|
63 _(Hypot) \ |
|
64 _(Pow) \ |
|
65 _(PowHalf) \ |
|
66 _(Random) \ |
|
67 _(MathFunction) \ |
|
68 _(Add) \ |
|
69 _(Sub) \ |
|
70 _(Mul) \ |
|
71 _(Div) \ |
|
72 _(Mod) \ |
|
73 _(Concat) \ |
|
74 _(ConcatPar) \ |
|
75 _(CharCodeAt) \ |
|
76 _(FromCharCode) \ |
|
77 _(StringSplit) \ |
|
78 _(Return) \ |
|
79 _(Throw) \ |
|
80 _(Box) \ |
|
81 _(Unbox) \ |
|
82 _(GuardObject) \ |
|
83 _(GuardString) \ |
|
84 _(AssertRange) \ |
|
85 _(ToDouble) \ |
|
86 _(ToFloat32) \ |
|
87 _(ToInt32) \ |
|
88 _(TruncateToInt32) \ |
|
89 _(ToString) \ |
|
90 _(NewSlots) \ |
|
91 _(NewArray) \ |
|
92 _(NewObject) \ |
|
93 _(NewDeclEnvObject) \ |
|
94 _(NewCallObject) \ |
|
95 _(NewRunOnceCallObject) \ |
|
96 _(NewStringObject) \ |
|
97 _(InitElem) \ |
|
98 _(InitElemGetterSetter) \ |
|
99 _(MutateProto) \ |
|
100 _(InitProp) \ |
|
101 _(InitPropGetterSetter) \ |
|
102 _(Start) \ |
|
103 _(OsrEntry) \ |
|
104 _(Nop) \ |
|
105 _(RegExp) \ |
|
106 _(RegExpExec) \ |
|
107 _(RegExpTest) \ |
|
108 _(RegExpReplace) \ |
|
109 _(StringReplace) \ |
|
110 _(Lambda) \ |
|
111 _(LambdaArrow) \ |
|
112 _(ImplicitThis) \ |
|
113 _(Slots) \ |
|
114 _(Elements) \ |
|
115 _(ConstantElements) \ |
|
116 _(ConvertElementsToDoubles) \ |
|
117 _(MaybeToDoubleElement) \ |
|
118 _(LoadSlot) \ |
|
119 _(StoreSlot) \ |
|
120 _(FunctionEnvironment) \ |
|
121 _(FilterTypeSet) \ |
|
122 _(TypeBarrier) \ |
|
123 _(MonitorTypes) \ |
|
124 _(PostWriteBarrier) \ |
|
125 _(GetPropertyCache) \ |
|
126 _(GetPropertyPolymorphic) \ |
|
127 _(SetPropertyPolymorphic) \ |
|
128 _(GetElementCache) \ |
|
129 _(SetElementCache) \ |
|
130 _(BindNameCache) \ |
|
131 _(GuardShape) \ |
|
132 _(GuardObjectType) \ |
|
133 _(GuardObjectIdentity) \ |
|
134 _(GuardClass) \ |
|
135 _(ArrayLength) \ |
|
136 _(SetArrayLength) \ |
|
137 _(TypedArrayLength) \ |
|
138 _(TypedArrayElements) \ |
|
139 _(TypedObjectElements) \ |
|
140 _(SetTypedObjectOffset) \ |
|
141 _(InitializedLength) \ |
|
142 _(SetInitializedLength) \ |
|
143 _(Not) \ |
|
144 _(NeuterCheck) \ |
|
145 _(BoundsCheck) \ |
|
146 _(BoundsCheckLower) \ |
|
147 _(InArray) \ |
|
148 _(LoadElement) \ |
|
149 _(LoadElementHole) \ |
|
150 _(StoreElement) \ |
|
151 _(StoreElementHole) \ |
|
152 _(ArrayPopShift) \ |
|
153 _(ArrayPush) \ |
|
154 _(ArrayConcat) \ |
|
155 _(LoadTypedArrayElement) \ |
|
156 _(LoadTypedArrayElementHole) \ |
|
157 _(LoadTypedArrayElementStatic) \ |
|
158 _(StoreTypedArrayElement) \ |
|
159 _(StoreTypedArrayElementHole) \ |
|
160 _(StoreTypedArrayElementStatic) \ |
|
161 _(EffectiveAddress) \ |
|
162 _(ClampToUint8) \ |
|
163 _(LoadFixedSlot) \ |
|
164 _(StoreFixedSlot) \ |
|
165 _(CallGetProperty) \ |
|
166 _(GetNameCache) \ |
|
167 _(CallGetIntrinsicValue) \ |
|
168 _(CallsiteCloneCache) \ |
|
169 _(CallGetElement) \ |
|
170 _(CallSetElement) \ |
|
171 _(CallSetProperty) \ |
|
172 _(CallInitElementArray) \ |
|
173 _(DeleteProperty) \ |
|
174 _(DeleteElement) \ |
|
175 _(SetPropertyCache) \ |
|
176 _(IteratorStart) \ |
|
177 _(IteratorNext) \ |
|
178 _(IteratorMore) \ |
|
179 _(IteratorEnd) \ |
|
180 _(StringLength) \ |
|
181 _(ArgumentsLength) \ |
|
182 _(GetFrameArgument) \ |
|
183 _(SetFrameArgument) \ |
|
184 _(RunOncePrologue) \ |
|
185 _(Rest) \ |
|
186 _(Floor) \ |
|
187 _(Round) \ |
|
188 _(In) \ |
|
189 _(InstanceOf) \ |
|
190 _(CallInstanceOf) \ |
|
191 _(InterruptCheck) \ |
|
192 _(ProfilerStackOp) \ |
|
193 _(GetDOMProperty) \ |
|
194 _(GetDOMMember) \ |
|
195 _(SetDOMProperty) \ |
|
196 _(IsCallable) \ |
|
197 _(HaveSameClass) \ |
|
198 _(HasClass) \ |
|
199 _(AsmJSNeg) \ |
|
200 _(AsmJSUnsignedToDouble) \ |
|
201 _(AsmJSUnsignedToFloat32) \ |
|
202 _(AsmJSLoadHeap) \ |
|
203 _(AsmJSStoreHeap) \ |
|
204 _(AsmJSLoadGlobalVar) \ |
|
205 _(AsmJSStoreGlobalVar) \ |
|
206 _(AsmJSLoadFuncPtr) \ |
|
207 _(AsmJSLoadFFIFunc) \ |
|
208 _(AsmJSReturn) \ |
|
209 _(AsmJSParameter) \ |
|
210 _(AsmJSVoidReturn) \ |
|
211 _(AsmJSPassStackArg) \ |
|
212 _(AsmJSCall) \ |
|
213 _(CheckOverRecursedPar) \ |
|
214 _(NewCallObjectPar) \ |
|
215 _(NewPar) \ |
|
216 _(NewDenseArrayPar) \ |
|
217 _(NewDerivedTypedObject) \ |
|
218 _(AbortPar) \ |
|
219 _(LambdaPar) \ |
|
220 _(RestPar) \ |
|
221 _(ForkJoinContext) \ |
|
222 _(ForkJoinGetSlice) \ |
|
223 _(GuardThreadExclusive) \ |
|
224 _(InterruptCheckPar) \ |
|
225 _(RecompileCheck) |
|
226 |
|
227 // Forward declarations of MIR types. |
|
228 #define FORWARD_DECLARE(op) class M##op; |
|
229 MIR_OPCODE_LIST(FORWARD_DECLARE) |
|
230 #undef FORWARD_DECLARE |
|
231 |
|
232 class MInstructionVisitor // interface i.e. pure abstract class |
|
233 { |
|
234 public: |
|
235 #define VISIT_INS(op) virtual bool visit##op(M##op *) = 0; |
|
236 MIR_OPCODE_LIST(VISIT_INS) |
|
237 #undef VISIT_INS |
|
238 }; |
|
239 |
|
240 class MInstructionVisitorWithDefaults : public MInstructionVisitor |
|
241 { |
|
242 public: |
|
243 #define VISIT_INS(op) virtual bool visit##op(M##op *) { MOZ_ASSUME_UNREACHABLE("NYI: " #op); } |
|
244 MIR_OPCODE_LIST(VISIT_INS) |
|
245 #undef VISIT_INS |
|
246 }; |
|
247 |
|
248 } // namespace jit |
|
249 } // namespace js |
|
250 |
|
251 #endif /* jit_MOpcodes_h */ |