Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/compiler/qv4instr_moth_p.h |
Source code | Switch to Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | /**************************************************************************** | - | ||||||
2 | ** | - | ||||||
3 | ** Copyright (C) 2016 The Qt Company Ltd. | - | ||||||
4 | ** Contact: https://www.qt.io/licensing/ | - | ||||||
5 | ** | - | ||||||
6 | ** This file is part of the QtQml module of the Qt Toolkit. | - | ||||||
7 | ** | - | ||||||
8 | ** $QT_BEGIN_LICENSE:LGPL$ | - | ||||||
9 | ** Commercial License Usage | - | ||||||
10 | ** Licensees holding valid commercial Qt licenses may use this file in | - | ||||||
11 | ** accordance with the commercial license agreement provided with the | - | ||||||
12 | ** Software or, alternatively, in accordance with the terms contained in | - | ||||||
13 | ** a written agreement between you and The Qt Company. For licensing terms | - | ||||||
14 | ** and conditions see https://www.qt.io/terms-conditions. For further | - | ||||||
15 | ** information use the contact form at https://www.qt.io/contact-us. | - | ||||||
16 | ** | - | ||||||
17 | ** GNU Lesser General Public License Usage | - | ||||||
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - | ||||||
19 | ** General Public License version 3 as published by the Free Software | - | ||||||
20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | - | ||||||
21 | ** packaging of this file. Please review the following information to | - | ||||||
22 | ** ensure the GNU Lesser General Public License version 3 requirements | - | ||||||
23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | - | ||||||
24 | ** | - | ||||||
25 | ** GNU General Public License Usage | - | ||||||
26 | ** Alternatively, this file may be used under the terms of the GNU | - | ||||||
27 | ** General Public License version 2.0 or (at your option) the GNU General | - | ||||||
28 | ** Public license version 3 or any later version approved by the KDE Free | - | ||||||
29 | ** Qt Foundation. The licenses are as published by the Free Software | - | ||||||
30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | - | ||||||
31 | ** included in the packaging of this file. Please review the following | - | ||||||
32 | ** information to ensure the GNU General Public License requirements will | - | ||||||
33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | - | ||||||
34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | - | ||||||
35 | ** | - | ||||||
36 | ** $QT_END_LICENSE$ | - | ||||||
37 | ** | - | ||||||
38 | ****************************************************************************/ | - | ||||||
39 | - | |||||||
40 | #ifndef QV4INSTR_MOTH_P_H | - | ||||||
41 | #define QV4INSTR_MOTH_P_H | - | ||||||
42 | - | |||||||
43 | // | - | ||||||
44 | // W A R N I N G | - | ||||||
45 | // ------------- | - | ||||||
46 | // | - | ||||||
47 | // This file is not part of the Qt API. It exists purely as an | - | ||||||
48 | // implementation detail. This header file may change from version to | - | ||||||
49 | // version without notice, or even be removed. | - | ||||||
50 | // | - | ||||||
51 | // We mean it. | - | ||||||
52 | // | - | ||||||
53 | #include <private/qv4global_p.h> | - | ||||||
54 | #include <private/qv4value_p.h> | - | ||||||
55 | #include <private/qv4runtime_p.h> | - | ||||||
56 | #include <private/qv4compileddata_p.h> // for CompiledData::CodeOffsetToLine used by the dumper | - | ||||||
57 | #include <qendian.h> | - | ||||||
58 | - | |||||||
59 | QT_BEGIN_NAMESPACE | - | ||||||
60 | - | |||||||
61 | #define INSTRUCTION(op, name, nargs, ...) \ | - | ||||||
62 | op##_INSTRUCTION(name, nargs, __VA_ARGS__) | - | ||||||
63 | - | |||||||
64 | /* for all jump instructions, the offset has to come last, to simplify the job of the bytecode generator */ | - | ||||||
65 | #define INSTR_Nop(op) INSTRUCTION(op, Nop, 0) | - | ||||||
66 | #define INSTR_Ret(op) INSTRUCTION(op, Ret, 0) | - | ||||||
67 | #define INSTR_Debug(op) INSTRUCTION(op, Debug, 0) | - | ||||||
68 | #define INSTR_LoadConst(op) INSTRUCTION(op, LoadConst, 1, index) | - | ||||||
69 | #define INSTR_LoadZero(op) INSTRUCTION(op, LoadZero, 0) | - | ||||||
70 | #define INSTR_LoadTrue(op) INSTRUCTION(op, LoadTrue, 0) | - | ||||||
71 | #define INSTR_LoadFalse(op) INSTRUCTION(op, LoadFalse, 0) | - | ||||||
72 | #define INSTR_LoadNull(op) INSTRUCTION(op, LoadNull, 0) | - | ||||||
73 | #define INSTR_LoadUndefined(op) INSTRUCTION(op, LoadUndefined, 0) | - | ||||||
74 | #define INSTR_LoadInt(op) INSTRUCTION(op, LoadInt, 1, value) | - | ||||||
75 | #define INSTR_MoveConst(op) INSTRUCTION(op, MoveConst, 2, constIndex, destTemp) | - | ||||||
76 | #define INSTR_LoadReg(op) INSTRUCTION(op, LoadReg, 1, reg) | - | ||||||
77 | #define INSTR_StoreReg(op) INSTRUCTION(op, StoreReg, 1, reg) | - | ||||||
78 | #define INSTR_MoveReg(op) INSTRUCTION(op, MoveReg, 2, srcReg, destReg) | - | ||||||
79 | #define INSTR_LoadLocal(op) INSTRUCTION(op, LoadLocal, 1, index) | - | ||||||
80 | #define INSTR_StoreLocal(op) INSTRUCTION(op, StoreLocal, 1, index) | - | ||||||
81 | #define INSTR_LoadScopedLocal(op) INSTRUCTION(op, LoadScopedLocal, 2, scope, index) | - | ||||||
82 | #define INSTR_StoreScopedLocal(op) INSTRUCTION(op, StoreScopedLocal, 2, scope, index) | - | ||||||
83 | #define INSTR_LoadRuntimeString(op) INSTRUCTION(op, LoadRuntimeString, 1, stringId) | - | ||||||
84 | #define INSTR_MoveRegExp(op) INSTRUCTION(op, MoveRegExp, 2, regExpId, destReg) | - | ||||||
85 | #define INSTR_LoadClosure(op) INSTRUCTION(op, LoadClosure, 1, value) | - | ||||||
86 | #define INSTR_LoadName(op) INSTRUCTION(op, LoadName, 1, name) | - | ||||||
87 | #define INSTR_LoadGlobalLookup(op) INSTRUCTION(op, LoadGlobalLookup, 1, index) | - | ||||||
88 | #define INSTR_StoreNameSloppy(op) INSTRUCTION(op, StoreNameSloppy, 1, name) | - | ||||||
89 | #define INSTR_StoreNameStrict(op) INSTRUCTION(op, StoreNameStrict, 1, name) | - | ||||||
90 | #define INSTR_LoadProperty(op) INSTRUCTION(op, LoadProperty, 1, name) | - | ||||||
91 | #define INSTR_GetLookup(op) INSTRUCTION(op, GetLookup, 1, index) | - | ||||||
92 | #define INSTR_LoadScopeObjectProperty(op) INSTRUCTION(op, LoadScopeObjectProperty, 3, propertyIndex, base, captureRequired) | - | ||||||
93 | #define INSTR_LoadContextObjectProperty(op) INSTRUCTION(op, LoadContextObjectProperty, 3, propertyIndex, base, captureRequired) | - | ||||||
94 | #define INSTR_LoadIdObject(op) INSTRUCTION(op, LoadIdObject, 2, index, base) | - | ||||||
95 | #define INSTR_Yield(op) INSTRUCTION(op, Yield, 0) | - | ||||||
96 | #define INSTR_Resume(op) INSTRUCTION(op, Resume, 1, offset) | - | ||||||
97 | #define INSTR_StoreProperty(op) INSTRUCTION(op, StoreProperty, 2, name, base) | - | ||||||
98 | #define INSTR_SetLookup(op) INSTRUCTION(op, SetLookup, 2, index, base) | - | ||||||
99 | #define INSTR_LoadSuperProperty(op) INSTRUCTION(op, LoadSuperProperty, 1, property) | - | ||||||
100 | #define INSTR_StoreSuperProperty(op) INSTRUCTION(op, StoreSuperProperty, 1, property) | - | ||||||
101 | #define INSTR_StoreScopeObjectProperty(op) INSTRUCTION(op, StoreScopeObjectProperty, 2, base, propertyIndex) | - | ||||||
102 | #define INSTR_StoreContextObjectProperty(op) INSTRUCTION(op, StoreContextObjectProperty, 2, base, propertyIndex) | - | ||||||
103 | #define INSTR_LoadElement(op) INSTRUCTION(op, LoadElement, 1, base) | - | ||||||
104 | #define INSTR_StoreElement(op) INSTRUCTION(op, StoreElement, 2, base, index) | - | ||||||
105 | #define INSTR_CallValue(op) INSTRUCTION(op, CallValue, 3, name, argc, argv) | - | ||||||
106 | #define INSTR_CallProperty(op) INSTRUCTION(op, CallProperty, 4, name, base, argc, argv) | - | ||||||
107 | #define INSTR_CallPropertyLookup(op) INSTRUCTION(op, CallPropertyLookup, 4, lookupIndex, base, argc, argv) | - | ||||||
108 | #define INSTR_CallElement(op) INSTRUCTION(op, CallElement, 4, base, index, argc, argv) | - | ||||||
109 | #define INSTR_CallName(op) INSTRUCTION(op, CallName, 3, name, argc, argv) | - | ||||||
110 | #define INSTR_CallPossiblyDirectEval(op) INSTRUCTION(op, CallPossiblyDirectEval, 2, argc, argv) | - | ||||||
111 | #define INSTR_CallGlobalLookup(op) INSTRUCTION(op, CallGlobalLookup, 3, index, argc, argv) | - | ||||||
112 | #define INSTR_CallScopeObjectProperty(op) INSTRUCTION(op, CallScopeObjectProperty, 4, name, base, argc, argv) | - | ||||||
113 | #define INSTR_CallContextObjectProperty(op) INSTRUCTION(op, CallContextObjectProperty, 4, name, base, argc, argv) | - | ||||||
114 | #define INSTR_CallWithSpread(op) INSTRUCTION(op, CallWithSpread, 4, func, thisObject, argc, argv) | - | ||||||
115 | #define INSTR_Construct(op) INSTRUCTION(op, Construct, 3, func, argc, argv) | - | ||||||
116 | #define INSTR_ConstructWithSpread(op) INSTRUCTION(op, ConstructWithSpread, 3, func, argc, argv) | - | ||||||
117 | #define INSTR_SetUnwindHandler(op) INSTRUCTION(op, SetUnwindHandler, 1, offset) | - | ||||||
118 | #define INSTR_UnwindDispatch(op) INSTRUCTION(op, UnwindDispatch, 0) | - | ||||||
119 | #define INSTR_UnwindToLabel(op) INSTRUCTION(op, UnwindToLabel, 2, level, offset) | - | ||||||
120 | #define INSTR_ThrowException(op) INSTRUCTION(op, ThrowException, 0) | - | ||||||
121 | #define INSTR_GetException(op) INSTRUCTION(op, GetException, 0) | - | ||||||
122 | #define INSTR_SetException(op) INSTRUCTION(op, SetException, 0) | - | ||||||
123 | #define INSTR_CreateCallContext(op) INSTRUCTION(op, CreateCallContext, 0) | - | ||||||
124 | #define INSTR_PushCatchContext(op) INSTRUCTION(op, PushCatchContext, 2, index, name) | - | ||||||
125 | #define INSTR_PushWithContext(op) INSTRUCTION(op, PushWithContext, 0) | - | ||||||
126 | #define INSTR_PushBlockContext(op) INSTRUCTION(op, PushBlockContext, 1, index) | - | ||||||
127 | #define INSTR_CloneBlockContext(op) INSTRUCTION(op, CloneBlockContext, 0) | - | ||||||
128 | #define INSTR_PushScriptContext(op) INSTRUCTION(op, PushScriptContext, 1, index) | - | ||||||
129 | #define INSTR_PopScriptContext(op) INSTRUCTION(op, PopScriptContext, 0) | - | ||||||
130 | #define INSTR_PopContext(op) INSTRUCTION(op, PopContext, 0) | - | ||||||
131 | #define INSTR_GetIterator(op) INSTRUCTION(op, GetIterator, 1, iterator) | - | ||||||
132 | #define INSTR_IteratorNext(op) INSTRUCTION(op, IteratorNext, 1, value) | - | ||||||
133 | #define INSTR_IteratorClose(op) INSTRUCTION(op, IteratorClose, 1, done) | - | ||||||
134 | #define INSTR_DestructureRestElement(op) INSTRUCTION(op, DestructureRestElement, 0) | - | ||||||
135 | #define INSTR_DeleteProperty(op) INSTRUCTION(op, DeleteProperty, 2, base, index) | - | ||||||
136 | #define INSTR_DeleteName(op) INSTRUCTION(op, DeleteName, 1, name) | - | ||||||
137 | #define INSTR_TypeofName(op) INSTRUCTION(op, TypeofName, 1, name) | - | ||||||
138 | #define INSTR_TypeofValue(op) INSTRUCTION(op, TypeofValue, 0) | - | ||||||
139 | #define INSTR_DeclareVar(op) INSTRUCTION(op, DeclareVar, 2, varName, isDeletable) | - | ||||||
140 | #define INSTR_DefineArray(op) INSTRUCTION(op, DefineArray, 2, argc, args) | - | ||||||
141 | #define INSTR_DefineObjectLiteral(op) INSTRUCTION(op, DefineObjectLiteral, 3, internalClassId, argc, args) | - | ||||||
142 | #define INSTR_CreateClass(op) INSTRUCTION(op, CreateClass, 3, classIndex, heritage, computedNames) | - | ||||||
143 | #define INSTR_CreateMappedArgumentsObject(op) INSTRUCTION(op, CreateMappedArgumentsObject, 0) | - | ||||||
144 | #define INSTR_CreateUnmappedArgumentsObject(op) INSTRUCTION(op, CreateUnmappedArgumentsObject, 0) | - | ||||||
145 | #define INSTR_CreateRestParameter(op) INSTRUCTION(op, CreateRestParameter, 1, argIndex) | - | ||||||
146 | #define INSTR_ConvertThisToObject(op) INSTRUCTION(op, ConvertThisToObject, 0) | - | ||||||
147 | #define INSTR_LoadSuperConstructor(op) INSTRUCTION(op, LoadSuperConstructor, 0) | - | ||||||
148 | #define INSTR_ToObject(op) INSTRUCTION(op, ToObject, 0) | - | ||||||
149 | #define INSTR_Jump(op) INSTRUCTION(op, Jump, 1, offset) | - | ||||||
150 | #define INSTR_JumpTrue(op) INSTRUCTION(op, JumpTrue, 1, offset) | - | ||||||
151 | #define INSTR_JumpFalse(op) INSTRUCTION(op, JumpFalse, 1, offset) | - | ||||||
152 | #define INSTR_JumpNotUndefined(op) INSTRUCTION(op, JumpNotUndefined, 1, offset) | - | ||||||
153 | #define INSTR_JumpNoException(op) INSTRUCTION(op, JumpNoException, 1, offset) | - | ||||||
154 | #define INSTR_CmpEqNull(op) INSTRUCTION(op, CmpEqNull, 0) | - | ||||||
155 | #define INSTR_CmpNeNull(op) INSTRUCTION(op, CmpNeNull, 0) | - | ||||||
156 | #define INSTR_CmpEqInt(op) INSTRUCTION(op, CmpEqInt, 1, lhs) | - | ||||||
157 | #define INSTR_CmpNeInt(op) INSTRUCTION(op, CmpNeInt, 1, lhs) | - | ||||||
158 | #define INSTR_CmpEq(op) INSTRUCTION(op, CmpEq, 1, lhs) | - | ||||||
159 | #define INSTR_CmpNe(op) INSTRUCTION(op, CmpNe, 1, lhs) | - | ||||||
160 | #define INSTR_CmpGt(op) INSTRUCTION(op, CmpGt, 1, lhs) | - | ||||||
161 | #define INSTR_CmpGe(op) INSTRUCTION(op, CmpGe, 1, lhs) | - | ||||||
162 | #define INSTR_CmpLt(op) INSTRUCTION(op, CmpLt, 1, lhs) | - | ||||||
163 | #define INSTR_CmpLe(op) INSTRUCTION(op, CmpLe, 1, lhs) | - | ||||||
164 | #define INSTR_CmpStrictEqual(op) INSTRUCTION(op, CmpStrictEqual, 1, lhs) | - | ||||||
165 | #define INSTR_CmpStrictNotEqual(op) INSTRUCTION(op, CmpStrictNotEqual, 1, lhs) | - | ||||||
166 | #define INSTR_CmpIn(op) INSTRUCTION(op, CmpIn, 1, lhs) | - | ||||||
167 | #define INSTR_CmpInstanceOf(op) INSTRUCTION(op, CmpInstanceOf, 1, lhs) | - | ||||||
168 | #define INSTR_UNot(op) INSTRUCTION(op, UNot, 0) | - | ||||||
169 | #define INSTR_UPlus(op) INSTRUCTION(op, UPlus, 0) | - | ||||||
170 | #define INSTR_UMinus(op) INSTRUCTION(op, UMinus, 0) | - | ||||||
171 | #define INSTR_UCompl(op) INSTRUCTION(op, UCompl, 0) | - | ||||||
172 | #define INSTR_Increment(op) INSTRUCTION(op, Increment, 0) | - | ||||||
173 | #define INSTR_Decrement(op) INSTRUCTION(op, Decrement, 0) | - | ||||||
174 | #define INSTR_Add(op) INSTRUCTION(op, Add, 1, lhs) | - | ||||||
175 | #define INSTR_BitAnd(op) INSTRUCTION(op, BitAnd, 1, lhs) | - | ||||||
176 | #define INSTR_BitOr(op) INSTRUCTION(op, BitOr, 1, lhs) | - | ||||||
177 | #define INSTR_BitXor(op) INSTRUCTION(op, BitXor, 1, lhs) | - | ||||||
178 | #define INSTR_UShr(op) INSTRUCTION(op, UShr, 1, lhs) | - | ||||||
179 | #define INSTR_Shr(op) INSTRUCTION(op, Shr, 1, lhs) | - | ||||||
180 | #define INSTR_Shl(op) INSTRUCTION(op, Shl, 1, lhs) | - | ||||||
181 | #define INSTR_BitAndConst(op) INSTRUCTION(op, BitAndConst, 1, rhs) | - | ||||||
182 | #define INSTR_BitOrConst(op) INSTRUCTION(op, BitOrConst, 1, rhs) | - | ||||||
183 | #define INSTR_BitXorConst(op) INSTRUCTION(op, BitXorConst, 1, rhs) | - | ||||||
184 | #define INSTR_UShrConst(op) INSTRUCTION(op, UShrConst, 1, rhs) | - | ||||||
185 | #define INSTR_ShrConst(op) INSTRUCTION(op, ShrConst, 1, rhs) | - | ||||||
186 | #define INSTR_ShlConst(op) INSTRUCTION(op, ShlConst, 1, rhs) | - | ||||||
187 | #define INSTR_Exp(op) INSTRUCTION(op, Exp, 1, lhs) | - | ||||||
188 | #define INSTR_Mul(op) INSTRUCTION(op, Mul, 1, lhs) | - | ||||||
189 | #define INSTR_Div(op) INSTRUCTION(op, Div, 1, lhs) | - | ||||||
190 | #define INSTR_Mod(op) INSTRUCTION(op, Mod, 1, lhs) | - | ||||||
191 | #define INSTR_Sub(op) INSTRUCTION(op, Sub, 1, lhs) | - | ||||||
192 | #define INSTR_LoadQmlContext(op) INSTRUCTION(op, LoadQmlContext, 1, result) | - | ||||||
193 | #define INSTR_LoadQmlImportedScripts(op) INSTRUCTION(op, LoadQmlImportedScripts, 1, result) | - | ||||||
194 | - | |||||||
195 | #define FOR_EACH_MOTH_INSTR_ALL(F) \ | - | ||||||
196 | F(Nop) \ | - | ||||||
197 | FOR_EACH_MOTH_INSTR(F) | - | ||||||
198 | - | |||||||
199 | #define FOR_EACH_MOTH_INSTR(F) \ | - | ||||||
200 | F(Ret) \ | - | ||||||
201 | F(LoadConst) \ | - | ||||||
202 | F(LoadZero) \ | - | ||||||
203 | F(LoadTrue) \ | - | ||||||
204 | F(LoadFalse) \ | - | ||||||
205 | F(LoadNull) \ | - | ||||||
206 | F(LoadUndefined) \ | - | ||||||
207 | F(LoadInt) \ | - | ||||||
208 | F(LoadRuntimeString) \ | - | ||||||
209 | F(MoveConst) \ | - | ||||||
210 | F(LoadReg) \ | - | ||||||
211 | F(StoreReg) \ | - | ||||||
212 | F(MoveReg) \ | - | ||||||
213 | F(LoadLocal) \ | - | ||||||
214 | F(StoreLocal) \ | - | ||||||
215 | F(LoadScopedLocal) \ | - | ||||||
216 | F(StoreScopedLocal) \ | - | ||||||
217 | F(MoveRegExp) \ | - | ||||||
218 | F(LoadClosure) \ | - | ||||||
219 | F(LoadName) \ | - | ||||||
220 | F(LoadGlobalLookup) \ | - | ||||||
221 | F(StoreNameSloppy) \ | - | ||||||
222 | F(StoreNameStrict) \ | - | ||||||
223 | F(LoadElement) \ | - | ||||||
224 | F(StoreElement) \ | - | ||||||
225 | F(LoadProperty) \ | - | ||||||
226 | F(GetLookup) \ | - | ||||||
227 | F(StoreProperty) \ | - | ||||||
228 | F(SetLookup) \ | - | ||||||
229 | F(LoadSuperProperty) \ | - | ||||||
230 | F(StoreSuperProperty) \ | - | ||||||
231 | F(StoreScopeObjectProperty) \ | - | ||||||
232 | F(StoreContextObjectProperty) \ | - | ||||||
233 | F(LoadScopeObjectProperty) \ | - | ||||||
234 | F(LoadContextObjectProperty) \ | - | ||||||
235 | F(LoadIdObject) \ | - | ||||||
236 | F(ConvertThisToObject) \ | - | ||||||
237 | F(ToObject) \ | - | ||||||
238 | F(Jump) \ | - | ||||||
239 | F(JumpTrue) \ | - | ||||||
240 | F(JumpFalse) \ | - | ||||||
241 | F(JumpNoException) \ | - | ||||||
242 | F(JumpNotUndefined) \ | - | ||||||
243 | F(CmpEqNull) \ | - | ||||||
244 | F(CmpNeNull) \ | - | ||||||
245 | F(CmpEqInt) \ | - | ||||||
246 | F(CmpNeInt) \ | - | ||||||
247 | F(CmpEq) \ | - | ||||||
248 | F(CmpNe) \ | - | ||||||
249 | F(CmpGt) \ | - | ||||||
250 | F(CmpGe) \ | - | ||||||
251 | F(CmpLt) \ | - | ||||||
252 | F(CmpLe) \ | - | ||||||
253 | F(CmpStrictEqual) \ | - | ||||||
254 | F(CmpStrictNotEqual) \ | - | ||||||
255 | F(CmpIn) \ | - | ||||||
256 | F(CmpInstanceOf) \ | - | ||||||
257 | F(UNot) \ | - | ||||||
258 | F(UPlus) \ | - | ||||||
259 | F(UMinus) \ | - | ||||||
260 | F(UCompl) \ | - | ||||||
261 | F(Increment) \ | - | ||||||
262 | F(Decrement) \ | - | ||||||
263 | F(Add) \ | - | ||||||
264 | F(BitAnd) \ | - | ||||||
265 | F(BitOr) \ | - | ||||||
266 | F(BitXor) \ | - | ||||||
267 | F(UShr) \ | - | ||||||
268 | F(Shr) \ | - | ||||||
269 | F(Shl) \ | - | ||||||
270 | F(BitAndConst) \ | - | ||||||
271 | F(BitOrConst) \ | - | ||||||
272 | F(BitXorConst) \ | - | ||||||
273 | F(UShrConst) \ | - | ||||||
274 | F(ShrConst) \ | - | ||||||
275 | F(ShlConst) \ | - | ||||||
276 | F(Exp) \ | - | ||||||
277 | F(Mul) \ | - | ||||||
278 | F(Div) \ | - | ||||||
279 | F(Mod) \ | - | ||||||
280 | F(Sub) \ | - | ||||||
281 | F(CallValue) \ | - | ||||||
282 | F(CallProperty) \ | - | ||||||
283 | F(CallPropertyLookup) \ | - | ||||||
284 | F(CallElement) \ | - | ||||||
285 | F(CallName) \ | - | ||||||
286 | F(CallPossiblyDirectEval) \ | - | ||||||
287 | F(CallGlobalLookup) \ | - | ||||||
288 | F(CallScopeObjectProperty) \ | - | ||||||
289 | F(CallContextObjectProperty) \ | - | ||||||
290 | F(CallWithSpread) \ | - | ||||||
291 | F(Construct) \ | - | ||||||
292 | F(ConstructWithSpread) \ | - | ||||||
293 | F(SetUnwindHandler) \ | - | ||||||
294 | F(UnwindDispatch) \ | - | ||||||
295 | F(UnwindToLabel) \ | - | ||||||
296 | F(ThrowException) \ | - | ||||||
297 | F(GetException) \ | - | ||||||
298 | F(SetException) \ | - | ||||||
299 | F(CreateCallContext) \ | - | ||||||
300 | F(PushCatchContext) \ | - | ||||||
301 | F(PushWithContext) \ | - | ||||||
302 | F(PushBlockContext) \ | - | ||||||
303 | F(CloneBlockContext) \ | - | ||||||
304 | F(PopContext) \ | - | ||||||
305 | F(GetIterator) \ | - | ||||||
306 | F(IteratorNext) \ | - | ||||||
307 | F(IteratorClose) \ | - | ||||||
308 | F(DestructureRestElement) \ | - | ||||||
309 | F(DeleteProperty) \ | - | ||||||
310 | F(DeleteName) \ | - | ||||||
311 | F(TypeofName) \ | - | ||||||
312 | F(TypeofValue) \ | - | ||||||
313 | F(DeclareVar) \ | - | ||||||
314 | F(DefineArray) \ | - | ||||||
315 | F(DefineObjectLiteral) \ | - | ||||||
316 | F(CreateMappedArgumentsObject) \ | - | ||||||
317 | F(CreateUnmappedArgumentsObject) \ | - | ||||||
318 | F(CreateRestParameter) \ | - | ||||||
319 | F(LoadQmlContext) \ | - | ||||||
320 | F(LoadQmlImportedScripts) \ | - | ||||||
321 | F(Yield) \ | - | ||||||
322 | F(Resume) \ | - | ||||||
323 | F(CreateClass) \ | - | ||||||
324 | F(LoadSuperConstructor) \ | - | ||||||
325 | F(PushScriptContext) \ | - | ||||||
326 | F(PopScriptContext) \ | - | ||||||
327 | F(Debug) \ | - | ||||||
328 | - | |||||||
329 | #define MOTH_NUM_INSTRUCTIONS() (static_cast<int>(Moth::Instr::Type::Debug_Wide) + 1) | - | ||||||
330 | - | |||||||
331 | #if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) | - | ||||||
332 | // icc before version 1200 doesn't support computed goto, and at least up to version 18.0.0 the | - | ||||||
333 | // current use results in an internal compiler error. We could enable this if/when it gets fixed | - | ||||||
334 | // in a later version. | - | ||||||
335 | # define MOTH_COMPUTED_GOTO | - | ||||||
336 | #endif | - | ||||||
337 | - | |||||||
338 | #define MOTH_INSTR_ALIGN_MASK (Q_ALIGNOF(QV4::Moth::Instr) - 1) | - | ||||||
339 | - | |||||||
340 | #define MOTH_INSTR_ENUM(I) I, I##_Wide, | - | ||||||
341 | #define MOTH_INSTR_SIZE(I) (sizeof(QV4::Moth::Instr::instr_##I)) | - | ||||||
342 | - | |||||||
343 | #define MOTH_EXPAND_FOR_MSVC(x) x | - | ||||||
344 | #define MOTH_DEFINE_ARGS(nargs, ...) \ | - | ||||||
345 | MOTH_EXPAND_FOR_MSVC(MOTH_DEFINE_ARGS##nargs(__VA_ARGS__)) | - | ||||||
346 | - | |||||||
347 | #define MOTH_DEFINE_ARGS0() | - | ||||||
348 | #define MOTH_DEFINE_ARGS1(arg) \ | - | ||||||
349 | int arg; | - | ||||||
350 | #define MOTH_DEFINE_ARGS2(arg1, arg2) \ | - | ||||||
351 | int arg1; \ | - | ||||||
352 | int arg2; | - | ||||||
353 | #define MOTH_DEFINE_ARGS3(arg1, arg2, arg3) \ | - | ||||||
354 | int arg1; \ | - | ||||||
355 | int arg2; \ | - | ||||||
356 | int arg3; | - | ||||||
357 | #define MOTH_DEFINE_ARGS4(arg1, arg2, arg3, arg4) \ | - | ||||||
358 | int arg1; \ | - | ||||||
359 | int arg2; \ | - | ||||||
360 | int arg3; \ | - | ||||||
361 | int arg4; | - | ||||||
362 | - | |||||||
363 | #define MOTH_COLLECT_ENUMS(instr) \ | - | ||||||
364 | INSTR_##instr(MOTH_GET_ENUM) | - | ||||||
365 | #define MOTH_GET_ENUM_INSTRUCTION(name, ...) \ | - | ||||||
366 | name, | - | ||||||
367 | - | |||||||
368 | #define MOTH_EMIT_STRUCTS(instr) \ | - | ||||||
369 | INSTR_##instr(MOTH_EMIT_STRUCT) | - | ||||||
370 | #define MOTH_EMIT_STRUCT_INSTRUCTION(name, nargs, ...) \ | - | ||||||
371 | struct instr_##name { \ | - | ||||||
372 | MOTH_DEFINE_ARGS(nargs, __VA_ARGS__) \ | - | ||||||
373 | }; | - | ||||||
374 | - | |||||||
375 | #define MOTH_EMIT_INSTR_MEMBERS(instr) \ | - | ||||||
376 | INSTR_##instr(MOTH_EMIT_INSTR_MEMBER) | - | ||||||
377 | #define MOTH_EMIT_INSTR_MEMBER_INSTRUCTION(name, nargs, ...) \ | - | ||||||
378 | instr_##name name; | - | ||||||
379 | - | |||||||
380 | #define MOTH_COLLECT_NARGS(instr) \ | - | ||||||
381 | INSTR_##instr(MOTH_COLLECT_ARG_COUNT) | - | ||||||
382 | #define MOTH_COLLECT_ARG_COUNT_INSTRUCTION(name, nargs, ...) \ | - | ||||||
383 | nargs, nargs, | - | ||||||
384 | - | |||||||
385 | #define MOTH_DECODE_ARG(arg, type, nargs, offset) \ | - | ||||||
386 | arg = qFromLittleEndian<type>( \ | - | ||||||
387 | static_cast<const void *>( \ | - | ||||||
388 | &reinterpret_cast<const type *>(code)[-nargs + offset])); | - | ||||||
389 | #define MOTH_ADJUST_CODE(type, nargs) \ | - | ||||||
390 | code += static_cast<quintptr>(nargs*sizeof(type) + 1) | - | ||||||
391 | - | |||||||
392 | #define MOTH_DECODE_INSTRUCTION(name, nargs, ...) \ | - | ||||||
393 | MOTH_DEFINE_ARGS(nargs, __VA_ARGS__) \ | - | ||||||
394 | op_int_##name: \ | - | ||||||
395 | MOTH_ADJUST_CODE(int, nargs); \ | - | ||||||
396 | MOTH_DECODE_ARGS(name, int, nargs, __VA_ARGS__) \ | - | ||||||
397 | goto op_main_##name; \ | - | ||||||
398 | op_byte_##name: \ | - | ||||||
399 | MOTH_ADJUST_CODE(qint8, nargs); \ | - | ||||||
400 | MOTH_DECODE_ARGS(name, qint8, nargs, __VA_ARGS__) \ | - | ||||||
401 | op_main_##name: \ | - | ||||||
402 | ; \ | - | ||||||
403 | - | |||||||
404 | #define MOTH_DECODE_WITH_BASE_INSTRUCTION(name, nargs, ...) \ | - | ||||||
405 | MOTH_DEFINE_ARGS(nargs, __VA_ARGS__) \ | - | ||||||
406 | const char *base_ptr; \ | - | ||||||
407 | op_int_##name: \ | - | ||||||
408 | base_ptr = code; \ | - | ||||||
409 | MOTH_ADJUST_CODE(int, nargs); \ | - | ||||||
410 | MOTH_DECODE_ARGS(name, int, nargs, __VA_ARGS__) \ | - | ||||||
411 | goto op_main_##name; \ | - | ||||||
412 | op_byte_##name: \ | - | ||||||
413 | base_ptr = code; \ | - | ||||||
414 | MOTH_ADJUST_CODE(qint8, nargs); \ | - | ||||||
415 | MOTH_DECODE_ARGS(name, qint8, nargs, __VA_ARGS__) \ | - | ||||||
416 | op_main_##name: \ | - | ||||||
417 | ; \ | - | ||||||
418 | - | |||||||
419 | #define MOTH_DECODE_ARGS(name, type, nargs, ...) \ | - | ||||||
420 | MOTH_EXPAND_FOR_MSVC(MOTH_DECODE_ARGS##nargs(name, type, nargs, __VA_ARGS__)) | - | ||||||
421 | - | |||||||
422 | #define MOTH_DECODE_ARGS0(name, type, nargs, dummy) | - | ||||||
423 | #define MOTH_DECODE_ARGS1(name, type, nargs, arg) \ | - | ||||||
424 | MOTH_DECODE_ARG(arg, type, nargs, 0); | - | ||||||
425 | #define MOTH_DECODE_ARGS2(name, type, nargs, arg1, arg2) \ | - | ||||||
426 | MOTH_DECODE_ARGS1(name, type, nargs, arg1); \ | - | ||||||
427 | MOTH_DECODE_ARG(arg2, type, nargs, 1); | - | ||||||
428 | #define MOTH_DECODE_ARGS3(name, type, nargs, arg1, arg2, arg3) \ | - | ||||||
429 | MOTH_DECODE_ARGS2(name, type, nargs, arg1, arg2); \ | - | ||||||
430 | MOTH_DECODE_ARG(arg3, type, nargs, 2); | - | ||||||
431 | #define MOTH_DECODE_ARGS4(name, type, nargs, arg1, arg2, arg3, arg4) \ | - | ||||||
432 | MOTH_DECODE_ARGS3(name, type, nargs, arg1, arg2, arg3); \ | - | ||||||
433 | MOTH_DECODE_ARG(arg4, type, nargs, 3); | - | ||||||
434 | - | |||||||
435 | #ifdef MOTH_COMPUTED_GOTO | - | ||||||
436 | /* collect jump labels */ | - | ||||||
437 | #define COLLECT_LABELS(instr) \ | - | ||||||
438 | INSTR_##instr(GET_LABEL) \ | - | ||||||
439 | INSTR_##instr(GET_LABEL_WIDE) | - | ||||||
440 | #define GET_LABEL_INSTRUCTION(name, ...) \ | - | ||||||
441 | &&op_byte_##name, | - | ||||||
442 | #define GET_LABEL_WIDE_INSTRUCTION(name, ...) \ | - | ||||||
443 | &&op_int_##name, | - | ||||||
444 | - | |||||||
445 | #define MOTH_JUMP_TABLE \ | - | ||||||
446 | static const void *jumpTable[] = { \ | - | ||||||
447 | FOR_EACH_MOTH_INSTR_ALL(COLLECT_LABELS) \ | - | ||||||
448 | }; | - | ||||||
449 | - | |||||||
450 | #define MOTH_DISPATCH_SINGLE() \ | - | ||||||
451 | goto *jumpTable[*reinterpret_cast<const uchar *>(code)]; | - | ||||||
452 | - | |||||||
453 | #define MOTH_DISPATCH() \ | - | ||||||
454 | MOTH_DISPATCH_SINGLE() \ | - | ||||||
455 | op_byte_Nop: \ | - | ||||||
456 | ++code; \ | - | ||||||
457 | MOTH_DISPATCH_SINGLE() \ | - | ||||||
458 | op_int_Nop: /* wide prefix */ \ | - | ||||||
459 | ++code; \ | - | ||||||
460 | goto *jumpTable[0x100 | *reinterpret_cast<const uchar *>(code)]; | - | ||||||
461 | #else | - | ||||||
462 | #define MOTH_JUMP_TABLE | - | ||||||
463 | - | |||||||
464 | #define MOTH_INSTR_CASE_AND_JUMP(instr) \ | - | ||||||
465 | INSTR_##instr(GET_CASE_AND_JUMP) \ | - | ||||||
466 | INSTR_##instr(GET_CASE_AND_JUMP_WIDE) | - | ||||||
467 | #define GET_CASE_AND_JUMP_INSTRUCTION(name, ...) \ | - | ||||||
468 | case Instr::Type::name: goto op_byte_##name; | - | ||||||
469 | #define GET_CASE_AND_JUMP_WIDE_INSTRUCTION(name, ...) \ | - | ||||||
470 | case Instr::Type::name##_Wide: goto op_int_##name; | - | ||||||
471 | - | |||||||
472 | #define MOTH_DISPATCH() \ | - | ||||||
473 | Instr::Type type = Instr::Type(static_cast<uchar>(*code)); \ | - | ||||||
474 | dispatch: \ | - | ||||||
475 | switch (type) { \ | - | ||||||
476 | case Instr::Type::Nop: \ | - | ||||||
477 | ++code; \ | - | ||||||
478 | type = Instr::Type(static_cast<uchar>(*code)); \ | - | ||||||
479 | goto dispatch; \ | - | ||||||
480 | case Instr::Type::Nop_Wide: /* wide prefix */ \ | - | ||||||
481 | ++code; \ | - | ||||||
482 | type = Instr::Type(0x100 | static_cast<uchar>(*code)); \ | - | ||||||
483 | goto dispatch; \ | - | ||||||
484 | FOR_EACH_MOTH_INSTR(MOTH_INSTR_CASE_AND_JUMP) \ | - | ||||||
485 | } | - | ||||||
486 | #endif | - | ||||||
487 | - | |||||||
488 | namespace QV4 { | - | ||||||
489 | - | |||||||
490 | namespace CompiledData { | - | ||||||
491 | struct CodeOffsetToLine; | - | ||||||
492 | } | - | ||||||
493 | - | |||||||
494 | namespace Moth { | - | ||||||
495 | - | |||||||
496 | class StackSlot { | - | ||||||
497 | int index; | - | ||||||
498 | - | |||||||
499 | public: | - | ||||||
500 | static StackSlot createRegister(int index) { | - | ||||||
501 | Q_ASSERT(index >= 0); | - | ||||||
502 | StackSlot t; | - | ||||||
503 | t.index = index; | - | ||||||
504 | return t; executed 22754905 times by 139 tests: return t; Executed by:
| 22754905 | ||||||
505 | } | - | ||||||
506 | - | |||||||
507 | int stackSlot() const { return index; } executed 70467 times by 10 tests: return index; Executed by:
| 70467 | ||||||
508 | operator int() const { return index; } executed 28564598 times by 139 tests: return index; Executed by:
| 28564598 | ||||||
509 | }; | - | ||||||
510 | - | |||||||
511 | inline bool operator==(const StackSlot &l, const StackSlot &r) { return l.stackSlot() == r.stackSlot(); } executed 33468 times by 10 tests: return l.stackSlot() == r.stackSlot(); Executed by:
| 33468 | ||||||
512 | inline bool operator!=(const StackSlot &l, const StackSlot &r) { return l.stackSlot() != r.stackSlot(); } never executed: return l.stackSlot() != r.stackSlot(); | 0 | ||||||
513 | - | |||||||
514 | // When making changes to the instructions, make sure to bump QV4_DATA_STRUCTURE_VERSION in qv4compileddata_p.h | - | ||||||
515 | - | |||||||
516 | void dumpConstantTable(const Value *constants, uint count); | - | ||||||
517 | void dumpBytecode(const char *bytecode, int len, int nLocals, int nFormals, int startLine = 1, | - | ||||||
518 | const QVector<CompiledData::CodeOffsetToLine> &lineNumberMapping = QVector<CompiledData::CodeOffsetToLine>()); | - | ||||||
519 | inline void dumpBytecode(const QByteArray &bytecode, int nLocals, int nFormals, int startLine = 1, | - | ||||||
520 | const QVector<CompiledData::CodeOffsetToLine> &lineNumberMapping = QVector<CompiledData::CodeOffsetToLine>()) { | - | ||||||
521 | dumpBytecode(bytecode.constData(), bytecode.length(), nLocals, nFormals, startLine, lineNumberMapping); | - | ||||||
522 | } never executed: end of block | 0 | ||||||
523 | - | |||||||
524 | union Instr | - | ||||||
525 | { | - | ||||||
526 | enum class Type { | - | ||||||
527 | FOR_EACH_MOTH_INSTR_ALL(MOTH_INSTR_ENUM) | - | ||||||
528 | }; | - | ||||||
529 | - | |||||||
530 | static Type wideInstructionType(Type t) { return Type(int(t) | 1); } executed 44860078 times by 140 tests: return Type(int(t) | 1); Executed by:
| 44860078 | ||||||
531 | static Type narrowInstructionType(Type t) { return Type(int(t) & ~1); } executed 44968848 times by 140 tests: return Type(int(t) & ~1); Executed by:
| 44968848 | ||||||
532 | static bool isWide(Type t) { return int(t) & 1; } executed 5549329 times by 73 tests: return int(t) & 1; Executed by:
| 5549329 | ||||||
533 | static bool isNarrow(Type t) { return !(int(t) & 1); } never executed: return !(int(t) & 1); | 0 | ||||||
534 | static int encodedLength(Type t) { return int(t) >= 256 ? 2 : 1; } executed 92515746 times by 140 tests: return int(t) >= 256 ? 2 : 1; Executed by:
| 92515746 | ||||||
535 | - | |||||||
536 | static Type unpack(const uchar *c) { if (c[0] == 0x1) return Type(0x100 + c[1]); return Type(c[0]); } executed 714 times by 2 tests: return Type(0x100 + c[1]); Executed by:
executed 44956164 times by 140 tests: return Type(c[0]); Executed by:
| 714-44956164 | ||||||
537 | static uchar *pack(uchar *c, Type t) { | - | ||||||
538 | if (uint(t) >= 256) {
| 1428-88822124 | ||||||
539 | c[0] = 0x1; | - | ||||||
540 | c[1] = uint(t) &0xff; | - | ||||||
541 | return c + 2; executed 1428 times by 2 tests: return c + 2; Executed by:
| 1428 | ||||||
542 | } | - | ||||||
543 | c[0] = uchar(uint(t)); | - | ||||||
544 | return c + 1; executed 88878987 times by 140 tests: return c + 1; Executed by:
| 88878987 | ||||||
545 | } | - | ||||||
546 | - | |||||||
547 | FOR_EACH_MOTH_INSTR_ALL(MOTH_EMIT_STRUCTS) | - | ||||||
548 | - | |||||||
549 | FOR_EACH_MOTH_INSTR_ALL(MOTH_EMIT_INSTR_MEMBERS) | - | ||||||
550 | - | |||||||
551 | int argumentsAsInts[4]; | - | ||||||
552 | }; | - | ||||||
553 | - | |||||||
554 | struct InstrInfo | - | ||||||
555 | { | - | ||||||
556 | static const int argumentCount[]; | - | ||||||
557 | static int size(Instr::Type type); | - | ||||||
558 | }; | - | ||||||
559 | - | |||||||
560 | template<int N> | - | ||||||
561 | struct InstrMeta { | - | ||||||
562 | }; | - | ||||||
563 | - | |||||||
564 | QT_WARNING_PUSH | - | ||||||
565 | QT_WARNING_DISABLE_GCC("-Wuninitialized") | - | ||||||
566 | QT_WARNING_DISABLE_GCC("-Wmaybe-uninitialized") | - | ||||||
567 | #define MOTH_INSTR_META_TEMPLATE(I) \ | - | ||||||
568 | template<> struct InstrMeta<int(Instr::Type::I)> { \ | - | ||||||
569 | enum { Size = MOTH_INSTR_SIZE(I) }; \ | - | ||||||
570 | typedef Instr::instr_##I DataType; \ | - | ||||||
571 | static const DataType &data(const Instr &instr) { return instr.I; } \ | - | ||||||
572 | static void setData(Instr &instr, const DataType &v) \ | - | ||||||
573 | { memcpy(reinterpret_cast<char *>(&instr.I), \ | - | ||||||
574 | reinterpret_cast<const char *>(&v), \ | - | ||||||
575 | Size); } \ | - | ||||||
576 | }; | - | ||||||
577 | FOR_EACH_MOTH_INSTR_ALL(MOTH_INSTR_META_TEMPLATE); never executed: end of block executed 3824220 times by 140 tests: end of block Executed by:
executed 18598 times by 24 tests: end of block Executed by:
executed 163459 times by 48 tests: end of block Executed by:
executed 144350 times by 59 tests: end of block Executed by:
executed 29939 times by 48 tests: end of block Executed by:
executed 88923 times by 29 tests: end of block Executed by:
executed 1079519 times by 92 tests: end of block Executed by:
executed 285689 times by 78 tests: end of block Executed by:
executed 3238054 times by 89 tests: end of block Executed by:
executed 632782 times by 65 tests: end of block Executed by:
executed 4485007 times by 138 tests: end of block Executed by:
executed 8578511 times by 139 tests: end of block Executed by:
executed 2934796 times by 53 tests: end of block Executed by:
executed 684355 times by 20 tests: end of block Executed by:
executed 142538 times by 19 tests: end of block Executed by:
executed 24925 times by 8 tests: end of block Executed by:
executed 11006 times by 4 tests: end of block Executed by:
executed 1054781 times by 8 tests: end of block Executed by:
executed 1036316 times by 32 tests: end of block Executed by:
executed 1271367 times by 104 tests: end of block Executed by:
executed 1805295 times by 6 tests: end of block Executed by:
executed 301027 times by 48 tests: end of block Executed by:
executed 286029 times by 4 tests: end of block Executed by:
executed 71672 times by 32 tests: end of block Executed by:
executed 33443 times by 14 tests: end of block Executed by:
executed 156012 times by 105 tests: end of block Executed by:
executed 1176927 times by 7 tests: end of block Executed by:
executed 10286 times by 73 tests: end of block Executed by:
executed 594639 times by 1 test: end of block Executed by:
executed 328 times by 1 test: end of block Executed by:
executed 40 times by 1 test: end of block Executed by:
executed 2010 times by 60 tests: end of block Executed by:
never executed: end of block executed 6819 times by 105 tests: end of block Executed by:
never executed: end of block never executed: end of block executed 86968 times by 16 tests: end of block Executed by:
executed 1213 times by 1 test: end of block Executed by:
executed 543824 times by 65 tests: end of block Executed by:
executed 372034 times by 21 tests: end of block Executed by:
executed 1372756 times by 71 tests: end of block Executed by:
executed 113718 times by 21 tests: end of block Executed by:
executed 17384 times by 1 test: end of block Executed by:
executed 491 times by 6 tests: end of block Executed by:
executed 80 times by 7 tests: end of block Executed by:
executed 1832 times by 21 tests: end of block Executed by:
executed 629 times by 16 tests: end of block Executed by:
executed 4062 times by 46 tests: end of block Executed by:
executed 2012 times by 29 tests: end of block Executed by:
executed 11388 times by 25 tests: end of block Executed by:
executed 2461 times by 12 tests: end of block Executed by:
executed 15529 times by 37 tests: end of block Executed by:
executed 3434 times by 11 tests: end of block Executed by:
executed 775943 times by 29 tests: end of block Executed by:
executed 631219 times by 17 tests: end of block Executed by:
executed 590 times by 9 tests: end of block Executed by:
executed 21964 times by 15 tests: end of block Executed by:
executed 193255 times by 33 tests: end of block Executed by:
executed 4499 times by 10 tests: end of block Executed by:
executed 3895 times by 10 tests: end of block Executed by:
executed 314 times by 4 tests: end of block Executed by:
executed 18331 times by 45 tests: end of block Executed by:
executed 2674 times by 15 tests: end of block Executed by:
executed 2719596 times by 56 tests: end of block Executed by:
executed 742 times by 5 tests: end of block Executed by:
executed 606 times by 10 tests: end of block Executed by:
executed 548 times by 3 tests: end of block Executed by:
executed 723 times by 3 tests: end of block Executed by:
executed 748 times by 3 tests: end of block Executed by:
executed 751 times by 3 tests: end of block Executed by:
executed 1748 times by 3 tests: end of block Executed by:
executed 556 times by 2 tests: end of block Executed by:
executed 548 times by 1 test: end of block Executed by:
executed 18377 times by 2 tests: end of block Executed by:
executed 17710 times by 2 tests: end of block Executed by:
executed 17362 times by 2 tests: end of block Executed by:
executed 519 times by 1 test: end of block Executed by:
executed 4234 times by 32 tests: end of block Executed by:
executed 174574 times by 31 tests: end of block Executed by:
executed 2823 times by 10 tests: end of block Executed by:
executed 5011 times by 31 tests: end of block Executed by:
executed 112501 times by 16 tests: end of block Executed by:
executed 55494 times by 82 tests: end of block Executed by:
executed 732967 times by 6 tests: end of block Executed by:
executed 1110 times by 7 tests: end of block Executed by:
executed 40622 times by 47 tests: end of block Executed by:
executed 12973 times by 8 tests: end of block Executed by:
executed 1594111 times by 2 tests: end of block Executed by:
executed 3116 times by 2 tests: end of block Executed by:
never executed: end of block executed 108 times by 1 test: end of block Executed by:
executed 197832 times by 22 tests: end of block Executed by:
executed 176 times by 1 test: end of block Executed by:
executed 371077 times by 22 tests: end of block Executed by:
executed 129806 times by 22 tests: end of block Executed by:
executed 83333 times by 13 tests: end of block Executed by:
executed 95971 times by 13 tests: end of block Executed by:
executed 826 times by 5 tests: end of block Executed by:
executed 826 times by 5 tests: end of block Executed by:
executed 104318 times by 31 tests: end of block Executed by:
executed 112296 times by 21 tests: end of block Executed by:
executed 817 times by 6 tests: end of block Executed by:
executed 890 times by 3 tests: end of block Executed by:
executed 46 times by 2 tests: end of block Executed by:
executed 219501 times by 33 tests: end of block Executed by:
executed 25110 times by 13 tests: end of block Executed by:
executed 27506 times by 13 tests: end of block Executed by:
executed 11449 times by 1 test: end of block Executed by:
executed 2805 times by 1 test: end of block Executed by:
executed 18907 times by 6 tests: end of block Executed by:
executed 177 times by 4 tests: end of block Executed by:
executed 3177 times by 6 tests: end of block Executed by:
executed 186455 times by 10 tests: end of block Executed by:
executed 518113 times by 20 tests: end of block Executed by:
executed 45136 times by 46 tests: end of block Executed by:
executed 71484 times by 36 tests: end of block Executed by:
executed 9678 times by 16 tests: end of block Executed by:
executed 6113 times by 2 tests: end of block Executed by:
executed 244 times by 1 test: end of block Executed by:
never executed: end of block never executed: end of block executed 11546 times by 1 test: end of block Executed by:
executed 2061 times by 1 test: end of block Executed by:
executed 9258 times by 1 test: end of block Executed by:
executed 455 times by 1 test: end of block Executed by:
executed 5126 times by 2 tests: end of block Executed by:
executed 5174 times by 2 tests: end of block Executed by:
executed 714 times by 2 tests: end of block Executed by:
never executed: return instr.Nop; never executed: return instr.Ret; never executed: return instr.LoadConst; never executed: return instr.LoadZero; never executed: return instr.LoadTrue; never executed: return instr.LoadFalse; never executed: return instr.LoadNull; never executed: return instr.LoadUndefined; never executed: return instr.LoadInt; never executed: return instr.LoadRuntimeString; never executed: return instr.MoveConst; never executed: return instr.LoadReg; never executed: return instr.StoreReg; never executed: return instr.MoveReg; never executed: return instr.LoadLocal; never executed: return instr.StoreLocal; never executed: return instr.LoadScopedLocal; never executed: return instr.StoreScopedLocal; never executed: return instr.MoveRegExp; never executed: return instr.LoadClosure; never executed: return instr.LoadName; never executed: return instr.LoadGlobalLookup; never executed: return instr.StoreNameSloppy; never executed: return instr.StoreNameStrict; never executed: return instr.LoadElement; never executed: return instr.StoreElement; never executed: return instr.LoadProperty; never executed: return instr.GetLookup; never executed: return instr.StoreProperty; never executed: return instr.SetLookup; never executed: return instr.LoadSuperProperty; never executed: return instr.StoreSuperProperty; never executed: return instr.StoreScopeObjectProperty; never executed: return instr.StoreContextObjectProperty; never executed: return instr.LoadScopeObjectProperty; never executed: return instr.LoadContextObjectProperty; never executed: return instr.LoadIdObject; never executed: return instr.ConvertThisToObject; never executed: return instr.ToObject; never executed: return instr.Jump; never executed: return instr.JumpTrue; never executed: return instr.JumpFalse; never executed: return instr.JumpNoException; never executed: return instr.JumpNotUndefined; never executed: return instr.CmpEqNull; never executed: return instr.CmpNeNull; never executed: return instr.CmpEqInt; never executed: return instr.CmpNeInt; never executed: return instr.CmpEq; never executed: return instr.CmpNe; never executed: return instr.CmpGt; never executed: return instr.CmpGe; never executed: return instr.CmpLt; never executed: return instr.CmpLe; never executed: return instr.CmpStrictEqual; never executed: return instr.CmpStrictNotEqual; never executed: return instr.CmpIn; never executed: return instr.CmpInstanceOf; never executed: return instr.UNot; never executed: return instr.UPlus; never executed: return instr.UMinus; never executed: return instr.UCompl; never executed: return instr.Increment; never executed: return instr.Decrement; never executed: return instr.Add; never executed: return instr.BitAnd; never executed: return instr.BitOr; never executed: return instr.BitXor; never executed: return instr.UShr; never executed: return instr.Shr; never executed: return instr.Shl; never executed: return instr.BitAndConst; never executed: return instr.BitOrConst; never executed: return instr.BitXorConst; never executed: return instr.UShrConst; never executed: return instr.ShrConst; never executed: return instr.ShlConst; never executed: return instr.Exp; never executed: return instr.Mul; never executed: return instr.Div; never executed: return instr.Mod; never executed: return instr.Sub; never executed: return instr.CallValue; never executed: return instr.CallProperty; never executed: return instr.CallPropertyLookup; never executed: return instr.CallElement; never executed: return instr.CallName; never executed: return instr.CallPossiblyDirectEval; never executed: return instr.CallGlobalLookup; never executed: return instr.CallScopeObjectProperty; never executed: return instr.CallContextObjectProperty; never executed: return instr.CallWithSpread; never executed: return instr.Construct; never executed: return instr.ConstructWithSpread; never executed: return instr.SetUnwindHandler; never executed: return instr.UnwindDispatch; never executed: return instr.UnwindToLabel; never executed: return instr.ThrowException; never executed: return instr.GetException; never executed: return instr.SetException; never executed: return instr.CreateCallContext; never executed: return instr.PushCatchContext; never executed: return instr.PushWithContext; never executed: return instr.PushBlockContext; never executed: return instr.CloneBlockContext; never executed: return instr.PopContext; never executed: return instr.GetIterator; never executed: return instr.IteratorNext; never executed: return instr.IteratorClose; never executed: return instr.DestructureRestElement; never executed: return instr.DeleteProperty; never executed: return instr.DeleteName; never executed: return instr.TypeofName; never executed: return instr.TypeofValue; never executed: return instr.DeclareVar; never executed: return instr.DefineArray; never executed: return instr.DefineObjectLiteral; never executed: return instr.CreateMappedArgumentsObject; never executed: return instr.CreateUnmappedArgumentsObject; never executed: return instr.CreateRestParameter; never executed: return instr.LoadQmlContext; never executed: return instr.LoadQmlImportedScripts; never executed: return instr.Yield; never executed: return instr.Resume; never executed: return instr.CreateClass; never executed: return instr.LoadSuperConstructor; never executed: return instr.PushScriptContext; never executed: return instr.PopScriptContext; never executed: return instr.Debug; | 0-8578511 | ||||||
578 | #undef MOTH_INSTR_META_TEMPLATE | - | ||||||
579 | QT_WARNING_POP | - | ||||||
580 | - | |||||||
581 | template<int InstrType> | - | ||||||
582 | class InstrData : public InstrMeta<InstrType>::DataType | - | ||||||
583 | { | - | ||||||
584 | }; | - | ||||||
585 | - | |||||||
586 | struct Instruction { | - | ||||||
587 | #define MOTH_INSTR_DATA_TYPEDEF(I) typedef InstrData<int(Instr::Type::I)> I; | - | ||||||
588 | FOR_EACH_MOTH_INSTR_ALL(MOTH_INSTR_DATA_TYPEDEF) | - | ||||||
589 | #undef MOTH_INSTR_DATA_TYPEDEF | - | ||||||
590 | private: | - | ||||||
591 | Instruction(); | - | ||||||
592 | }; | - | ||||||
593 | - | |||||||
594 | } // namespace Moth | - | ||||||
595 | } // namespace QV4 | - | ||||||
596 | - | |||||||
597 | QT_END_NAMESPACE | - | ||||||
598 | - | |||||||
599 | #endif // QV4INSTR_MOTH_P_H | - | ||||||
Source code | Switch to Preprocessed file |