Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jit/qv4baselinejit.cpp |
Source code | Switch to Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | /**************************************************************************** | - | ||||||
2 | ** | - | ||||||
3 | ** Copyright (C) 2017 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 | #include "qv4baselinejit_p.h" | - | ||||||
41 | #include "qv4jithelpers_p.h" | - | ||||||
42 | #include "qv4assembler_p.h" | - | ||||||
43 | #include <private/qv4lookup_p.h> | - | ||||||
44 | #include <private/qv4generatorobject_p.h> | - | ||||||
45 | - | |||||||
46 | #ifdef V4_ENABLE_JIT | - | ||||||
47 | - | |||||||
48 | QT_USE_NAMESPACE | - | ||||||
49 | using namespace QV4; | - | ||||||
50 | using namespace QV4::JIT; | - | ||||||
51 | using namespace QV4::Moth; | - | ||||||
52 | - | |||||||
53 | BaselineJIT::BaselineJIT(Function *function) | - | ||||||
54 | : function(function) | - | ||||||
55 | , as(new Assembler(function->compilationUnit->constants)) | - | ||||||
56 | {} executed 13188 times by 64 tests: end of block Executed by:
| 13188 | ||||||
57 | - | |||||||
58 | BaselineJIT::~BaselineJIT() | - | ||||||
59 | {} | - | ||||||
60 | - | |||||||
61 | void BaselineJIT::generate() | - | ||||||
62 | { | - | ||||||
63 | // qDebug()<<"jitting" << function->name()->toQString(); | - | ||||||
64 | const char *code = function->codeData; | - | ||||||
65 | uint len = function->compiledFunction->codeSize; | - | ||||||
66 | labels = collectLabelsInBytecode(code, len); | - | ||||||
67 | - | |||||||
68 | as->generatePrologue(); | - | ||||||
69 | decode(code, len); | - | ||||||
70 | as->generateEpilogue(); | - | ||||||
71 | - | |||||||
72 | as->link(function); | - | ||||||
73 | // qDebug()<<"done"; | - | ||||||
74 | } executed 13188 times by 64 tests: end of block Executed by:
| 13188 | ||||||
75 | - | |||||||
76 | #define STORE_IP() as->storeInstructionPointer(instructionOffset()) | - | ||||||
77 | #define STORE_ACC() as->saveAccumulatorInFrame() | - | ||||||
78 | - | |||||||
79 | void BaselineJIT::generate_Ret() | - | ||||||
80 | { | - | ||||||
81 | as->ret(); | - | ||||||
82 | } executed 13404 times by 64 tests: end of block Executed by:
| 13404 | ||||||
83 | - | |||||||
84 | void BaselineJIT::generate_Debug() { Q_UNREACHABLE(); } never executed: end of block | 0 | ||||||
85 | - | |||||||
86 | void BaselineJIT::generate_LoadConst(int index) | - | ||||||
87 | { | - | ||||||
88 | as->loadConst(index); | - | ||||||
89 | } executed 126 times by 7 tests: end of block Executed by:
| 126 | ||||||
90 | - | |||||||
91 | void BaselineJIT::generate_LoadZero() | - | ||||||
92 | { | - | ||||||
93 | as->loadValue(Encode(int(0))); | - | ||||||
94 | } executed 724 times by 24 tests: end of block Executed by:
| 724 | ||||||
95 | - | |||||||
96 | void BaselineJIT::generate_LoadTrue() | - | ||||||
97 | { | - | ||||||
98 | as->loadValue(Encode(true)); | - | ||||||
99 | } executed 290 times by 14 tests: end of block Executed by:
| 290 | ||||||
100 | - | |||||||
101 | void BaselineJIT::generate_LoadFalse() | - | ||||||
102 | { | - | ||||||
103 | as->loadValue(Encode(false)); | - | ||||||
104 | } executed 184 times by 14 tests: end of block Executed by:
| 184 | ||||||
105 | - | |||||||
106 | void BaselineJIT::generate_LoadNull() | - | ||||||
107 | { | - | ||||||
108 | as->loadValue(Encode::null()); | - | ||||||
109 | } executed 248 times by 7 tests: end of block Executed by:
| 248 | ||||||
110 | - | |||||||
111 | void BaselineJIT::generate_LoadUndefined() | - | ||||||
112 | { | - | ||||||
113 | as->loadValue(Encode::undefined()); | - | ||||||
114 | } executed 1472 times by 37 tests: end of block Executed by:
| 1472 | ||||||
115 | - | |||||||
116 | void BaselineJIT::generate_LoadInt(int value) | - | ||||||
117 | { | - | ||||||
118 | //### | - | ||||||
119 | as->loadValue(Encode(value)); | - | ||||||
120 | } executed 1840 times by 34 tests: end of block Executed by:
| 1840 | ||||||
121 | - | |||||||
122 | void BaselineJIT::generate_MoveConst(int constIndex, int destTemp) | - | ||||||
123 | { | - | ||||||
124 | as->copyConst(constIndex, destTemp); | - | ||||||
125 | } executed 964 times by 18 tests: end of block Executed by:
| 964 | ||||||
126 | - | |||||||
127 | void BaselineJIT::generate_LoadReg(int reg) | - | ||||||
128 | { | - | ||||||
129 | as->loadReg(reg); | - | ||||||
130 | } executed 2654 times by 31 tests: end of block Executed by:
| 2654 | ||||||
131 | - | |||||||
132 | void BaselineJIT::generate_StoreReg(int reg) | - | ||||||
133 | { | - | ||||||
134 | as->storeReg(reg); | - | ||||||
135 | } executed 28608 times by 63 tests: end of block Executed by:
| 28608 | ||||||
136 | - | |||||||
137 | void BaselineJIT::generate_MoveReg(int srcReg, int destReg) | - | ||||||
138 | { | - | ||||||
139 | // Don't clobber the accumulator. | - | ||||||
140 | as->moveReg(srcReg, destReg); | - | ||||||
141 | } executed 3186 times by 19 tests: end of block Executed by:
| 3186 | ||||||
142 | - | |||||||
143 | void BaselineJIT::generate_LoadLocal(int index) | - | ||||||
144 | { | - | ||||||
145 | as->loadLocal(index); | - | ||||||
146 | } executed 382 times by 8 tests: end of block Executed by:
| 382 | ||||||
147 | - | |||||||
148 | void BaselineJIT::generate_StoreLocal(int index) | - | ||||||
149 | { | - | ||||||
150 | as->checkException(); | - | ||||||
151 | as->storeLocal(index); | - | ||||||
152 | } executed 46 times by 4 tests: end of block Executed by:
| 46 | ||||||
153 | - | |||||||
154 | void BaselineJIT::generate_LoadScopedLocal(int scope, int index) | - | ||||||
155 | { | - | ||||||
156 | as->loadLocal(index, scope); | - | ||||||
157 | } executed 24 times by 3 tests: end of block Executed by:
| 24 | ||||||
158 | - | |||||||
159 | void BaselineJIT::generate_StoreScopedLocal(int scope, int index) | - | ||||||
160 | { | - | ||||||
161 | as->checkException(); | - | ||||||
162 | as->storeLocal(index, scope); | - | ||||||
163 | } never executed: end of block | 0 | ||||||
164 | - | |||||||
165 | void BaselineJIT::generate_LoadRuntimeString(int stringId) | - | ||||||
166 | { | - | ||||||
167 | as->loadString(stringId); | - | ||||||
168 | } executed 3286 times by 31 tests: end of block Executed by:
| 3286 | ||||||
169 | - | |||||||
170 | void BaselineJIT::generate_MoveRegExp(int regExpId, int destReg) | - | ||||||
171 | { | - | ||||||
172 | as->prepareCallWithArgCount(2); | - | ||||||
173 | as->passInt32AsArg(regExpId, 1); | - | ||||||
174 | as->passEngineAsArg(0); | - | ||||||
175 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_regexpLiteral, Assembler::ResultInAccumulator); | - | ||||||
176 | as->storeReg(destReg); | - | ||||||
177 | } never executed: end of block | 0 | ||||||
178 | - | |||||||
179 | void BaselineJIT::generate_LoadClosure(int value) | - | ||||||
180 | { | - | ||||||
181 | as->prepareCallWithArgCount(2); | - | ||||||
182 | as->passInt32AsArg(value, 1); | - | ||||||
183 | as->passEngineAsArg(0); | - | ||||||
184 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_closure, Assembler::ResultInAccumulator); | - | ||||||
185 | } executed 26 times by 6 tests: end of block Executed by:
| 26 | ||||||
186 | - | |||||||
187 | void BaselineJIT::generate_LoadName(int name) | - | ||||||
188 | { | - | ||||||
189 | STORE_IP(); | - | ||||||
190 | as->prepareCallWithArgCount(2); | - | ||||||
191 | as->passInt32AsArg(name, 1); | - | ||||||
192 | as->passEngineAsArg(0); | - | ||||||
193 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_loadName, Assembler::ResultInAccumulator); | - | ||||||
194 | as->checkException(); | - | ||||||
195 | } executed 14640 times by 47 tests: end of block Executed by:
| 14640 | ||||||
196 | - | |||||||
197 | void BaselineJIT::generate_LoadGlobalLookup(int index) | - | ||||||
198 | { | - | ||||||
199 | as->prepareCallWithArgCount(3); | - | ||||||
200 | as->passInt32AsArg(index, 2); | - | ||||||
201 | as->passFunctionAsArg(1); | - | ||||||
202 | as->passEngineAsArg(0); | - | ||||||
203 | JIT_GENERATE_RUNTIME_CALL(Helpers::loadGlobalLookup, Assembler::ResultInAccumulator); | - | ||||||
204 | as->checkException(); | - | ||||||
205 | } executed 8 times by 3 tests: end of block Executed by:
| 8 | ||||||
206 | - | |||||||
207 | void BaselineJIT::generate_StoreNameSloppy(int name) | - | ||||||
208 | { | - | ||||||
209 | STORE_IP(); | - | ||||||
210 | STORE_ACC(); | - | ||||||
211 | as->prepareCallWithArgCount(3); | - | ||||||
212 | as->passAccumulatorAsArg(2); | - | ||||||
213 | as->passInt32AsArg(name, 1); | - | ||||||
214 | as->passEngineAsArg(0); | - | ||||||
215 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_storeNameSloppy, Assembler::IgnoreResult); | - | ||||||
216 | as->checkException(); | - | ||||||
217 | } executed 44 times by 7 tests: end of block Executed by:
| 44 | ||||||
218 | - | |||||||
219 | void BaselineJIT::generate_StoreNameStrict(int name) | - | ||||||
220 | { | - | ||||||
221 | STORE_IP(); | - | ||||||
222 | STORE_ACC(); | - | ||||||
223 | as->prepareCallWithArgCount(3); | - | ||||||
224 | as->passAccumulatorAsArg(2); | - | ||||||
225 | as->passInt32AsArg(name, 1); | - | ||||||
226 | as->passEngineAsArg(0); | - | ||||||
227 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_storeNameStrict, Assembler::IgnoreResult); | - | ||||||
228 | as->checkException(); | - | ||||||
229 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||
230 | - | |||||||
231 | void BaselineJIT::generate_LoadElement(int base) | - | ||||||
232 | { | - | ||||||
233 | STORE_IP(); | - | ||||||
234 | STORE_ACC(); | - | ||||||
235 | as->prepareCallWithArgCount(3); | - | ||||||
236 | as->passAccumulatorAsArg(2); | - | ||||||
237 | as->passRegAsArg(base, 1); | - | ||||||
238 | as->passEngineAsArg(0); | - | ||||||
239 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_loadElement, Assembler::ResultInAccumulator); | - | ||||||
240 | as->checkException(); | - | ||||||
241 | } executed 458 times by 15 tests: end of block Executed by:
| 458 | ||||||
242 | - | |||||||
243 | void BaselineJIT::generate_StoreElement(int base, int index) | - | ||||||
244 | { | - | ||||||
245 | STORE_IP(); | - | ||||||
246 | STORE_ACC(); | - | ||||||
247 | as->prepareCallWithArgCount(4); | - | ||||||
248 | as->passAccumulatorAsArg(3); | - | ||||||
249 | as->passRegAsArg(index, 2); | - | ||||||
250 | as->passRegAsArg(base, 1); | - | ||||||
251 | as->passEngineAsArg(0); | - | ||||||
252 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_storeElement, Assembler::IgnoreResult); | - | ||||||
253 | as->checkException(); | - | ||||||
254 | } executed 368 times by 3 tests: end of block Executed by:
| 368 | ||||||
255 | - | |||||||
256 | void BaselineJIT::generate_LoadProperty(int name) | - | ||||||
257 | { | - | ||||||
258 | STORE_IP(); | - | ||||||
259 | STORE_ACC(); | - | ||||||
260 | as->prepareCallWithArgCount(3); | - | ||||||
261 | as->passInt32AsArg(name, 2); | - | ||||||
262 | as->passAccumulatorAsArg(1); | - | ||||||
263 | as->passEngineAsArg(0); | - | ||||||
264 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_loadProperty, Assembler::ResultInAccumulator); | - | ||||||
265 | as->checkException(); | - | ||||||
266 | } executed 15022 times by 47 tests: end of block Executed by:
| 15022 | ||||||
267 | - | |||||||
268 | void BaselineJIT::generate_GetLookup(int index) | - | ||||||
269 | { | - | ||||||
270 | STORE_IP(); | - | ||||||
271 | STORE_ACC(); | - | ||||||
272 | as->prepareCallWithArgCount(4); | - | ||||||
273 | as->passAccumulatorAsArg(3); | - | ||||||
274 | as->passInt32AsArg(index, 2); | - | ||||||
275 | as->passFunctionAsArg(1); | - | ||||||
276 | as->passEngineAsArg(0); | - | ||||||
277 | JIT_GENERATE_RUNTIME_CALL(Helpers::getLookup, Assembler::ResultInAccumulator); | - | ||||||
278 | as->checkException(); | - | ||||||
279 | } executed 32 times by 3 tests: end of block Executed by:
| 32 | ||||||
280 | - | |||||||
281 | void BaselineJIT::generate_StoreProperty(int name, int base) | - | ||||||
282 | { | - | ||||||
283 | STORE_IP(); | - | ||||||
284 | STORE_ACC(); | - | ||||||
285 | as->prepareCallWithArgCount(4); | - | ||||||
286 | as->passAccumulatorAsArg(3); | - | ||||||
287 | as->passInt32AsArg(name, 2); | - | ||||||
288 | as->passRegAsArg(base, 1); | - | ||||||
289 | as->passEngineAsArg(0); | - | ||||||
290 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_storeProperty, Assembler::IgnoreResult); | - | ||||||
291 | as->checkException(); | - | ||||||
292 | } executed 904 times by 24 tests: end of block Executed by:
| 904 | ||||||
293 | - | |||||||
294 | void BaselineJIT::generate_SetLookup(int index, int base) | - | ||||||
295 | { | - | ||||||
296 | STORE_IP(); | - | ||||||
297 | STORE_ACC(); | - | ||||||
298 | as->prepareCallWithArgCount(4); | - | ||||||
299 | as->passAccumulatorAsArg(3); | - | ||||||
300 | as->passRegAsArg(base, 2); | - | ||||||
301 | as->passInt32AsArg(index, 1); | - | ||||||
302 | as->passFunctionAsArg(0); | - | ||||||
303 | JIT_GENERATE_RUNTIME_CALL(Helpers::setLookup, Assembler::ResultInAccumulator); | - | ||||||
304 | as->checkException(); | - | ||||||
305 | } never executed: end of block | 0 | ||||||
306 | - | |||||||
307 | void BaselineJIT::generate_LoadSuperProperty(int property) | - | ||||||
308 | { | - | ||||||
309 | STORE_IP(); | - | ||||||
310 | STORE_ACC(); | - | ||||||
311 | as->prepareCallWithArgCount(2); | - | ||||||
312 | as->passRegAsArg(property, 1); | - | ||||||
313 | as->passEngineAsArg(0); | - | ||||||
314 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_loadSuperProperty, Assembler::ResultInAccumulator); | - | ||||||
315 | as->checkException(); | - | ||||||
316 | } never executed: end of block | 0 | ||||||
317 | - | |||||||
318 | void BaselineJIT::generate_StoreSuperProperty(int property) | - | ||||||
319 | { | - | ||||||
320 | STORE_IP(); | - | ||||||
321 | STORE_ACC(); | - | ||||||
322 | as->prepareCallWithArgCount(3); | - | ||||||
323 | as->passAccumulatorAsArg(2); | - | ||||||
324 | as->passRegAsArg(property, 1); | - | ||||||
325 | as->passFunctionAsArg(0); | - | ||||||
326 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_storeSuperProperty, Assembler::IgnoreResult); | - | ||||||
327 | as->checkException(); | - | ||||||
328 | } never executed: end of block | 0 | ||||||
329 | - | |||||||
330 | - | |||||||
331 | void BaselineJIT::generate_StoreScopeObjectProperty(int base, int propertyIndex) | - | ||||||
332 | { | - | ||||||
333 | STORE_ACC(); | - | ||||||
334 | as->prepareCallWithArgCount(4); | - | ||||||
335 | as->passAccumulatorAsArg(3); | - | ||||||
336 | as->passInt32AsArg(propertyIndex, 2); | - | ||||||
337 | as->passRegAsArg(base, 1); | - | ||||||
338 | as->passEngineAsArg(0); | - | ||||||
339 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_storeQmlScopeObjectProperty, Assembler::IgnoreResult); | - | ||||||
340 | as->checkException(); | - | ||||||
341 | } executed 384 times by 21 tests: end of block Executed by:
| 384 | ||||||
342 | - | |||||||
343 | void BaselineJIT::generate_StoreContextObjectProperty(int base, int propertyIndex) | - | ||||||
344 | { | - | ||||||
345 | STORE_ACC(); | - | ||||||
346 | as->prepareCallWithArgCount(4); | - | ||||||
347 | as->passAccumulatorAsArg(3); | - | ||||||
348 | as->passInt32AsArg(propertyIndex, 2); | - | ||||||
349 | as->passRegAsArg(base, 1); | - | ||||||
350 | as->passEngineAsArg(0); | - | ||||||
351 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_storeQmlContextObjectProperty, Assembler::IgnoreResult); | - | ||||||
352 | as->checkException(); | - | ||||||
353 | } never executed: end of block | 0 | ||||||
354 | - | |||||||
355 | void BaselineJIT::generate_LoadScopeObjectProperty(int propertyIndex, int base, int captureRequired) | - | ||||||
356 | { | - | ||||||
357 | STORE_IP(); | - | ||||||
358 | as->prepareCallWithArgCount(4); | - | ||||||
359 | as->passInt32AsArg(captureRequired, 3); | - | ||||||
360 | as->passInt32AsArg(propertyIndex, 2); | - | ||||||
361 | as->passRegAsArg(base, 1); | - | ||||||
362 | as->passEngineAsArg(0); | - | ||||||
363 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_loadQmlScopeObjectProperty, Assembler::ResultInAccumulator); | - | ||||||
364 | as->checkException(); | - | ||||||
365 | } executed 4474 times by 43 tests: end of block Executed by:
| 4474 | ||||||
366 | - | |||||||
367 | void BaselineJIT::generate_LoadContextObjectProperty(int propertyIndex, int base, int captureRequired) | - | ||||||
368 | { | - | ||||||
369 | STORE_IP(); | - | ||||||
370 | as->prepareCallWithArgCount(4); | - | ||||||
371 | as->passInt32AsArg(captureRequired, 3); | - | ||||||
372 | as->passInt32AsArg(propertyIndex, 2); | - | ||||||
373 | as->passRegAsArg(base, 1); | - | ||||||
374 | as->passEngineAsArg(0); | - | ||||||
375 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_loadQmlContextObjectProperty, Assembler::ResultInAccumulator); | - | ||||||
376 | as->checkException(); | - | ||||||
377 | } never executed: end of block | 0 | ||||||
378 | - | |||||||
379 | void BaselineJIT::generate_LoadIdObject(int index, int base) | - | ||||||
380 | { | - | ||||||
381 | STORE_IP(); | - | ||||||
382 | as->prepareCallWithArgCount(3); | - | ||||||
383 | as->passInt32AsArg(index, 2); | - | ||||||
384 | as->passRegAsArg(base, 1); | - | ||||||
385 | as->passEngineAsArg(0); | - | ||||||
386 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_loadQmlIdObject, Assembler::ResultInAccumulator); | - | ||||||
387 | as->checkException(); | - | ||||||
388 | } executed 4110 times by 32 tests: end of block Executed by:
| 4110 | ||||||
389 | - | |||||||
390 | void BaselineJIT::generate_Yield() | - | ||||||
391 | { | - | ||||||
392 | // ##### | - | ||||||
393 | Q_UNREACHABLE(); | - | ||||||
394 | } never executed: end of block | 0 | ||||||
395 | - | |||||||
396 | void BaselineJIT::generate_Resume(int) | - | ||||||
397 | { | - | ||||||
398 | // ##### | - | ||||||
399 | Q_UNREACHABLE(); | - | ||||||
400 | } never executed: end of block | 0 | ||||||
401 | - | |||||||
402 | void BaselineJIT::generate_CallValue(int name, int argc, int argv) | - | ||||||
403 | { | - | ||||||
404 | STORE_IP(); | - | ||||||
405 | as->prepareCallWithArgCount(4); | - | ||||||
406 | as->passInt32AsArg(argc, 3); | - | ||||||
407 | as->passRegAsArg(argv, 2); | - | ||||||
408 | as->passRegAsArg(name, 1); | - | ||||||
409 | as->passEngineAsArg(0); | - | ||||||
410 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_callValue, Assembler::ResultInAccumulator); | - | ||||||
411 | as->checkException(); | - | ||||||
412 | } executed 34 times by 6 tests: end of block Executed by:
| 34 | ||||||
413 | - | |||||||
414 | void BaselineJIT::generate_CallProperty(int name, int base, int argc, int argv) | - | ||||||
415 | { | - | ||||||
416 | STORE_IP(); | - | ||||||
417 | as->prepareCallWithArgCount(5); | - | ||||||
418 | as->passInt32AsArg(argc, 4); | - | ||||||
419 | as->passRegAsArg(argv, 3); | - | ||||||
420 | as->passInt32AsArg(name, 2); | - | ||||||
421 | as->passRegAsArg(base, 1); | - | ||||||
422 | as->passEngineAsArg(0); | - | ||||||
423 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_callProperty, Assembler::ResultInAccumulator); | - | ||||||
424 | as->checkException(); | - | ||||||
425 | } executed 3972 times by 33 tests: end of block Executed by:
| 3972 | ||||||
426 | - | |||||||
427 | void BaselineJIT::generate_CallPropertyLookup(int lookupIndex, int base, int argc, int argv) | - | ||||||
428 | { | - | ||||||
429 | STORE_IP(); | - | ||||||
430 | as->prepareCallWithArgCount(5); | - | ||||||
431 | as->passInt32AsArg(argc, 4); | - | ||||||
432 | as->passRegAsArg(argv, 3); | - | ||||||
433 | as->passInt32AsArg(lookupIndex, 2); | - | ||||||
434 | as->passRegAsArg(base, 1); | - | ||||||
435 | as->passEngineAsArg(0); | - | ||||||
436 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_callPropertyLookup, Assembler::ResultInAccumulator); | - | ||||||
437 | as->checkException(); | - | ||||||
438 | } executed 8 times by 3 tests: end of block Executed by:
| 8 | ||||||
439 | - | |||||||
440 | void BaselineJIT::generate_CallElement(int base, int index, int argc, int argv) | - | ||||||
441 | { | - | ||||||
442 | STORE_IP(); | - | ||||||
443 | as->prepareCallWithArgCount(5); | - | ||||||
444 | as->passInt32AsArg(argc, 4); | - | ||||||
445 | as->passRegAsArg(argv, 3); | - | ||||||
446 | as->passRegAsArg(index, 2); | - | ||||||
447 | as->passRegAsArg(base, 1); | - | ||||||
448 | as->passEngineAsArg(0); | - | ||||||
449 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_callElement, Assembler::ResultInAccumulator); | - | ||||||
450 | as->checkException(); | - | ||||||
451 | } executed 30 times by 3 tests: end of block Executed by:
| 30 | ||||||
452 | - | |||||||
453 | void BaselineJIT::generate_CallName(int name, int argc, int argv) | - | ||||||
454 | { | - | ||||||
455 | STORE_IP(); | - | ||||||
456 | as->prepareCallWithArgCount(4); | - | ||||||
457 | as->passInt32AsArg(argc, 3); | - | ||||||
458 | as->passRegAsArg(argv, 2); | - | ||||||
459 | as->passInt32AsArg(name, 1); | - | ||||||
460 | as->passEngineAsArg(0); | - | ||||||
461 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_callName, Assembler::ResultInAccumulator); | - | ||||||
462 | as->checkException(); | - | ||||||
463 | } executed 372 times by 10 tests: end of block Executed by:
| 372 | ||||||
464 | - | |||||||
465 | void BaselineJIT::generate_CallPossiblyDirectEval(int argc, int argv) | - | ||||||
466 | { | - | ||||||
467 | STORE_IP(); | - | ||||||
468 | as->prepareCallWithArgCount(3); | - | ||||||
469 | as->passInt32AsArg(argc, 2); | - | ||||||
470 | as->passRegAsArg(argv, 1); | - | ||||||
471 | as->passEngineAsArg(0); | - | ||||||
472 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_callPossiblyDirectEval, Assembler::ResultInAccumulator); | - | ||||||
473 | as->checkException(); | - | ||||||
474 | } executed 14 times by 2 tests: end of block Executed by:
| 14 | ||||||
475 | - | |||||||
476 | void BaselineJIT::generate_CallGlobalLookup(int index, int argc, int argv) | - | ||||||
477 | { | - | ||||||
478 | STORE_IP(); | - | ||||||
479 | as->prepareCallWithArgCount(4); | - | ||||||
480 | as->passInt32AsArg(argc, 3); | - | ||||||
481 | as->passRegAsArg(argv, 2); | - | ||||||
482 | as->passInt32AsArg(index, 1); | - | ||||||
483 | as->passEngineAsArg(0); | - | ||||||
484 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_callGlobalLookup, Assembler::ResultInAccumulator); | - | ||||||
485 | as->checkException(); | - | ||||||
486 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||
487 | - | |||||||
488 | void BaselineJIT::generate_CallScopeObjectProperty(int propIdx, int base, int argc, int argv) | - | ||||||
489 | { | - | ||||||
490 | STORE_IP(); | - | ||||||
491 | as->prepareCallWithArgCount(5); | - | ||||||
492 | as->passInt32AsArg(argc, 4); | - | ||||||
493 | as->passRegAsArg(argv, 3); | - | ||||||
494 | as->passInt32AsArg(propIdx, 2); | - | ||||||
495 | as->passRegAsArg(base, 1); | - | ||||||
496 | as->passEngineAsArg(0); | - | ||||||
497 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_callQmlScopeObjectProperty, Assembler::ResultInAccumulator); | - | ||||||
498 | as->checkException(); | - | ||||||
499 | } never executed: end of block | 0 | ||||||
500 | - | |||||||
501 | void BaselineJIT::generate_CallContextObjectProperty(int propIdx, int base, int argc, int argv) | - | ||||||
502 | { | - | ||||||
503 | STORE_IP(); | - | ||||||
504 | as->prepareCallWithArgCount(5); | - | ||||||
505 | as->passInt32AsArg(argc, 4); | - | ||||||
506 | as->passRegAsArg(argv, 3); | - | ||||||
507 | as->passInt32AsArg(propIdx, 2); | - | ||||||
508 | as->passRegAsArg(base, 1); | - | ||||||
509 | as->passEngineAsArg(0); | - | ||||||
510 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_callQmlContextObjectProperty, Assembler::ResultInAccumulator); | - | ||||||
511 | as->checkException(); | - | ||||||
512 | } never executed: end of block | 0 | ||||||
513 | - | |||||||
514 | - | |||||||
515 | void BaselineJIT::generate_CallWithSpread(int func, int thisObject, int argc, int argv) | - | ||||||
516 | { | - | ||||||
517 | STORE_IP(); | - | ||||||
518 | as->prepareCallWithArgCount(5); | - | ||||||
519 | as->passInt32AsArg(argc, 4); | - | ||||||
520 | as->passRegAsArg(argv, 3); | - | ||||||
521 | as->passRegAsArg(thisObject, 2); | - | ||||||
522 | as->passRegAsArg(func, 1); | - | ||||||
523 | as->passEngineAsArg(0); | - | ||||||
524 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_callWithSpread, Assembler::ResultInAccumulator); | - | ||||||
525 | as->checkException(); | - | ||||||
526 | } never executed: end of block | 0 | ||||||
527 | - | |||||||
528 | - | |||||||
529 | void BaselineJIT::generate_Construct(int func, int argc, int argv) | - | ||||||
530 | { | - | ||||||
531 | STORE_IP(); | - | ||||||
532 | STORE_ACC(); | - | ||||||
533 | as->prepareCallWithArgCount(5); | - | ||||||
534 | as->passInt32AsArg(argc, 4); | - | ||||||
535 | as->passRegAsArg(argv, 3); | - | ||||||
536 | as->passAccumulatorAsArg(2); | - | ||||||
537 | as->passRegAsArg(func, 1); | - | ||||||
538 | as->passEngineAsArg(0); | - | ||||||
539 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_construct, Assembler::ResultInAccumulator); | - | ||||||
540 | as->checkException(); | - | ||||||
541 | } executed 366 times by 8 tests: end of block Executed by:
| 366 | ||||||
542 | - | |||||||
543 | void BaselineJIT::generate_ConstructWithSpread(int func, int argc, int argv) | - | ||||||
544 | { | - | ||||||
545 | STORE_IP(); | - | ||||||
546 | STORE_ACC(); | - | ||||||
547 | as->prepareCallWithArgCount(5); | - | ||||||
548 | as->passInt32AsArg(argc, 4); | - | ||||||
549 | as->passRegAsArg(argv, 3); | - | ||||||
550 | as->passAccumulatorAsArg(2); | - | ||||||
551 | as->passRegAsArg(func, 1); | - | ||||||
552 | as->passEngineAsArg(0); | - | ||||||
553 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_constructWithSpread, Assembler::ResultInAccumulator); | - | ||||||
554 | as->checkException(); | - | ||||||
555 | } never executed: end of block | 0 | ||||||
556 | - | |||||||
557 | void BaselineJIT::generate_SetUnwindHandler(int offset) | - | ||||||
558 | { | - | ||||||
559 | if (offset)
| 58-92 | ||||||
560 | as->setUnwindHandler(instructionOffset() + offset); executed 92 times by 7 tests: as->setUnwindHandler(instructionOffset() + offset); Executed by:
| 92 | ||||||
561 | else | - | ||||||
562 | as->clearUnwindHandler(); executed 58 times by 7 tests: as->clearUnwindHandler(); Executed by:
| 58 | ||||||
563 | } | - | ||||||
564 | - | |||||||
565 | void BaselineJIT::generate_UnwindDispatch() | - | ||||||
566 | { | - | ||||||
567 | as->unwindDispatch(); | - | ||||||
568 | } executed 50 times by 7 tests: end of block Executed by:
| 50 | ||||||
569 | - | |||||||
570 | void BaselineJIT::generate_UnwindToLabel(int level, int offset) | - | ||||||
571 | { | - | ||||||
572 | as->unwindToLabel(level, instructionOffset() + offset); | - | ||||||
573 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||
574 | - | |||||||
575 | - | |||||||
576 | void BaselineJIT::generate_ThrowException() | - | ||||||
577 | { | - | ||||||
578 | STORE_IP(); | - | ||||||
579 | STORE_ACC(); | - | ||||||
580 | as->prepareCallWithArgCount(2); | - | ||||||
581 | as->passAccumulatorAsArg(1); | - | ||||||
582 | as->passEngineAsArg(0); | - | ||||||
583 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_throwException, Assembler::IgnoreResult); | - | ||||||
584 | as->gotoCatchException(); | - | ||||||
585 | } executed 42 times by 4 tests: end of block Executed by:
| 42 | ||||||
586 | - | |||||||
587 | void BaselineJIT::generate_GetException() { as->getException(); } never executed: end of block | 0 | ||||||
588 | void BaselineJIT::generate_SetException() { as->setException(); } never executed: end of block | 0 | ||||||
589 | - | |||||||
590 | void BaselineJIT::generate_CreateCallContext() | - | ||||||
591 | { | - | ||||||
592 | as->prepareCallWithArgCount(1); | - | ||||||
593 | as->passCppFrameAsArg(0); | - | ||||||
594 | JIT_GENERATE_RUNTIME_CALL(ExecutionContext::newCallContext, Assembler::IgnoreResult); // keeps result in return value register | - | ||||||
595 | as->storeHeapObject(CallData::Context); | - | ||||||
596 | } executed 154 times by 9 tests: end of block Executed by:
| 154 | ||||||
597 | - | |||||||
598 | void BaselineJIT::generate_PushCatchContext(int index, int name) { as->pushCatchContext(index, name); } executed 50 times by 7 tests: end of block Executed by:
| 50 | ||||||
599 | - | |||||||
600 | void BaselineJIT::generate_PushWithContext() | - | ||||||
601 | { | - | ||||||
602 | STORE_IP(); | - | ||||||
603 | as->saveAccumulatorInFrame(); | - | ||||||
604 | as->prepareCallWithArgCount(2); | - | ||||||
605 | as->passRegAsArg(0, 1); | - | ||||||
606 | as->passEngineAsArg(0); | - | ||||||
607 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_createWithContext, Assembler::IgnoreResult); // keeps result in return value register | - | ||||||
608 | as->checkException(); | - | ||||||
609 | as->storeHeapObject(CallData::Context); | - | ||||||
610 | } never executed: end of block | 0 | ||||||
611 | - | |||||||
612 | void BaselineJIT::generate_PushBlockContext(int index) | - | ||||||
613 | { | - | ||||||
614 | as->saveAccumulatorInFrame(); | - | ||||||
615 | as->prepareCallWithArgCount(2); | - | ||||||
616 | as->passInt32AsArg(index, 1); | - | ||||||
617 | as->passRegAsArg(0, 0); | - | ||||||
618 | JIT_GENERATE_RUNTIME_CALL(Helpers::pushBlockContext, Assembler::IgnoreResult); | - | ||||||
619 | } never executed: end of block | 0 | ||||||
620 | - | |||||||
621 | void BaselineJIT::generate_CloneBlockContext() | - | ||||||
622 | { | - | ||||||
623 | as->saveAccumulatorInFrame(); | - | ||||||
624 | as->prepareCallWithArgCount(1); | - | ||||||
625 | as->passRegAsArg(CallData::Context, 0); | - | ||||||
626 | JIT_GENERATE_RUNTIME_CALL(Helpers::cloneBlockContext, Assembler::IgnoreResult); | - | ||||||
627 | } never executed: end of block | 0 | ||||||
628 | - | |||||||
629 | void BaselineJIT::generate_PushScriptContext(int index) | - | ||||||
630 | { | - | ||||||
631 | as->saveAccumulatorInFrame(); | - | ||||||
632 | as->prepareCallWithArgCount(3); | - | ||||||
633 | as->passInt32AsArg(index, 2); | - | ||||||
634 | as->passEngineAsArg(1); | - | ||||||
635 | as->passRegAsArg(0, 0); | - | ||||||
636 | JIT_GENERATE_RUNTIME_CALL(Helpers::pushScriptContext, Assembler::IgnoreResult); | - | ||||||
637 | } never executed: end of block | 0 | ||||||
638 | - | |||||||
639 | void BaselineJIT::generate_PopScriptContext() | - | ||||||
640 | { | - | ||||||
641 | as->saveAccumulatorInFrame(); | - | ||||||
642 | as->prepareCallWithArgCount(2); | - | ||||||
643 | as->passEngineAsArg(1); | - | ||||||
644 | as->passRegAsArg(0, 0); | - | ||||||
645 | JIT_GENERATE_RUNTIME_CALL(Helpers::popScriptContext, Assembler::IgnoreResult); | - | ||||||
646 | } never executed: end of block | 0 | ||||||
647 | - | |||||||
648 | void BaselineJIT::generate_PopContext() { as->popContext(); } executed 204 times by 11 tests: end of block Executed by:
| 204 | ||||||
649 | - | |||||||
650 | void BaselineJIT::generate_GetIterator(int iterator) | - | ||||||
651 | { | - | ||||||
652 | as->saveAccumulatorInFrame(); | - | ||||||
653 | as->prepareCallWithArgCount(3); | - | ||||||
654 | as->passInt32AsArg(iterator, 2); | - | ||||||
655 | as->passAccumulatorAsArg(1); | - | ||||||
656 | as->passEngineAsArg(0); | - | ||||||
657 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_getIterator, Assembler::ResultInAccumulator); | - | ||||||
658 | as->checkException(); | - | ||||||
659 | } never executed: end of block | 0 | ||||||
660 | - | |||||||
661 | void BaselineJIT::generate_IteratorNext(int value) | - | ||||||
662 | { | - | ||||||
663 | as->saveAccumulatorInFrame(); | - | ||||||
664 | as->prepareCallWithArgCount(3); | - | ||||||
665 | as->passRegAsArg(value, 2); | - | ||||||
666 | as->passAccumulatorAsArg(1); | - | ||||||
667 | as->passEngineAsArg(0); | - | ||||||
668 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_iteratorNext, Assembler::ResultInAccumulator); | - | ||||||
669 | as->checkException(); | - | ||||||
670 | } never executed: end of block | 0 | ||||||
671 | - | |||||||
672 | void BaselineJIT::generate_IteratorClose(int done) | - | ||||||
673 | { | - | ||||||
674 | as->saveAccumulatorInFrame(); | - | ||||||
675 | as->prepareCallWithArgCount(3); | - | ||||||
676 | as->passRegAsArg(done, 2); | - | ||||||
677 | as->passAccumulatorAsArg(1); | - | ||||||
678 | as->passEngineAsArg(0); | - | ||||||
679 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_iteratorClose, Assembler::ResultInAccumulator); | - | ||||||
680 | as->checkException(); | - | ||||||
681 | } never executed: end of block | 0 | ||||||
682 | - | |||||||
683 | void BaselineJIT::generate_DestructureRestElement() | - | ||||||
684 | { | - | ||||||
685 | as->saveAccumulatorInFrame(); | - | ||||||
686 | as->prepareCallWithArgCount(2); | - | ||||||
687 | as->passAccumulatorAsArg(1); | - | ||||||
688 | as->passEngineAsArg(0); | - | ||||||
689 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_destructureRestElement, Assembler::ResultInAccumulator); | - | ||||||
690 | as->checkException(); | - | ||||||
691 | } never executed: end of block | 0 | ||||||
692 | - | |||||||
693 | void BaselineJIT::generate_DeleteProperty(int base, int index) | - | ||||||
694 | { | - | ||||||
695 | STORE_IP(); | - | ||||||
696 | as->prepareCallWithArgCount(3); | - | ||||||
697 | as->passRegAsArg(index, 2); | - | ||||||
698 | as->passRegAsArg(base, 1); | - | ||||||
699 | as->passFunctionAsArg(0); | - | ||||||
700 | JIT_GENERATE_RUNTIME_CALL(Helpers::deleteProperty, Assembler::ResultInAccumulator); | - | ||||||
701 | as->checkException(); | - | ||||||
702 | } never executed: end of block | 0 | ||||||
703 | - | |||||||
704 | void BaselineJIT::generate_DeleteName(int name) | - | ||||||
705 | { | - | ||||||
706 | STORE_IP(); | - | ||||||
707 | as->prepareCallWithArgCount(2); | - | ||||||
708 | as->passInt32AsArg(name, 1); | - | ||||||
709 | as->passFunctionAsArg(0); | - | ||||||
710 | JIT_GENERATE_RUNTIME_CALL(Helpers::deleteName, Assembler::ResultInAccumulator); | - | ||||||
711 | as->checkException(); | - | ||||||
712 | } never executed: end of block | 0 | ||||||
713 | - | |||||||
714 | void BaselineJIT::generate_TypeofName(int name) | - | ||||||
715 | { | - | ||||||
716 | as->prepareCallWithArgCount(2); | - | ||||||
717 | as->passInt32AsArg(name, 1); | - | ||||||
718 | as->passEngineAsArg(0); | - | ||||||
719 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_typeofName, Assembler::ResultInAccumulator); | - | ||||||
720 | } never executed: end of block | 0 | ||||||
721 | - | |||||||
722 | void BaselineJIT::generate_TypeofValue() | - | ||||||
723 | { | - | ||||||
724 | STORE_ACC(); | - | ||||||
725 | as->prepareCallWithArgCount(2); | - | ||||||
726 | as->passAccumulatorAsArg(1); | - | ||||||
727 | as->passEngineAsArg(0); | - | ||||||
728 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_typeofValue, Assembler::ResultInAccumulator); | - | ||||||
729 | } executed 72 times by 3 tests: end of block Executed by:
| 72 | ||||||
730 | - | |||||||
731 | void BaselineJIT::generate_DeclareVar(int varName, int isDeletable) | - | ||||||
732 | { | - | ||||||
733 | as->prepareCallWithArgCount(3); | - | ||||||
734 | as->passInt32AsArg(varName, 2); | - | ||||||
735 | as->passInt32AsArg(isDeletable, 1); | - | ||||||
736 | as->passEngineAsArg(0); | - | ||||||
737 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_declareVar, Assembler::IgnoreResult); | - | ||||||
738 | } executed 30 times by 3 tests: end of block Executed by:
| 30 | ||||||
739 | - | |||||||
740 | void BaselineJIT::generate_DefineArray(int argc, int args) | - | ||||||
741 | { | - | ||||||
742 | as->prepareCallWithArgCount(3); | - | ||||||
743 | as->passInt32AsArg(argc, 2); | - | ||||||
744 | as->passRegAsArg(args, 1); | - | ||||||
745 | as->passEngineAsArg(0); | - | ||||||
746 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_arrayLiteral, Assembler::ResultInAccumulator); | - | ||||||
747 | } executed 122 times by 11 tests: end of block Executed by:
| 122 | ||||||
748 | - | |||||||
749 | void BaselineJIT::generate_DefineObjectLiteral(int internalClassId, int argc, int args) | - | ||||||
750 | { | - | ||||||
751 | as->prepareCallWithArgCount(4); | - | ||||||
752 | as->passRegAsArg(args, 3); | - | ||||||
753 | as->passInt32AsArg(argc, 2); | - | ||||||
754 | as->passInt32AsArg(internalClassId, 1); | - | ||||||
755 | as->passEngineAsArg(0); | - | ||||||
756 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_objectLiteral, Assembler::ResultInAccumulator); | - | ||||||
757 | } executed 20 times by 4 tests: end of block Executed by:
| 20 | ||||||
758 | - | |||||||
759 | void BaselineJIT::generate_CreateClass(int classIndex, int heritage, int computedNames) | - | ||||||
760 | { | - | ||||||
761 | as->prepareCallWithArgCount(4); | - | ||||||
762 | as->passRegAsArg(computedNames, 3); | - | ||||||
763 | as->passRegAsArg(heritage, 2); | - | ||||||
764 | as->passInt32AsArg(classIndex, 1); | - | ||||||
765 | as->passEngineAsArg(0); | - | ||||||
766 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_createClass, Assembler::ResultInAccumulator); | - | ||||||
767 | } never executed: end of block | 0 | ||||||
768 | - | |||||||
769 | void BaselineJIT::generate_CreateMappedArgumentsObject() | - | ||||||
770 | { | - | ||||||
771 | as->prepareCallWithArgCount(1); | - | ||||||
772 | as->passEngineAsArg(0); | - | ||||||
773 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_createMappedArgumentsObject, | - | ||||||
774 | Assembler::ResultInAccumulator); | - | ||||||
775 | } executed 30 times by 5 tests: end of block Executed by:
| 30 | ||||||
776 | - | |||||||
777 | void BaselineJIT::generate_CreateUnmappedArgumentsObject() | - | ||||||
778 | { | - | ||||||
779 | as->prepareCallWithArgCount(1); | - | ||||||
780 | as->passEngineAsArg(0); | - | ||||||
781 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_createUnmappedArgumentsObject, | - | ||||||
782 | Assembler::ResultInAccumulator); | - | ||||||
783 | } never executed: end of block | 0 | ||||||
784 | - | |||||||
785 | void BaselineJIT::generate_CreateRestParameter(int argIndex) | - | ||||||
786 | { | - | ||||||
787 | as->prepareCallWithArgCount(2); | - | ||||||
788 | as->passInt32AsArg(argIndex, 1); | - | ||||||
789 | as->passEngineAsArg(0); | - | ||||||
790 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_createRestParameter, Assembler::ResultInAccumulator); | - | ||||||
791 | } never executed: end of block | 0 | ||||||
792 | - | |||||||
793 | void BaselineJIT::generate_ConvertThisToObject() | - | ||||||
794 | { | - | ||||||
795 | as->prepareCallWithArgCount(2); | - | ||||||
796 | as->passRegAsArg(CallData::This, 1); | - | ||||||
797 | as->passEngineAsArg(0); | - | ||||||
798 | JIT_GENERATE_RUNTIME_CALL(Helpers::convertThisToObject, Assembler::IgnoreResult); | - | ||||||
799 | as->checkException(); | - | ||||||
800 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||
801 | - | |||||||
802 | void BaselineJIT::generate_LoadSuperConstructor() | - | ||||||
803 | { | - | ||||||
804 | as->prepareCallWithArgCount(2); | - | ||||||
805 | as->passRegAsArg(CallData::Function, 1); | - | ||||||
806 | as->passEngineAsArg(0); | - | ||||||
807 | JIT_GENERATE_RUNTIME_CALL(Helpers::loadSuperConstructor, Assembler::ResultInAccumulator); | - | ||||||
808 | as->checkException(); | - | ||||||
809 | } never executed: end of block | 0 | ||||||
810 | - | |||||||
811 | void BaselineJIT::generate_ToObject() | - | ||||||
812 | { | - | ||||||
813 | STORE_ACC(); | - | ||||||
814 | as->prepareCallWithArgCount(2); | - | ||||||
815 | as->passAccumulatorAsArg(1); | - | ||||||
816 | as->passEngineAsArg(0); | - | ||||||
817 | JIT_GENERATE_RUNTIME_CALL(Helpers::toObject, Assembler::ResultInAccumulator); | - | ||||||
818 | as->checkException(); | - | ||||||
819 | - | |||||||
820 | } never executed: end of block | 0 | ||||||
821 | - | |||||||
822 | void BaselineJIT::generate_Jump(int offset) { as->jump(instructionOffset() + offset); } executed 2072 times by 31 tests: end of block Executed by:
| 2072 | ||||||
823 | void BaselineJIT::generate_JumpTrue(int offset) { as->jumpTrue(instructionOffset() + offset); } executed 248 times by 9 tests: end of block Executed by:
| 248 | ||||||
824 | void BaselineJIT::generate_JumpFalse(int offset) { as->jumpFalse(instructionOffset() + offset); } executed 3426 times by 37 tests: end of block Executed by:
| 3426 | ||||||
825 | void BaselineJIT::generate_JumpNoException(int offset) { as->jumpNoException(instructionOffset() + offset); } executed 50 times by 7 tests: end of block Executed by:
| 50 | ||||||
826 | void BaselineJIT::generate_JumpNotUndefined(int offset) { as->jumpNotUndefined(instructionOffset() + offset); } never executed: end of block | 0 | ||||||
827 | - | |||||||
828 | void BaselineJIT::generate_CmpEqNull() { as->cmpeqNull(); } never executed: end of block | 0 | ||||||
829 | void BaselineJIT::generate_CmpNeNull() { as->cmpneNull(); } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||
830 | void BaselineJIT::generate_CmpEqInt(int lhs) { as->cmpeqInt(lhs); } executed 40 times by 8 tests: end of block Executed by:
| 40 | ||||||
831 | void BaselineJIT::generate_CmpNeInt(int lhs) { as->cmpneInt(lhs); } executed 30 times by 3 tests: end of block Executed by:
| 30 | ||||||
832 | void BaselineJIT::generate_CmpEq(int lhs) { as->cmpeq(lhs); } executed 1042 times by 16 tests: end of block Executed by:
| 1042 | ||||||
833 | void BaselineJIT::generate_CmpNe(int lhs) { as->cmpne(lhs); } executed 86 times by 7 tests: end of block Executed by:
| 86 | ||||||
834 | void BaselineJIT::generate_CmpGt(int lhs) { as->cmpgt(lhs); } executed 74 times by 10 tests: end of block Executed by:
| 74 | ||||||
835 | void BaselineJIT::generate_CmpGe(int lhs) { as->cmpge(lhs); } executed 12 times by 3 tests: end of block Executed by:
| 12 | ||||||
836 | void BaselineJIT::generate_CmpLt(int lhs) { as->cmplt(lhs); } executed 336 times by 15 tests: end of block Executed by:
| 336 | ||||||
837 | void BaselineJIT::generate_CmpLe(int lhs) { as->cmple(lhs); } executed 72 times by 5 tests: end of block Executed by:
| 72 | ||||||
838 | void BaselineJIT::generate_CmpStrictEqual(int lhs) { as->cmpStrictEqual(lhs); } executed 586 times by 11 tests: end of block Executed by:
| 586 | ||||||
839 | void BaselineJIT::generate_CmpStrictNotEqual(int lhs) { as->cmpStrictNotEqual(lhs); } executed 48 times by 6 tests: end of block Executed by:
| 48 | ||||||
840 | - | |||||||
841 | void BaselineJIT::generate_CmpIn(int lhs) | - | ||||||
842 | { | - | ||||||
843 | STORE_ACC(); | - | ||||||
844 | as->prepareCallWithArgCount(3); | - | ||||||
845 | as->passAccumulatorAsArg(2); | - | ||||||
846 | as->passRegAsArg(lhs, 1); | - | ||||||
847 | as->passEngineAsArg(0); | - | ||||||
848 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_in, Assembler::ResultInAccumulator); | - | ||||||
849 | as->checkException(); | - | ||||||
850 | } executed 50 times by 2 tests: end of block Executed by:
| 50 | ||||||
851 | - | |||||||
852 | void BaselineJIT::generate_CmpInstanceOf(int lhs) | - | ||||||
853 | { | - | ||||||
854 | STORE_ACC(); | - | ||||||
855 | as->prepareCallWithArgCount(3); | - | ||||||
856 | as->passAccumulatorAsArg(2); | - | ||||||
857 | as->passRegAsArg(lhs, 1); | - | ||||||
858 | as->passEngineAsArg(0); | - | ||||||
859 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_instanceof, Assembler::ResultInAccumulator); | - | ||||||
860 | as->checkException(); | - | ||||||
861 | } executed 84 times by 5 tests: end of block Executed by:
| 84 | ||||||
862 | - | |||||||
863 | void BaselineJIT::generate_UNot() { as->unot(); } executed 134 times by 10 tests: end of block Executed by:
| 134 | ||||||
864 | void BaselineJIT::generate_UPlus() { as->toNumber(); } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||
865 | void BaselineJIT::generate_UMinus() { as->uminus(); } executed 26 times by 3 tests: end of block Executed by:
| 26 | ||||||
866 | void BaselineJIT::generate_UCompl() { as->ucompl(); } never executed: end of block | 0 | ||||||
867 | void BaselineJIT::generate_Increment() { as->inc(); } executed 326 times by 13 tests: end of block Executed by:
| 326 | ||||||
868 | void BaselineJIT::generate_Decrement() { as->dec(); } executed 288 times by 6 tests: end of block Executed by:
| 288 | ||||||
869 | void BaselineJIT::generate_Add(int lhs) { as->add(lhs); } executed 2130 times by 29 tests: end of block Executed by:
| 2130 | ||||||
870 | - | |||||||
871 | void BaselineJIT::generate_BitAnd(int lhs) { as->bitAnd(lhs); } never executed: end of block | 0 | ||||||
872 | void BaselineJIT::generate_BitOr(int lhs) { as->bitOr(lhs); } executed 14 times by 1 test: end of block Executed by:
| 14 | ||||||
873 | void BaselineJIT::generate_BitXor(int lhs) { as->bitXor(lhs); } never executed: end of block | 0 | ||||||
874 | void BaselineJIT::generate_UShr(int lhs) { as->ushr(lhs); } never executed: end of block | 0 | ||||||
875 | void BaselineJIT::generate_Shr(int lhs) { as->shr(lhs); } never executed: end of block | 0 | ||||||
876 | void BaselineJIT::generate_Shl(int lhs) { as->shl(lhs); } never executed: end of block | 0 | ||||||
877 | - | |||||||
878 | void BaselineJIT::generate_BitAndConst(int rhs) { as->bitAndConst(rhs); } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||
879 | void BaselineJIT::generate_BitOrConst(int rhs) { as->bitOrConst(rhs); } never executed: end of block | 0 | ||||||
880 | void BaselineJIT::generate_BitXorConst(int rhs) { as->bitXorConst(rhs); } never executed: end of block | 0 | ||||||
881 | void BaselineJIT::generate_UShrConst(int rhs) { as->ushrConst(rhs); } never executed: end of block | 0 | ||||||
882 | void BaselineJIT::generate_ShrConst(int rhs) { as->shrConst(rhs); } never executed: end of block | 0 | ||||||
883 | void BaselineJIT::generate_ShlConst(int rhs) { as->shlConst(rhs); } never executed: end of block | 0 | ||||||
884 | - | |||||||
885 | void BaselineJIT::generate_Exp(int lhs) { | - | ||||||
886 | STORE_IP(); | - | ||||||
887 | STORE_ACC(); | - | ||||||
888 | as->prepareCallWithArgCount(2); | - | ||||||
889 | as->passAccumulatorAsArg(1); | - | ||||||
890 | as->passRegAsArg(lhs, 0); | - | ||||||
891 | JIT_GENERATE_RUNTIME_CALL(Helpers::exp, Assembler::ResultInAccumulator); | - | ||||||
892 | as->checkException(); | - | ||||||
893 | } never executed: end of block | 0 | ||||||
894 | void BaselineJIT::generate_Mul(int lhs) { as->mul(lhs); } executed 896 times by 13 tests: end of block Executed by:
| 896 | ||||||
895 | void BaselineJIT::generate_Div(int lhs) { as->div(lhs); } executed 468 times by 12 tests: end of block Executed by:
| 468 | ||||||
896 | void BaselineJIT::generate_Mod(int lhs) { as->mod(lhs); } executed 46 times by 5 tests: end of block Executed by:
| 46 | ||||||
897 | void BaselineJIT::generate_Sub(int lhs) { as->sub(lhs); } executed 686 times by 20 tests: end of block Executed by:
| 686 | ||||||
898 | - | |||||||
899 | //void BaselineJIT::generate_BinopContext(int alu, int lhs) | - | ||||||
900 | //{ | - | ||||||
901 | // auto engine = function->internalClass->engine; | - | ||||||
902 | // void *op = engine->runtime.runtimeMethods[alu]; | - | ||||||
903 | // STORE_ACC(); | - | ||||||
904 | // as->passAccumulatorAsArg(2); | - | ||||||
905 | // as->passRegAsArg(lhs, 1); | - | ||||||
906 | // as->passEngineAsArg(0); | - | ||||||
907 | // as->callRuntime("binopContext", op, Assembler::ResultInAccumulator); | - | ||||||
908 | // as->checkException(); | - | ||||||
909 | //} | - | ||||||
910 | - | |||||||
911 | void BaselineJIT::generate_LoadQmlContext(int result) | - | ||||||
912 | { | - | ||||||
913 | as->prepareCallWithArgCount(1); | - | ||||||
914 | as->passEngineAsArg(0); | - | ||||||
915 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_loadQmlContext, Assembler::ResultInAccumulator); | - | ||||||
916 | as->storeReg(result); | - | ||||||
917 | } executed 13128 times by 60 tests: end of block Executed by:
| 13128 | ||||||
918 | - | |||||||
919 | void BaselineJIT::generate_LoadQmlImportedScripts(int result) | - | ||||||
920 | { | - | ||||||
921 | as->prepareCallWithArgCount(1); | - | ||||||
922 | as->passEngineAsArg(0); | - | ||||||
923 | JIT_GENERATE_RUNTIME_CALL(Runtime::method_loadQmlImportedScripts, Assembler::ResultInAccumulator); | - | ||||||
924 | as->storeReg(result); | - | ||||||
925 | } executed 13128 times by 60 tests: end of block Executed by:
| 13128 | ||||||
926 | - | |||||||
927 | void BaselineJIT::startInstruction(Instr::Type /*instr*/) | - | ||||||
928 | { | - | ||||||
929 | if (hasLabel())
| 5472-137716 | ||||||
930 | as->addLabel(instructionOffset()); executed 5472 times by 38 tests: as->addLabel(instructionOffset()); Executed by:
| 5472 | ||||||
931 | } executed 143188 times by 64 tests: end of block Executed by:
| 143188 | ||||||
932 | - | |||||||
933 | void BaselineJIT::endInstruction(Instr::Type instr) | - | ||||||
934 | { | - | ||||||
935 | Q_UNUSED(instr); | - | ||||||
936 | } executed 143188 times by 64 tests: end of block Executed by:
| 143188 | ||||||
937 | - | |||||||
938 | #endif // V4_ENABLE_JIT | - | ||||||
Source code | Switch to Preprocessed file |