OpenCoverage

qv4runtime.cpp #1

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4runtime.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
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#include "qv4global_p.h"-
41#include "qv4engine_p.h"-
42#include "qv4runtime_p.h"-
43#ifndef V4_BOOTSTRAP-
44#include "qv4object_p.h"-
45#include "qv4objectproto_p.h"-
46#include "qv4globalobject_p.h"-
47#include "qv4stringobject_p.h"-
48#include "qv4argumentsobject_p.h"-
49#include "qv4objectiterator_p.h"-
50#include "qv4dateobject_p.h"-
51#include "qv4lookup_p.h"-
52#include "qv4function_p.h"-
53#include "qv4numberobject_p.h"-
54#include "qv4regexp_p.h"-
55#include "qv4regexpobject_p.h"-
56#include "private/qlocale_tools_p.h"-
57#include "qv4scopedvalue_p.h"-
58#include "qv4jscall_p.h"-
59#include <private/qv4qmlcontext_p.h>-
60#include <private/qqmltypewrapper_p.h>-
61#include <private/qqmlengine_p.h>-
62#include <private/qqmljavascriptexpression_p.h>-
63#include "qv4qobjectwrapper_p.h"-
64#include "qv4symbol_p.h"-
65#include "qv4generatorobject_p.h"-
66#include <private/qv8engine_p.h>-
67#endif-
68-
69#include <QtCore/QDebug>-
70#include <cassert>-
71#include <cstdio>-
72#include <stdlib.h>-
73-
74#include <wtf/MathExtras.h>-
75-
76#ifdef QV4_COUNT_RUNTIME_FUNCTIONS-
77# include <QtCore/QBuffer>-
78# include <QtCore/QDebug>-
79#endif // QV4_COUNT_RUNTIME_FUNCTIONS-
80-
81QT_BEGIN_NAMESPACE-
82-
83namespace QV4 {-
84-
85#ifdef QV4_COUNT_RUNTIME_FUNCTIONS-
86struct RuntimeCounters::Data {-
87 enum Type {-
88 None = 0,-
89 Undefined = 1,-
90 Null = 2,-
91 Boolean = 3,-
92 Integer = 4,-
93 Managed = 5,-
94 Double = 7-
95 };-
96-
97 static const char *pretty(Type t) {-
98 switch (t) {-
99 case None: return "";-
100 case Undefined: return "Undefined";-
101 case Null: return "Null";-
102 case Boolean: return "Boolean";-
103 case Integer: return "Integer";-
104 case Managed: return "Managed";-
105 case Double: return "Double";-
106 default: return "Unknown";-
107 }-
108 }-
109-
110 static unsigned mangle(unsigned tag) {-
111 switch (tag) {-
112 case Value::Undefined_Type: return Undefined;-
113 case Value::Null_Type: return Null;-
114 case Value::Boolean_Type: return Boolean;-
115 case Value::Integer_Type: return Integer;-
116 case Value::Managed_Type: return Managed;-
117 default: return Double;-
118 }-
119 }-
120-
121 static unsigned mangle(unsigned tag1, unsigned tag2) {-
122 return (mangle(tag1) << 3) | mangle(tag2);-
123 }-
124-
125 static void unmangle(unsigned signature, Type &tag1, Type &tag2) {-
126 tag1 = Type((signature >> 3) & 7);-
127 tag2 = Type(signature & 7);-
128 }-
129-
130 typedef QVector<quint64> Counters;-
131 QHash<const char *, Counters> counters;-
132-
133 inline void count(const char *func) {-
134 QVector<quint64> &cnt = counters[func];-
135 if (cnt.isEmpty())-
136 cnt.resize(64);-
137 cnt[0] += 1;-
138 }-
139-
140 inline void count(const char *func, unsigned tag) {-
141 QVector<quint64> &cnt = counters[func];-
142 if (cnt.isEmpty())-
143 cnt.resize(64);-
144 cnt[mangle(tag)] += 1;-
145 }-
146-
147 inline void count(const char *func, unsigned tag1, unsigned tag2) {-
148 QVector<quint64> &cnt = counters[func];-
149 if (cnt.isEmpty())-
150 cnt.resize(64);-
151 cnt[mangle(tag1, tag2)] += 1;-
152 }-
153-
154 struct Line {-
155 const char *func;-
156 Type tag1, tag2;-
157 quint64 count;-
158-
159 static bool less(const Line &line1, const Line &line2) {-
160 return line1.count > line2.count;-
161 }-
162 };-
163-
164 void dump() const {-
165 QBuffer buf;-
166 buf.open(QIODevice::WriteOnly);-
167 QTextStream outs(&buf);-
168 QList<Line> lines;-
169 for (auto it = counters.cbegin(), end = counters.cend(); it != end; ++it) {-
170 const Counters &fCount = it.value();-
171 for (int i = 0, ei = fCount.size(); i != ei; ++i) {-
172 quint64 count = fCount[i];-
173 if (!count)-
174 continue;-
175 Line line;-
176 line.func = it.key();-
177 unmangle(i, line.tag1, line.tag2);-
178 line.count = count;-
179 lines.append(line);-
180 }-
181 }-
182 std::sort(lines.begin(), lines.end(), Line::less);-
183 outs << lines.size() << " counters:" << endl;-
184 for (const Line &line : qAsConst(lines))-
185 outs << qSetFieldWidth(10) << line.count << qSetFieldWidth(0)-
186 << " | " << line.func-
187 << " | " << pretty(line.tag1)-
188 << " | " << pretty(line.tag2)-
189 << endl;-
190 qDebug("%s", buf.data().constData());-
191 }-
192};-
193-
194RuntimeCounters *RuntimeCounters::instance = 0;-
195static RuntimeCounters runtimeCountersInstance;-
196RuntimeCounters::RuntimeCounters()-
197 : d(new Data)-
198{-
199 if (!instance)-
200 instance = this;-
201}-
202-
203RuntimeCounters::~RuntimeCounters()-
204{-
205 d->dump();-
206 delete d;-
207}-
208-
209void RuntimeCounters::count(const char *func)-
210{-
211 d->count(func);-
212}-
213-
214void RuntimeCounters::count(const char *func, uint tag)-
215{-
216 d->count(func, tag);-
217}-
218-
219void RuntimeCounters::count(const char *func, uint tag1, uint tag2)-
220{-
221 d->count(func, tag1, tag2);-
222}-
223-
224#endif // QV4_COUNT_RUNTIME_FUNCTIONS-
225-
226#ifndef V4_BOOTSTRAP-
227-
228Runtime::Runtime()-
229{-
230#define INIT_METHOD(returnvalue, name, args) runtimeMethods[name] = reinterpret_cast<void*>(&method_##name);-
231FOR_EACH_RUNTIME_METHOD(INIT_METHOD)-
232#undef INIT_METHOD-
233}
executed 99151 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
99151
234-
235void RuntimeHelpers::numberToString(QString *result, double num, int radix)-
236{-
237 Q_ASSERT(result);-
238-
239 if (std::isnan(num)) {
std::isnan(num)Description
TRUEevaluated 2404 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3021936 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • ...
2404-3021936
240 *result = QStringLiteral("NaN");-
241 return;
executed 2404 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
2404
242 } else if (qt_is_inf(num)) {
qt_is_inf(num)Description
TRUEevaluated 1655 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicklayouts
FALSEevaluated 3020283 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • ...
1655-3020283
243 *result = num < 0 ? QStringLiteral("-Infinity") : QStringLiteral("Infinity");
executed 976 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
  • tst_qquicklayouts
976
244 return;
executed 1655 times by 2 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_qquicklayouts
1655
245 }-
246-
247 if (radix == 10) {
radix == 10Description
TRUEevaluated 3020296 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • ...
FALSEnever evaluated
0-3020296
248 // We cannot use our usual locale->toString(...) here, because EcmaScript has special rules-
249 // about the longest permissible number, depending on if it's <0 or >0.-
250 const int ecma_shortest_low = -6;-
251 const int ecma_shortest_high = 21;-
252-
253 const QLatin1Char zero('0');-
254 const QLatin1Char dot('.');-
255-
256 int decpt = 0;-
257 int sign = 0;-
258 *result = qdtoa(num, &decpt, &sign);-
259-
260 if (decpt <= ecma_shortest_low || decpt > ecma_shortest_high) {
decpt <= ecma_shortest_lowDescription
TRUEevaluated 1004 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlproperty
FALSEevaluated 3019284 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • ...
decpt > ecma_shortest_highDescription
TRUEevaluated 324 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlproperty
FALSEevaluated 3018978 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • ...
324-3019284
261 if (result->length() > 1)
result->length() > 1Description
TRUEevaluated 124 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlproperty
FALSEevaluated 1203 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlproperty
124-1203
262 result->insert(1, dot);
executed 124 times by 3 tests: result->insert(1, dot);
Executed by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlproperty
124
263 result->append(QLatin1Char('e'));-
264 if (decpt > 0)
decpt > 0Description
TRUEevaluated 323 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlproperty
FALSEevaluated 1004 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlproperty
323-1004
265 result->append(QLatin1Char('+'));
executed 323 times by 2 tests: result->append(QLatin1Char('+'));
Executed by:
  • tst_ecmascripttests
  • tst_qqmlproperty
323
266 result->append(QString::number(decpt - 1));-
267 } else if (decpt <= 0) {
executed 1328 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlproperty
decpt <= 0Description
TRUEevaluated 2398 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlproperty
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
FALSEevaluated 3016568 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • ...
1328-3016568
268 result->prepend(QLatin1String("0.") + QString(-decpt, zero));-
269 } else if (decpt < result->length()) {
executed 2398 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlproperty
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
decpt < result->length()Description
TRUEevaluated 27459 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qqmlproperty
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
FALSEevaluated 2989112 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • ...
2398-2989112
270 result->insert(decpt, dot);-
271 } else {
executed 27459 times by 12 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qqmlproperty
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
27459
272 result->append(QString(decpt - result->length(), zero));-
273 }
executed 2989103 times by 27 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • ...
2989103
274-
275 if (sign && num)
signDescription
TRUEevaluated 88077 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
FALSEevaluated 2932220 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • ...
88077-2932220
276 result->prepend(QLatin1Char('-'));
executed 81118 times by 8 tests: result->prepend(QLatin1Char('-'));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
81118
277-
278 return;
executed 3020290 times by 27 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • ...
3020290
279 }-
280-
281 result->clear();-
282 bool negative = false;-
283-
284 if (num < 0) {
num < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
285 negative = true;-
286 num = -num;-
287 }
never executed: end of block
0
288-
289 double frac = num - ::floor(num);-
290 num = Primitive::toInteger(num);-
291-
292 do {-
293 char c = (char)::fmod(num, radix);-
294 c = (c < 10) ? (c + '0') : (c - 10 + 'a');
(c < 10)Description
TRUEnever evaluated
FALSEnever evaluated
0
295 result->prepend(QLatin1Char(c));-
296 num = ::floor(num / radix);-
297 } while (num != 0);
never executed: end of block
num != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
298-
299 if (frac != 0) {
frac != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
300 result->append(QLatin1Char('.'));-
301 do {-
302 frac = frac * radix;-
303 char c = (char)::floor(frac);-
304 c = (c < 10) ? (c + '0') : (c - 10 + 'a');
(c < 10)Description
TRUEnever evaluated
FALSEnever evaluated
0
305 result->append(QLatin1Char(c));-
306 frac = frac - ::floor(frac);-
307 } while (frac != 0);
never executed: end of block
frac != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
308 }
never executed: end of block
0
309-
310 if (negative)
negativeDescription
TRUEnever evaluated
FALSEnever evaluated
0
311 result->prepend(QLatin1Char('-'));
never executed: result->prepend(QLatin1Char('-'));
0
312}
never executed: end of block
0
313-
314ReturnedValue Runtime::method_closure(ExecutionEngine *engine, int functionId)-
315{-
316 QV4::Function *clos = static_cast<CompiledData::CompilationUnit*>(engine->currentStackFrame->v4Function->compilationUnit)->runtimeFunctions[functionId];-
317 Q_ASSERT(clos);-
318 ExecutionContext *current = static_cast<ExecutionContext *>(&engine->currentStackFrame->jsFrame->context);-
319 if (clos->isGenerator())
clos->isGenerator()Description
TRUEevaluated 6116 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 948890 times by 31 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
6116-948890
320 return GeneratorFunction::create(current, clos)->asReturnedValue();
executed 6111 times by 1 test: return GeneratorFunction::create(current, clos)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
6111
321 return FunctionObject::createScriptFunction(current, clos)->asReturnedValue();
executed 949040 times by 31 tests: return FunctionObject::createScriptFunction(current, clos)->asReturnedValue();
Executed by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
949040
322}-
323-
324bool Runtime::method_deleteProperty(ExecutionEngine *engine, const Value &base, const Value &index)-
325{-
326 Scope scope(engine);-
327 ScopedObject o(scope, base.toObject(engine));-
328 if (scope.engine->hasException)
scope.engine->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 10266 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
0-10266
329 return Encode::undefined();
never executed: return Encode::undefined();
0
330 Q_ASSERT(o);-
331-
332 ScopedPropertyKey key(scope, index.toPropertyKey(engine));-
333 if (engine->hasException)
engine->hasExceptionDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 10289 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
4-10289
334 return false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
4
335 return o->deleteProperty(key);
executed 10279 times by 5 tests: return o->deleteProperty(key);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
10279
336}-
337-
338bool Runtime::method_deleteName(ExecutionEngine *engine, int nameIndex)-
339{-
340 Scope scope(engine);-
341 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);-
342 return static_cast<ExecutionContext &>(engine->currentStackFrame->jsFrame->context).deleteProperty(name);
executed 142 times by 2 tests: return static_cast<ExecutionContext &>(engine->currentStackFrame->jsFrame->context).deleteProperty(name);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
142
343}-
344-
345QV4::ReturnedValue Runtime::method_instanceof(ExecutionEngine *engine, const Value &lval, const Value &rval)-
346{-
347 // 11.8.6, 5: rval must be an Object-
348 const Object *rhs = rval.as<Object>();-
349 if (!rhs)
!rhsDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
FALSEevaluated 4252218 times by 11 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
22-4252218
350 return engine->throwTypeError();
executed 22 times by 2 tests: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
22
351-
352 Scope scope(engine);-
353 ScopedValue hasInstance(scope, rhs->get(engine->symbol_hasInstance()));-
354 if (hasInstance->isUndefined())
hasInstance->isUndefined()Description
TRUEevaluated 74 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
FALSEevaluated 4262635 times by 11 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
74-4262635
355 return rhs->instanceOf(lval);
executed 74 times by 3 tests: return rhs->instanceOf(lval);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
74
356 FunctionObject *f = hasInstance->as<FunctionObject>();-
357 if (!f)
!fDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4299623 times by 11 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
4-4299623
358 return engine->throwTypeError();
executed 4 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
4
359-
360 ScopedValue result(scope, f->call(&rval, &lval, 1));-
361 return Encode(result->toBoolean());
executed 4301818 times by 11 tests: return Encode(result->toBoolean());
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
4301818
362}-
363-
364QV4::ReturnedValue Runtime::method_in(ExecutionEngine *engine, const Value &left, const Value &right)-
365{-
366 Object *ro = right.objectValue();-
367 if (!ro)
!roDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 672 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
20-672
368 return engine->throwTypeError();
executed 20 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
20
369 Scope scope(engine);-
370 ScopedPropertyKey s(scope, left.toPropertyKey(engine));-
371 if (scope.hasException())
scope.hasException()Description
TRUEnever evaluated
FALSEevaluated 672 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
0-672
372 return Encode::undefined();
never executed: return Encode::undefined();
0
373 bool r = ro->hasProperty(s);-
374 return Encode(r);
executed 672 times by 6 tests: return Encode(r);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
672
375}-
376-
377double RuntimeHelpers::stringToNumber(const QString &string)-
378{-
379 const QStringRef s = QStringRef(&string).trimmed();-
380 if (s.startsWith(QLatin1String("0x")) || s.startsWith(QLatin1String("0X")))
s.startsWith(Q...1String("0x"))Description
TRUEevaluated 262320 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 9150 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
s.startsWith(Q...1String("0X"))Description
TRUEevaluated 88 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 9069 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
88-262320
381 return s.toLong(nullptr, 16);
executed 262408 times by 1 test: return s.toLong(nullptr, 16);
Executed by:
  • tst_ecmascripttests
262408
382 bool ok;-
383 QByteArray ba = s.toLatin1();-
384 const char *begin = ba.constData();-
385 const char *end = nullptr;-
386 double d = qstrtod(begin, &end, &ok);-
387 if (end - begin != ba.size()) {
end - begin != ba.size()Description
TRUEevaluated 1851 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
FALSEevaluated 7212 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
1851-7212
388 if (ba == "Infinity" || ba == "+Infinity")
ba == "Infinity"Description
TRUEevaluated 132 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
FALSEevaluated 1720 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
ba == "+Infinity"Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1692 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
28-1720
389 d = Q_INFINITY;
executed 160 times by 2 tests: d = (::qInf());
Executed by:
  • tst_ecmascripttests
  • tst_qjsvalue
160
390 else if (ba == "-Infinity")
ba == "-Infinity"Description
TRUEevaluated 88 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
FALSEevaluated 1604 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
88-1604
391 d = -Q_INFINITY;
executed 88 times by 2 tests: d = -(::qInf());
Executed by:
  • tst_ecmascripttests
  • tst_qjsvalue
88
392 else-
393 d = std::numeric_limits<double>::quiet_NaN();
executed 1604 times by 4 tests: d = std::numeric_limits<double>::quiet_NaN();
Executed by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
1604
394 }-
395 return d;
executed 9067 times by 7 tests: return d;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
9067
396}-
397-
398Heap::String *RuntimeHelpers::stringFromNumber(ExecutionEngine *engine, double number)-
399{-
400 QString qstr;-
401 RuntimeHelpers::numberToString(&qstr, number, 10);-
402 return engine->newString(qstr);
executed 3013986 times by 20 tests: return engine->newString(qstr);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
3013986
403}-
404-
405ReturnedValue RuntimeHelpers::objectDefaultValue(const Object *object, int typeHint)-
406{-
407 ExecutionEngine *engine = object->internalClass()->engine;-
408 if (engine->hasException)
engine->hasExceptionDescription
TRUEevaluated 404 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 52222 times by 30 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
404-52222
409 return Encode::undefined();
executed 404 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
404
410-
411 String *hint;-
412 switch (typeHint) {-
413 case STRING_HINT:
executed 5749 times by 25 tests: case STRING_HINT:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
5749
414 hint = engine->id_string();-
415 break;
executed 5748 times by 25 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
5748
416 case NUMBER_HINT:
executed 42829 times by 6 tests: case NUMBER_HINT:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
42829
417 hint = engine->id_number();-
418 break;
executed 42829 times by 6 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
42829
419 default:
executed 3638 times by 8 tests: default:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickimage
3638
420 hint = engine->id_default();-
421 break;
executed 3634 times by 8 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickimage
3634
422 }-
423-
424 Scope scope(engine);-
425 ScopedFunctionObject toPrimitive(scope, object->get(engine->symbol_toPrimitive()));-
426 if (engine->hasException)
engine->hasExceptionDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 52204 times by 30 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
28-52204
427 return Encode::undefined();
executed 28 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
28
428 if (toPrimitive) {
toPrimitiveDescription
TRUEevaluated 32482 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
FALSEevaluated 19715 times by 30 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
19715-32482
429 ScopedValue result(scope, toPrimitive->call(object, hint, 1));-
430 if (engine->hasException)
engine->hasExceptionDescription
TRUEevaluated 68 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 32414 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
68-32414
431 return Encode::undefined();
executed 68 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
68
432 if (!result->isPrimitive())
!result->isPrimitive()Description
TRUEevaluated 92 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 32322 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
92-32322
433 return engine->throwTypeError();
executed 92 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
92
434 return result->asReturnedValue();
executed 32322 times by 3 tests: return result->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
32322
435 }-
436-
437 if (hint == engine->id_default())
hint == engine->id_default()Description
TRUEevaluated 3378 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickimage
FALSEevaluated 16320 times by 26 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • ...
3378-16320
438 hint = engine->id_number();
executed 3380 times by 8 tests: hint = engine->id_number();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickimage
3380
439 return ordinaryToPrimitive(engine, object, hint);
executed 19699 times by 30 tests: return ordinaryToPrimitive(engine, object, hint);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
19699
440}-
441-
442-
443ReturnedValue RuntimeHelpers::ordinaryToPrimitive(ExecutionEngine *engine, const Object *object, String *typeHint)-
444{-
445 Q_ASSERT(!engine->hasException);-
446-
447 String *meth1 = engine->id_toString();-
448 String *meth2 = engine->id_valueOf();-
449-
450 if (typeHint->propertyKey() == engine->id_number()->propertyKey()) {
typeHint->prop...>propertyKey()Description
TRUEevaluated 46039 times by 10 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickimage
FALSEevaluated 5759 times by 25 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
5759-46039
451 qSwap(meth1, meth2);-
452 } else {
executed 46041 times by 10 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickimage
46041
453 Q_ASSERT(typeHint->propertyKey() == engine->id_string()->propertyKey());-
454 }
executed 5766 times by 25 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
5766
455-
456 Scope scope(engine);-
457 ScopedValue result(scope);-
458-
459 ScopedValue conv(scope, object->get(meth1));-
460 if (FunctionObject *o = conv->as<FunctionObject>()) {
FunctionObject...ctionObject>()Description
TRUEevaluated 51614 times by 30 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
FALSEevaluated 228 times by 1 test
Evaluated by:
  • tst_ecmascripttests
228-51614
461 result = o->call(object, nullptr, 0);-
462 if (result->isPrimitive())
result->isPrimitive()Description
TRUEevaluated 46284 times by 26 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • ...
FALSEevaluated 5324 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickimage
5324-46284
463 return result->asReturnedValue();
executed 46283 times by 26 tests: return result->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • ...
46283
464 }
executed 5323 times by 7 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickimage
5323
465-
466 if (engine->hasException)
engine->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 5549 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickimage
0-5549
467 return Encode::undefined();
never executed: return Encode::undefined();
0
468-
469 conv = object->get(meth2);-
470 if (FunctionObject *o = conv->as<FunctionObject>()) {
FunctionObject...ctionObject>()Description
TRUEevaluated 5493 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickimage
FALSEevaluated 60 times by 1 test
Evaluated by:
  • tst_ecmascripttests
60-5493
471 result = o->call(object, nullptr, 0);-
472 if (result->isPrimitive())
result->isPrimitive()Description
TRUEevaluated 5179 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickimage
FALSEevaluated 312 times by 1 test
Evaluated by:
  • tst_ecmascripttests
312-5179
473 return result->asReturnedValue();
executed 5179 times by 7 tests: return result->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickimage
5179
474 }
executed 312 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
312
475-
476 return engine->throwTypeError();
executed 372 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
372
477}-
478-
479-
480Heap::Object *RuntimeHelpers::convertToObject(ExecutionEngine *engine, const Value &value)-
481{-
482 Q_ASSERT(!value.isObject());-
483 switch (value.type()) {-
484 case Value::Undefined_Type:
executed 366 times by 3 tests: case Value::Undefined_Type:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
366
485 engine->throwTypeError(QLatin1String("Value is undefined and could not be converted to an object"));-
486 return nullptr;
executed 366 times by 3 tests: return nullptr;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
366
487 case Value::Null_Type:
executed 342 times by 3 tests: case Value::Null_Type:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
342
488 engine->throwTypeError(QLatin1String("Value is null and could not be converted to an object"));-
489 return nullptr;
executed 342 times by 3 tests: return nullptr;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
342
490 case Value::Boolean_Type:
executed 300 times by 1 test: case Value::Boolean_Type:
Executed by:
  • tst_ecmascripttests
300
491 return engine->newBooleanObject(value.booleanValue());
executed 300 times by 1 test: return engine->newBooleanObject(value.booleanValue());
Executed by:
  • tst_ecmascripttests
300
492 case Value::Managed_Type:
executed 44954 times by 12 tests: case Value::Managed_Type:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllocale
  • tst_qqmltranslation
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_testfiltering
44954
493 Q_ASSERT(value.isStringOrSymbol());-
494 if (!value.isString())
!value.isString()Description
TRUEevaluated 106 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 44845 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllocale
  • tst_qqmltranslation
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_testfiltering
106-44845
495 return engine->newSymbolObject(value.symbolValue());
executed 106 times by 1 test: return engine->newSymbolObject(value.symbolValue());
Executed by:
  • tst_ecmascripttests
106
496 return engine->newStringObject(value.stringValue());
executed 44845 times by 12 tests: return engine->newStringObject(value.stringValue());
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllocale
  • tst_qqmltranslation
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_testfiltering
44845
497 case Value::Integer_Type:
executed 606 times by 7 tests: case Value::Integer_Type:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qquicklayouts
  • tst_qv4debugger
606
498 default: // double
executed 638 times by 8 tests: default:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquicklayouts
638
499 return engine->newNumberObject(value.asDouble());
executed 1244 times by 9 tests: return engine->newNumberObject(value.asDouble());
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquicklayouts
  • tst_qv4debugger
1244
500 }-
501}-
502-
503Heap::String *RuntimeHelpers::convertToString(ExecutionEngine *engine, Value value, TypeHint hint)-
504{-
505 redo:-
506 switch (value.type()) {-
507 case Value::Empty_Type:
never executed: case Value::Empty_Type:
0
508 Q_ASSERT(!"empty Value encountered");-
509 Q_UNREACHABLE();-
510 case Value::Undefined_Type:
code before this statement never executed: case Value::Undefined_Type:
executed 1151 times by 3 tests: case Value::Undefined_Type:
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
0-1151
511 return engine->id_undefined()->d();
executed 1149 times by 3 tests: return engine->id_undefined()->d();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
1149
512 case Value::Null_Type:
executed 152 times by 1 test: case Value::Null_Type:
Executed by:
  • tst_ecmascripttests
152
513 return engine->id_null()->d();
executed 152 times by 1 test: return engine->id_null()->d();
Executed by:
  • tst_ecmascripttests
152
514 case Value::Boolean_Type:
executed 963 times by 3 tests: case Value::Boolean_Type:
Executed by:
  • tst_ecmascripttests
  • tst_qqmllistmodel
  • tst_qquickloader
963
515 if (value.booleanValue())
value.booleanValue()Description
TRUEevaluated 475 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmllistmodel
  • tst_qquickloader
FALSEevaluated 488 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmllistmodel
475-488
516 return engine->id_true()->d();
executed 475 times by 3 tests: return engine->id_true()->d();
Executed by:
  • tst_ecmascripttests
  • tst_qqmllistmodel
  • tst_qquickloader
475
517 else-
518 return engine->id_false()->d();
executed 488 times by 2 tests: return engine->id_false()->d();
Executed by:
  • tst_ecmascripttests
  • tst_qqmllistmodel
488
519 case Value::Managed_Type: {
executed 1576 times by 2 tests: case Value::Managed_Type:
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
1576
520 if (value.isString())
value.isString()Description
TRUEnever evaluated
FALSEevaluated 1576 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
0-1576
521 return static_cast<const String &>(value).d();
never executed: return static_cast<const String &>(value).d();
0
522 if (value.isSymbol()) {
value.isSymbol()Description
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1545 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
32-1545
523 engine->throwTypeError(QLatin1String("Cannot convert a symbol to a string."));-
524 return nullptr;
executed 32 times by 1 test: return nullptr;
Executed by:
  • tst_ecmascripttests
32
525 }-
526 value = Primitive::fromReturnedValue(RuntimeHelpers::toPrimitive(value, hint));-
527 Q_ASSERT(value.isPrimitive());-
528 if (value.isString())
value.isString()Description
TRUEevaluated 1172 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
FALSEevaluated 375 times by 1 test
Evaluated by:
  • tst_ecmascripttests
375-1172
529 return static_cast<const String &>(value).d();
executed 1171 times by 2 tests: return static_cast<const String &>(value).d();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
1171
530 goto redo;
executed 372 times by 1 test: goto redo;
Executed by:
  • tst_ecmascripttests
372
531 }-
532 case Value::Integer_Type:
executed 2614215 times by 15 tests: case Value::Integer_Type:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
2614215
533 return RuntimeHelpers::stringFromNumber(engine, value.int_32());
executed 2614214 times by 15 tests: return RuntimeHelpers::stringFromNumber(engine, value.int_32());
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
2614214
534 default: // double
executed 399725 times by 13 tests: default:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlproperty
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
399725
535 return RuntimeHelpers::stringFromNumber(engine, value.doubleValue());
executed 399726 times by 13 tests: return RuntimeHelpers::stringFromNumber(engine, value.doubleValue());
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlproperty
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
399726
536 } // switch-
537}-
538-
539// This is slightly different from the method above, as-
540// the + operator requires a slightly different conversion-
541static Heap::String *convert_to_string_add(ExecutionEngine *engine, Value value)-
542{-
543 return RuntimeHelpers::convertToString(engine, value, PREFERREDTYPE_HINT);
executed 2395087 times by 18 tests: return RuntimeHelpers::convertToString(engine, value, PREFERREDTYPE_HINT);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
2395087
544}-
545-
546QV4::ReturnedValue RuntimeHelpers::addHelper(ExecutionEngine *engine, const Value &left, const Value &right)-
547{-
548 Scope scope(engine);-
549-
550 ScopedValue pleft(scope, RuntimeHelpers::toPrimitive(left, PREFERREDTYPE_HINT));-
551 ScopedValue pright(scope, RuntimeHelpers::toPrimitive(right, PREFERREDTYPE_HINT));-
552 String *sleft = pleft->stringValue();-
553 String *sright = pright->stringValue();-
554 if (sleft || sright) {
sleftDescription
TRUEevaluated 57837409 times by 35 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
FALSEevaluated 185896 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlproperty
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
srightDescription
TRUEevaluated 185494 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlproperty
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
FALSEevaluated 402 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
402-57837409
555 if (!sleft) {
!sleftDescription
TRUEevaluated 185494 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlproperty
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
FALSEevaluated 57842851 times by 35 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
185494-57842851
556 pleft = convert_to_string_add(engine, pleft);-
557 sleft = static_cast<String *>(pleft.ptr);-
558 }
executed 185496 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlproperty
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
185496
559 if (!sright) {
!srightDescription
TRUEevaluated 2209596 times by 16 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
FALSEevaluated 55841666 times by 33 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • ...
2209596-55841666
560 pright = convert_to_string_add(engine, pright);-
561 sright = static_cast<String *>(pright.ptr);-
562 }
executed 2209594 times by 16 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
2209594
563 if (engine->hasException)
engine->hasExceptionDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 58183347 times by 37 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
32-58183347
564 return Encode::undefined();
executed 32 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
32
565 if (!sleft->d()->length())
!sleft->d()->length()Description
TRUEevaluated 271322 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_scenegraph
FALSEevaluated 57979299 times by 37 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
271322-57979299
566 return sright->asReturnedValue();
executed 271321 times by 7 tests: return sright->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_scenegraph
271321
567 if (!sright->d()->length())
!sright->d()->length()Description
TRUEevaluated 1139831 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlproperty
FALSEevaluated 57028952 times by 35 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
1139831-57028952
568 return sleft->asReturnedValue();
executed 1139709 times by 6 tests: return sleft->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlproperty
1139709
569 MemoryManager *mm = engine->memoryManager;-
570 return (mm->alloc<ComplexString>(sleft->d(), sright->d()))->asReturnedValue();
executed 56942701 times by 35 tests: return (mm->alloc<ComplexString>(sleft->d(), sright->d()))->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
56942701
571 }-
572 double x = RuntimeHelpers::toNumber(pleft);-
573 double y = RuntimeHelpers::toNumber(pright);-
574 return Encode(x + y);
executed 402 times by 3 tests: return Encode(x + y);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
402
575}-
576-
577void Runtime::method_storeProperty(ExecutionEngine *engine, const Value &object, int nameIndex, const Value &value)-
578{-
579 Scope scope(engine);-
580 QV4::Function *v4Function = engine->currentStackFrame->v4Function;-
581 ScopedString name(scope, v4Function->compilationUnit->runtimeStrings[nameIndex]);-
582 ScopedObject o(scope, object.toObject(engine));-
583 if ((!o || !o->put(name, value)) && v4Function->isStrict())
!oDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 52630 times by 66 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltimer
  • ...
!o->put(name, value)Description
TRUEevaluated 80 times by 5 tests
Evaluated by:
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
FALSEevaluated 52550 times by 66 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltimer
  • ...
v4Function->isStrict()Description
TRUEnever evaluated
FALSEevaluated 84 times by 5 tests
Evaluated by:
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
0-52630
584 engine->throwTypeError();
never executed: engine->throwTypeError();
0
585}
executed 52634 times by 66 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltimer
  • ...
52634
586-
587static Q_NEVER_INLINE ReturnedValue getElementIntFallback(ExecutionEngine *engine, const Value &object, uint idx)-
588{-
589 Q_ASSERT(idx < UINT_MAX);-
590 Scope scope(engine);-
591-
592 ScopedObject o(scope, object);-
593 if (!o) {
!oDescription
TRUEevaluated 24770144 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
FALSEevaluated 95522 times by 19 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
95522-24770144
594 if (const String *str = object.as<String>()) {
const String *...t.as<String>()Description
TRUEevaluated 24804282 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
FALSEevaluated 57 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
57-24804282
595 if (idx >= (uint)str->toQString().length()) {
idx >= (uint)s...ing().length()Description
TRUEevaluated 38 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 25127630 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
38-25127630
596 return Encode::undefined();
executed 38 times by 2 tests: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
38
597 }-
598 const QString s = str->toQString().mid(idx, 1);-
599 return scope.engine->newString(s)->asReturnedValue();
executed 25086857 times by 3 tests: return scope.engine->newString(s)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
25086857
600 }-
601-
602 if (object.isNullOrUndefined()) {
object.isNullOrUndefined()Description
TRUEevaluated 54 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
4-54
603 QString message = QStringLiteral("Cannot read property '%1' of %2").arg(idx).arg(object.toQStringNoThrow());-
604 return engine->throwTypeError(message);
executed 53 times by 1 test: return engine->throwTypeError(message);
Executed by:
  • tst_ecmascripttests
53
605 }-
606-
607 o = RuntimeHelpers::convertToObject(scope.engine, object);-
608 Q_ASSERT(!!o); // can't fail as null/undefined is covered above-
609 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
4
610-
611 if (o->arrayData() && !o->arrayData()->attrs) {
o->arrayData()Description
TRUEevaluated 70912 times by 16 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
FALSEevaluated 24621 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
!o->arrayData()->attrsDescription
TRUEevaluated 70399 times by 16 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
FALSEevaluated 519 times by 1 test
Evaluated by:
  • tst_ecmascripttests
519-70912
612 ScopedValue v(scope, o->arrayData()->get(idx));-
613 if (!v->isEmpty())
!v->isEmpty()Description
TRUEevaluated 128 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 70267 times by 16 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
128-70267
614 return v->asReturnedValue();
executed 128 times by 1 test: return v->asReturnedValue();
Executed by:
  • tst_ecmascripttests
128
615 }
executed 70267 times by 16 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
70267
616-
617 return o->get(idx);
executed 95391 times by 19 tests: return o->get(idx);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
95391
618}-
619-
620static Q_NEVER_INLINE ReturnedValue getElementFallback(ExecutionEngine *engine, const Value &object, const Value &index)-
621{-
622 Q_ASSERT(!index.isPositiveInt());-
623-
624 Scope scope(engine);-
625-
626 ScopedObject o(scope, object);-
627 if (!o) {
!oDescription
TRUEevaluated 146 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
FALSEevaluated 56286 times by 14 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qtqmlmodules
  • tst_signalspy
  • tst_testfiltering
146-56286
628 if (object.isNullOrUndefined()) {
object.isNullOrUndefined()Description
TRUEevaluated 130 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
FALSEevaluated 17 times by 1 test
Evaluated by:
  • tst_ecmascripttests
17-130
629 QString message = QStringLiteral("Cannot read property '%1' of %2").arg(index.toQStringNoThrow()).arg(object.toQStringNoThrow());-
630 return engine->throwTypeError(message);
executed 130 times by 2 tests: return engine->throwTypeError(message);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
130
631 }-
632-
633 o = RuntimeHelpers::convertToObject(scope.engine, object);-
634 Q_ASSERT(!!o); // can't fail as null/undefined is covered above-
635 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
16
636-
637 ScopedPropertyKey name(scope, index.toPropertyKey(engine));-
638 if (scope.hasException())
scope.hasException()Description
TRUEevaluated 532 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 55842 times by 14 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qtqmlmodules
  • tst_signalspy
  • tst_testfiltering
532-55842
639 return Encode::undefined();
executed 532 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
532
640 return o->get(name);
executed 55810 times by 14 tests: return o->get(name);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qtqmlmodules
  • tst_signalspy
  • tst_testfiltering
55810
641}-
642-
643ReturnedValue Runtime::method_loadElement(ExecutionEngine *engine, const Value &object, const Value &index)-
644{-
645 if (index.isPositiveInt()) {
index.isPositiveInt()Description
TRUEevaluated 34286590 times by 22 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlprofilerservice
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
FALSEevaluated 56402 times by 14 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qtqmlmodules
  • tst_signalspy
  • tst_testfiltering
56402-34286590
646 uint idx = static_cast<uint>(index.int_32());-
647 if (Heap::Base *b = object.heapObject()) {
Heap::Base *b ...t.heapObject()Description
TRUEevaluated 34497689 times by 22 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlprofilerservice
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
FALSEevaluated 56 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
56-34497689
648 if (b->internalClass->vtable->isObject) {
b->internalCla...able->isObjectDescription
TRUEevaluated 9612362 times by 22 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlprofilerservice
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
FALSEevaluated 24955547 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
9612362-24955547
649 Heap::Object *o = static_cast<Heap::Object *>(b);-
650 if (o->arrayData && o->arrayData->type == Heap::ArrayData::Simple) {
o->arrayData->...ayData::SimpleDescription
TRUEevaluated 9557515 times by 15 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlprofilerservice
  • tst_qqmlxmlhttprequest
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 70115 times by 16 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
70115-9557515
651 Heap::SimpleArrayData *s = o->arrayData.cast<Heap::SimpleArrayData>();-
652 if (idx < s->values.size)
idx < s->values.sizeDescription
TRUEevaluated 9594647 times by 15 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlprofilerservice
  • tst_qqmlxmlhttprequest
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 436 times by 1 test
Evaluated by:
  • tst_ecmascripttests
436-9594647
653 if (!s->data(idx).isEmpty())
!s->data(idx).isEmpty()Description
TRUEevaluated 9438642 times by 15 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlprofilerservice
  • tst_qqmlxmlhttprequest
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 364 times by 1 test
Evaluated by:
  • tst_ecmascripttests
364-9438642
654 return s->data(idx).asReturnedValue();
executed 9423221 times by 15 tests: return s->data(idx).asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmlprofilerservice
  • tst_qqmlxmlhttprequest
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
9423221
655 }
executed 800 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
800
656 }
executed 95544 times by 19 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
95544
657 }
executed 25053953 times by 19 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
25053953
658 return getElementIntFallback(engine, object, idx);
executed 25071920 times by 19 tests: return getElementIntFallback(engine, object, idx);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
25071920
659 }-
660-
661 return getElementFallback(engine, object, index);
executed 56403 times by 14 tests: return getElementFallback(engine, object, index);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qtqmlmodules
  • tst_signalspy
  • tst_testfiltering
56403
662}-
663-
664static Q_NEVER_INLINE bool setElementFallback(ExecutionEngine *engine, const Value &object, const Value &index, const Value &value)-
665{-
666 Scope scope(engine);-
667 ScopedObject o(scope, object.toObject(engine));-
668 if (engine->hasException)
engine->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 72043 times by 11 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
0-72043
669 return false;
never executed: return false;
0
670-
671 if (index.isPositiveInt()) {
index.isPositiveInt()Description
TRUEevaluated 46447 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlxmlhttprequest
FALSEevaluated 25633 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
25633-46447
672 uint idx = static_cast<uint>(index.int_32());-
673 if (o->d()->arrayData && o->d()->arrayData->type == Heap::ArrayData::Simple) {
o->d()->arrayD...ayData::SimpleDescription
TRUEevaluated 25729 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
FALSEevaluated 553 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
553-25729
674 Heap::SimpleArrayData *s = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
675 if (idx < s->values.size) {
idx < s->values.sizeDescription
TRUEnever evaluated
FALSEevaluated 25726 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
0-25726
676 s->setData(engine, idx, value);-
677 return true;
never executed: return true;
0
678 }-
679 }
executed 25727 times by 4 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
25727
680 return o->put(idx, value);
executed 46450 times by 7 tests: return o->put(idx, value);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlxmlhttprequest
46450
681 }-
682-
683 ScopedPropertyKey name(scope, index.toPropertyKey(engine));-
684 if (engine->hasException)
engine->hasExceptionDescription
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 25571 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
60-25571
685 return false;
executed 60 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
60
686 return o->put(name, value);
executed 25590 times by 8 tests: return o->put(name, value);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
25590
687}-
688-
689void Runtime::method_storeElement(ExecutionEngine *engine, const Value &object, const Value &index, const Value &value)-
690{-
691 if (index.isPositiveInt()) {
index.isPositiveInt()Description
TRUEevaluated 49814 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlxmlhttprequest
  • tst_qquicklayouts
FALSEevaluated 25588 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
25588-49814
692 uint idx = static_cast<uint>(index.int_32());-
693 if (Heap::Base *b = object.heapObject()) {
Heap::Base *b ...t.heapObject()Description
TRUEevaluated 49822 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlxmlhttprequest
  • tst_qquicklayouts
FALSEnever evaluated
0-49822
694 if (b->internalClass->vtable->isObject) {
b->internalCla...able->isObjectDescription
TRUEevaluated 49823 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlxmlhttprequest
  • tst_qquicklayouts
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
4-49823
695 Heap::Object *o = static_cast<Heap::Object *>(b);-
696 if (o->arrayData && o->arrayData->type == Heap::ArrayData::Simple) {
o->arrayData->...ayData::SimpleDescription
TRUEevaluated 29104 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
FALSEevaluated 553 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
553-29104
697 Heap::SimpleArrayData *s = o->arrayData.cast<Heap::SimpleArrayData>();-
698 if (idx < s->values.size) {
idx < s->values.sizeDescription
TRUEevaluated 3372 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
FALSEevaluated 25728 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
3372-25728
699 s->setData(engine, idx, value);-
700 return;
executed 3370 times by 3 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
3370
701 }-
702 }
executed 25728 times by 4 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
25728
703 }
executed 46448 times by 7 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlxmlhttprequest
46448
704 }
executed 46454 times by 7 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlxmlhttprequest
46454
705 }
executed 46456 times by 7 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlxmlhttprequest
46456
706-
707 if (!setElementFallback(engine, object, index, value) && engine->currentStackFrame->v4Function->isStrict())
!setElementFal... index, value)Description
TRUEevaluated 5025 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
FALSEevaluated 67057 times by 11 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
engine->curren...on->isStrict()Description
TRUEevaluated 2478 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2564 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
2478-67057
708 engine->throwTypeError();
executed 2473 times by 1 test: engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
2473
709}
executed 72098 times by 11 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
72098
710-
711ReturnedValue Runtime::method_getIterator(ExecutionEngine *engine, const Value &in, int iterator)-
712{-
713 Scope scope(engine);-
714 ScopedObject o(scope, (Object *)nullptr);-
715 if (!in.isNullOrUndefined())
!in.isNullOrUndefined()Description
TRUEevaluated 23158 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
FALSEevaluated 460 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
460-23158
716 o = in.toObject(engine);
executed 23160 times by 12 tests: o = in.toObject(engine);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
23160
717 if (engine->hasException)
engine->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 23661 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
0-23661
718 return Encode::undefined();
never executed: return Encode::undefined();
0
719 if (iterator) {
iteratorDescription
TRUEevaluated 14565 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 9100 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
9100-14565
720 if (!o)
!oDescription
TRUEevaluated 416 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 14132 times by 1 test
Evaluated by:
  • tst_ecmascripttests
416-14132
721 return engine->throwTypeError();
executed 416 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
416
722 ScopedFunctionObject f(scope, o->get(engine->symbol_iterator()));-
723 if (!f)
!fDescription
TRUEevaluated 108 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 14094 times by 1 test
Evaluated by:
  • tst_ecmascripttests
108-14094
724 return engine->throwTypeError();
executed 108 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
108
725 JSCallData cData(scope, 0, nullptr, o);-
726 ScopedObject it(scope, f->call(cData));-
727 if (!it)
!itDescription
TRUEevaluated 256 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 13779 times by 1 test
Evaluated by:
  • tst_ecmascripttests
256-13779
728 return engine->throwTypeError();
executed 256 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
256
729 return it->asReturnedValue();
executed 13753 times by 1 test: return it->asReturnedValue();
Executed by:
  • tst_ecmascripttests
13753
730 }-
731 return engine->newForInIteratorObject(o)->asReturnedValue();
executed 9080 times by 12 tests: return engine->newForInIteratorObject(o)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
9080
732}-
733-
734ReturnedValue Runtime::method_iteratorNext(ExecutionEngine *engine, const Value &iterator, Value *value)-
735{-
736 Q_ASSERT(iterator.isObject());-
737-
738 Scope scope(engine);-
739 ScopedFunctionObject f(scope, static_cast<const Object &>(iterator).get(engine->id_next()));-
740 if (!f)
!fDescription
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 51374 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
36-51374
741 return engine->throwTypeError();
executed 36 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
36
742 JSCallData cData(scope, 0, nullptr, &iterator);-
743 ScopedObject o(scope, f->call(cData));-
744 if (!o)
!oDescription
TRUEevaluated 815 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 50443 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
815-50443
745 return engine->throwTypeError();
executed 815 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
815
746 ScopedValue d(scope, o->get(engine->id_done()));-
747 bool done = d->toBoolean();-
748 if (done) {
doneDescription
TRUEevaluated 16734 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
FALSEevaluated 33726 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
16734-33726
749 *value = Encode::undefined();-
750 } else {
executed 16732 times by 12 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
16732
751 *value = o->get(engine->id_value());-
752 }
executed 33811 times by 12 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
33811
753 return Encode(done);
executed 50519 times by 12 tests: return Encode(done);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
50519
754}-
755-
756ReturnedValue Runtime::method_iteratorClose(ExecutionEngine *engine, const Value &iterator, const Value &done)-
757{-
758 Q_ASSERT(iterator.isObject());-
759 Q_ASSERT(done.isBoolean());-
760 if (done.booleanValue())
done.booleanValue()Description
TRUEevaluated 3107 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3606 times by 1 test
Evaluated by:
  • tst_ecmascripttests
3107-3606
761 return Encode::undefined();
executed 3107 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
3107
762-
763 Scope scope(engine);-
764 bool hadException = engine->hasException;-
765 ScopedValue e(scope);-
766 if (hadException) {
hadExceptionDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3584 times by 1 test
Evaluated by:
  • tst_ecmascripttests
16-3584
767 e = *engine->exceptionValue;-
768 engine->hasException = false;-
769 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
16
770 ScopedFunctionObject f(scope, static_cast<const Object &>(iterator).get(engine->id_return()));-
771 ScopedObject o(scope);-
772 if (f) {
fDescription
TRUEevaluated 671 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2937 times by 1 test
Evaluated by:
  • tst_ecmascripttests
671-2937
773 JSCallData cData(scope, 0, nullptr, &iterator);-
774 o = f->call(cData);-
775 }
executed 672 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
672
776 if (hadException || !f) {
hadExceptionDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3591 times by 1 test
Evaluated by:
  • tst_ecmascripttests
!fDescription
TRUEevaluated 2933 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 660 times by 1 test
Evaluated by:
  • tst_ecmascripttests
16-3591
777 *engine->exceptionValue = e;-
778 engine->hasException = hadException;-
779 return Encode::undefined();
executed 2948 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
2948
780 }-
781 if (engine->hasException)
engine->hasExceptionDescription
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 620 times by 1 test
Evaluated by:
  • tst_ecmascripttests
40-620
782 return Encode::undefined();
executed 40 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
40
783-
784 if (!o)
!oDescription
TRUEevaluated 44 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 576 times by 1 test
Evaluated by:
  • tst_ecmascripttests
44-576
785 return engine->throwTypeError();
executed 44 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
44
786 return Encode::undefined();
executed 576 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
576
787}-
788-
789ReturnedValue Runtime::method_destructureRestElement(ExecutionEngine *engine, const Value &iterator)-
790{-
791 Q_ASSERT(iterator.isObject());-
792-
793 Scope scope(engine);-
794 ScopedArrayObject array(scope, engine->newArrayObject());-
795 array->arrayCreate();-
796 uint index = 0;-
797 while (1) {-
798 ScopedValue n(scope);-
799 ScopedValue done(scope, method_iteratorNext(engine, iterator, n));-
800 if (engine->hasException)
engine->hasExceptionDescription
TRUEevaluated 360 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 7580 times by 1 test
Evaluated by:
  • tst_ecmascripttests
360-7580
801 return Encode::undefined();
executed 360 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
360
802 Q_ASSERT(done->isBoolean());-
803 if (done->booleanValue())
done->booleanValue()Description
TRUEevaluated 2252 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5328 times by 1 test
Evaluated by:
  • tst_ecmascripttests
2252-5328
804 break;
executed 2252 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
2252
805 array->arraySet(index, n);-
806 ++index;-
807 }
executed 5324 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
5324
808 return array->asReturnedValue();
executed 2252 times by 1 test: return array->asReturnedValue();
Executed by:
  • tst_ecmascripttests
2252
809}-
810-
811void Runtime::method_storeNameSloppy(ExecutionEngine *engine, int nameIndex, const Value &value)-
812{-
813 Scope scope(engine);-
814 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);-
815 ExecutionContext::Error e = static_cast<ExecutionContext &>(engine->currentStackFrame->jsFrame->context).setProperty(name, value);-
816-
817 if (e == ExecutionContext::RangeError)
e == Execution...xt::RangeErrorDescription
TRUEevaluated 655 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
FALSEevaluated 37125187 times by 41 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • ...
655-37125187
818 engine->globalObject->put(name, value);
executed 655 times by 3 tests: engine->globalObject->put(name, value);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
655
819}
executed 37129448 times by 41 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • ...
37129448
820-
821void Runtime::method_storeNameStrict(ExecutionEngine *engine, int nameIndex, const Value &value)-
822{-
823 Scope scope(engine);-
824 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);-
825 ExecutionContext::Error e = static_cast<ExecutionContext &>(engine->currentStackFrame->jsFrame->context).setProperty(name, value);-
826 if (e == ExecutionContext::TypeError)
e == Execution...ext::TypeErrorDescription
TRUEevaluated 100 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 36249757 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qv4assembler
100-36249757
827 engine->throwTypeError();
executed 99 times by 1 test: engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
99
828 else if (e == ExecutionContext::RangeError)
e == Execution...xt::RangeErrorDescription
TRUEevaluated 132 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 36250661 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qv4assembler
132-36250661
829 engine->throwReferenceError(name);
executed 132 times by 1 test: engine->throwReferenceError(name);
Executed by:
  • tst_ecmascripttests
132
830}
executed 36253804 times by 4 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qv4assembler
36253804
831-
832ReturnedValue Runtime::method_loadProperty(ExecutionEngine *engine, const Value &object, int nameIndex)-
833{-
834 Scope scope(engine);-
835 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);-
836-
837 ScopedObject o(scope, object);-
838 if (o)
oDescription
TRUEevaluated 1174858 times by 97 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
FALSEevaluated 44920 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllocale
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickvisualdatamodel
  • tst_testfiltering
44920-1174858
839 return o->get(name);
executed 1174858 times by 97 tests: return o->get(name);
Executed by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
1174858
840-
841 if (object.isNullOrUndefined()) {
object.isNullOrUndefined()Description
TRUEevaluated 190 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmltypeloader
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickvisualdatamodel
FALSEevaluated 44730 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllocale
  • tst_qqmltranslation
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_testfiltering
190-44730
842 QString message = QStringLiteral("Cannot read property '%1' of %2").arg(name->toQString()).arg(object.toQStringNoThrow());-
843 return engine->throwTypeError(message);
executed 190 times by 14 tests: return engine->throwTypeError(message);
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmltypeloader
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickvisualdatamodel
190
844 }-
845-
846 o = RuntimeHelpers::convertToObject(scope.engine, object);-
847 if (!o) // type error
!oDescription
TRUEnever evaluated
FALSEevaluated 44730 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllocale
  • tst_qqmltranslation
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_testfiltering
0-44730
848 return Encode::undefined();
never executed: return Encode::undefined();
0
849 return o->get(name);
executed 44730 times by 11 tests: return o->get(name);
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllocale
  • tst_qqmltranslation
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_testfiltering
44730
850}-
851-
852ReturnedValue Runtime::method_loadName(ExecutionEngine *engine, int nameIndex)-
853{-
854 Scope scope(engine);-
855 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);-
856 return static_cast<ExecutionContext &>(engine->currentStackFrame->jsFrame->context).getProperty(name);
executed 5530077 times by 89 tests: return static_cast<ExecutionContext &>(engine->currentStackFrame->jsFrame->context).getProperty(name);
Executed by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
5530077
857}-
858-
859ReturnedValue Runtime::method_loadSuperProperty(ExecutionEngine *engine, const Value &property)-
860{-
861 Scope scope(engine);-
862 ScopedObject base(scope, engine->currentStackFrame->thisObject());-
863 if (!base)
!baseDescription
TRUEevaluated 44 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 243 times by 1 test
Evaluated by:
  • tst_ecmascripttests
44-243
864 return engine->throwTypeError();
executed 44 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
44
865 ScopedObject proto(scope, base->getPrototypeOf());-
866 if (!proto)
!protoDescription
TRUEnever evaluated
FALSEevaluated 243 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-243
867 return engine->throwTypeError();
never executed: return engine->throwTypeError();
0
868 ScopedPropertyKey key(scope, property.toPropertyKey(engine));-
869 if (engine->hasException)
engine->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 242 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-242
870 return Encode::undefined();
never executed: return Encode::undefined();
0
871 return proto->get(key, base);
executed 242 times by 1 test: return proto->get(key, base);
Executed by:
  • tst_ecmascripttests
242
872}-
873-
874void Runtime::method_storeSuperProperty(ExecutionEngine *engine, const Value &property, const Value &value)-
875{-
876 Scope scope(engine);-
877 ScopedObject base(scope, engine->currentStackFrame->thisObject());-
878 if (!base) {
!baseDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-40
879 engine->throwTypeError();-
880 return;
never executed: return;
0
881 }-
882 ScopedObject proto(scope, base->getPrototypeOf());-
883 if (!proto) {
!protoDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-40
884 engine->throwTypeError();-
885 return;
never executed: return;
0
886 }-
887 ScopedPropertyKey key(scope, property.toPropertyKey(engine));-
888 if (engine->hasException)
engine->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-40
889 return;
never executed: return;
0
890 bool result = proto->put(key, value, base);-
891 if (!result && engine->currentStackFrame->v4Function->isStrict())
!resultDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_ecmascripttests
engine->curren...on->isStrict()Description
TRUEnever evaluated
FALSEnever evaluated
0-40
892 engine->throwTypeError();
never executed: engine->throwTypeError();
0
893}
executed 40 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
40
894-
895#endif // V4_BOOTSTRAP-
896-
897uint RuntimeHelpers::equalHelper(const Value &x, const Value &y)-
898{-
899 Q_ASSERT(x.type() != y.type() || (x.isManaged() && (x.isString() != y.isString())));-
900-
901 if (x.isNumber() && y.isNumber())
x.isNumber()Description
TRUEnever evaluated
FALSEnever evaluated
y.isNumber()Description
TRUEnever evaluated
FALSEnever evaluated
0
902 return x.asDouble() == y.asDouble();
never executed: return x.asDouble() == y.asDouble();
0
903 if (x.isNull() && y.isUndefined()) {
x.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
y.isUndefined()Description
TRUEnever evaluated
FALSEnever evaluated
0
904 return true;
never executed: return true;
0
905 } else if (x.isUndefined() && y.isNull()) {
x.isUndefined()Description
TRUEnever evaluated
FALSEnever evaluated
y.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
906 return true;
never executed: return true;
0
907 } else if (x.isNumber() && y.isString()) {
x.isNumber()Description
TRUEnever evaluated
FALSEnever evaluated
y.isString()Description
TRUEnever evaluated
FALSEnever evaluated
0
908 double dy = RuntimeHelpers::toNumber(y);-
909 return x.asDouble() == dy;
never executed: return x.asDouble() == dy;
0
910 } else if (x.isString() && y.isNumber()) {
x.isString()Description
TRUEnever evaluated
FALSEnever evaluated
y.isNumber()Description
TRUEnever evaluated
FALSEnever evaluated
0
911 double dx = RuntimeHelpers::toNumber(x);-
912 return dx == y.asDouble();
never executed: return dx == y.asDouble();
0
913 } else if (x.isBoolean()) {
x.isBoolean()Description
TRUEnever evaluated
FALSEnever evaluated
0
914 return Runtime::method_compareEqual(Primitive::fromDouble((double) x.booleanValue()), y);
never executed: return Runtime::method_compareEqual(Primitive::fromDouble((double) x.booleanValue()), y);
0
915 } else if (y.isBoolean()) {
y.isBoolean()Description
TRUEnever evaluated
FALSEnever evaluated
0
916 return Runtime::method_compareEqual(x, Primitive::fromDouble((double) y.booleanValue()));
never executed: return Runtime::method_compareEqual(x, Primitive::fromDouble((double) y.booleanValue()));
0
917 } else {-
918#ifdef V4_BOOTSTRAP-
919 Q_UNIMPLEMENTED();-
920#else-
921 Object *xo = x.objectValue();-
922 Object *yo = y.objectValue();-
923 if (yo && (x.isNumber() || x.isString())) {
yoDescription
TRUEnever evaluated
FALSEnever evaluated
x.isNumber()Description
TRUEnever evaluated
FALSEnever evaluated
x.isString()Description
TRUEnever evaluated
FALSEnever evaluated
0
924 Scope scope(yo->engine());-
925 ScopedValue py(scope, RuntimeHelpers::objectDefaultValue(yo, PREFERREDTYPE_HINT));-
926 return Runtime::method_compareEqual(x, py);
never executed: return Runtime::method_compareEqual(x, py);
0
927 } else if (xo && (y.isNumber() || y.isString())) {
xoDescription
TRUEnever evaluated
FALSEnever evaluated
y.isNumber()Description
TRUEnever evaluated
FALSEnever evaluated
y.isString()Description
TRUEnever evaluated
FALSEnever evaluated
0
928 Scope scope(xo->engine());-
929 ScopedValue px(scope, RuntimeHelpers::objectDefaultValue(xo, PREFERREDTYPE_HINT));-
930 return Runtime::method_compareEqual(px, y);
never executed: return Runtime::method_compareEqual(px, y);
0
931 }-
932#endif-
933 }
never executed: end of block
0
934-
935 return false;
never executed: return false;
0
936}-
937-
938Bool RuntimeHelpers::strictEqual(const Value &x, const Value &y)-
939{-
940 TRACE2(x, y);-
941-
942 if (x.rawValue() == y.rawValue())
x.rawValue() == y.rawValue()Description
TRUEevaluated 16337 times by 10 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 31668862 times by 22 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmlxmlhttprequest
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qv4debugger
  • tst_signalspy
  • tst_testfiltering
16337-31668862
943 // NaN != NaN-
944 return !x.isNaN();
executed 16337 times by 10 tests: return !x.isNaN();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
16337
945-
946 if (x.isNumber())
x.isNumber()Description
TRUEevaluated 18551307 times by 15 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qv4debugger
FALSEevaluated 13114268 times by 17 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_signalspy
  • tst_testfiltering
13114268-18551307
947 return y.isNumber() && x.asDouble() == y.asDouble();
executed 18551304 times by 15 tests: return y.isNumber() && x.asDouble() == y.asDouble();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qv4debugger
18551304
948 if (x.isManaged())
x.isManaged()Description
TRUEevaluated 12838325 times by 15 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_signalspy
  • tst_testfiltering
FALSEevaluated 297603 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
297603-12838325
949 return y.isManaged() && x.cast<Managed>()->isEqualTo(y.cast<Managed>());
executed 12839433 times by 15 tests: return y.isManaged() && x.cast<Managed>()->isEqualTo(y.cast<Managed>());
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_signalspy
  • tst_testfiltering
12839433
950 return false;
executed 297615 times by 9 tests: return false;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
297615
951}-
952-
953QV4::Bool Runtime::method_compareGreaterThan(const Value &l, const Value &r)-
954{-
955 TRACE2(l, r);-
956 if (l.isInteger() && r.isInteger())
l.isInteger()Description
TRUEevaluated 105 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3684 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
  • tst_qquicktaphandler
r.isInteger()Description
TRUEevaluated 39 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 67 times by 1 test
Evaluated by:
  • tst_ecmascripttests
39-3684
957 return l.integerValue() > r.integerValue();
executed 38 times by 1 test: return l.integerValue() > r.integerValue();
Executed by:
  • tst_ecmascripttests
38
958 if (l.isNumber() && r.isNumber())
l.isNumber()Description
TRUEevaluated 2730 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
  • tst_qquicktaphandler
FALSEevaluated 1023 times by 1 test
Evaluated by:
  • tst_ecmascripttests
r.isNumber()Description
TRUEevaluated 2642 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
  • tst_qquicktaphandler
FALSEevaluated 87 times by 1 test
Evaluated by:
  • tst_ecmascripttests
87-2730
959 return l.asDouble() > r.asDouble();
executed 2642 times by 9 tests: return l.asDouble() > r.asDouble();
Executed by:
  • tst_ecmascripttests
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
  • tst_qquicktaphandler
2642
960 String *sl = l.stringValue();-
961 String *sr = r.stringValue();-
962 if (sl && sr) {
slDescription
TRUEevaluated 703 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 405 times by 1 test
Evaluated by:
  • tst_ecmascripttests
srDescription
TRUEevaluated 639 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
64-703
963#ifdef V4_BOOTSTRAP-
964 Q_UNIMPLEMENTED();-
965 return false;-
966#else-
967 return sr->compare(sl);
executed 639 times by 1 test: return sr->compare(sl);
Executed by:
  • tst_ecmascripttests
639
968#endif-
969 }-
970-
971 Object *ro = r.objectValue();-
972 Object *lo = l.objectValue();-
973 if (ro || lo) {
roDescription
TRUEevaluated 148 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 323 times by 1 test
Evaluated by:
  • tst_ecmascripttests
loDescription
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 247 times by 1 test
Evaluated by:
  • tst_ecmascripttests
76-323
974#ifdef V4_BOOTSTRAP-
975 Q_UNIMPLEMENTED();-
976#else-
977 QV4::ExecutionEngine *e = (lo ? lo : ro)->engine();
loDescription
TRUEevaluated 146 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 76 times by 1 test
Evaluated by:
  • tst_ecmascripttests
76-146
978 QV4::Scope scope(e);-
979 QV4::ScopedValue pl(scope, lo ? RuntimeHelpers::objectDefaultValue(lo, QV4::NUMBER_HINT) : l.asReturnedValue());-
980 QV4::ScopedValue pr(scope, ro ? RuntimeHelpers::objectDefaultValue(ro, QV4::NUMBER_HINT) : r.asReturnedValue());-
981 return Runtime::method_compareGreaterThan(pl, pr);
executed 223 times by 1 test: return Runtime::method_compareGreaterThan(pl, pr);
Executed by:
  • tst_ecmascripttests
223
982#endif-
983 }-
984-
985 double dl = RuntimeHelpers::toNumber(l);-
986 double dr = RuntimeHelpers::toNumber(r);-
987 return dl > dr;
executed 248 times by 1 test: return dl > dr;
Executed by:
  • tst_ecmascripttests
248
988}-
989-
990QV4::Bool Runtime::method_compareLessThan(const Value &l, const Value &r)-
991{-
992 TRACE2(l, r);-
993 if (l.isInteger() && r.isInteger())
l.isInteger()Description
TRUEevaluated 340 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlvaluetypeproviders
  • tst_qquicklayouts
  • tst_qquicklistview
FALSEevaluated 3229 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qquickbehaviors
  • tst_qquicklistview
r.isInteger()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 316 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlvaluetypeproviders
  • tst_qquicklayouts
  • tst_qquicklistview
24-3229
994 return l.integerValue() < r.integerValue();
executed 24 times by 1 test: return l.integerValue() < r.integerValue();
Executed by:
  • tst_ecmascripttests
24
995 if (l.isNumber() && r.isNumber())
l.isNumber()Description
TRUEevaluated 408 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlvaluetypeproviders
  • tst_qquickbehaviors
  • tst_qquicklayouts
  • tst_qquicklistview
FALSEevaluated 3139 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllocale
r.isNumber()Description
TRUEevaluated 320 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlvaluetypeproviders
  • tst_qquickbehaviors
  • tst_qquicklayouts
  • tst_qquicklistview
FALSEevaluated 88 times by 1 test
Evaluated by:
  • tst_ecmascripttests
88-3139
996 return l.asDouble() < r.asDouble();
executed 320 times by 6 tests: return l.asDouble() < r.asDouble();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlvaluetypeproviders
  • tst_qquickbehaviors
  • tst_qquicklayouts
  • tst_qquicklistview
320
997 String *sl = l.stringValue();-
998 String *sr = r.stringValue();-
999 if (sl && sr) {
slDescription
TRUEevaluated 2834 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllocale
FALSEevaluated 392 times by 1 test
Evaluated by:
  • tst_ecmascripttests
srDescription
TRUEevaluated 2617 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlecmascript
FALSEevaluated 216 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmllocale
216-2834
1000#ifdef V4_BOOTSTRAP-
1001 Q_UNIMPLEMENTED();-
1002 return false;-
1003#else-
1004 return sl->compare(sr);
executed 2617 times by 3 tests: return sl->compare(sr);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlecmascript
2617
1005#endif-
1006 }-
1007-
1008 Object *ro = r.objectValue();-
1009 Object *lo = l.objectValue();-
1010 if (ro || lo) {
roDescription
TRUEevaluated 135 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 472 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmllocale
loDescription
TRUEevaluated 80 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 392 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmllocale
80-472
1011#ifdef V4_BOOTSTRAP-
1012 Q_UNIMPLEMENTED();-
1013#else-
1014 QV4::ExecutionEngine *e = (lo ? lo : ro)->engine();
loDescription
TRUEevaluated 136 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 80 times by 1 test
Evaluated by:
  • tst_ecmascripttests
80-136
1015 QV4::Scope scope(e);-
1016 QV4::ScopedValue pl(scope, lo ? RuntimeHelpers::objectDefaultValue(lo, QV4::NUMBER_HINT) : l.asReturnedValue());-
1017 QV4::ScopedValue pr(scope, ro ? RuntimeHelpers::objectDefaultValue(ro, QV4::NUMBER_HINT) : r.asReturnedValue());-
1018 return Runtime::method_compareLessThan(pl, pr);
executed 216 times by 1 test: return Runtime::method_compareLessThan(pl, pr);
Executed by:
  • tst_ecmascripttests
216
1019#endif-
1020 }-
1021-
1022 double dl = RuntimeHelpers::toNumber(l);-
1023 double dr = RuntimeHelpers::toNumber(r);-
1024 return dl < dr;
executed 392 times by 2 tests: return dl < dr;
Executed by:
  • tst_ecmascripttests
  • tst_qqmllocale
392
1025}-
1026-
1027QV4::Bool Runtime::method_compareGreaterEqual(const Value &l, const Value &r)-
1028{-
1029 TRACE2(l, r);-
1030 if (l.isInteger() && r.isInteger())
l.isInteger()Description
TRUEevaluated 92 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 891 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qquicklayouts
  • tst_qquicktext
r.isInteger()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 68 times by 1 test
Evaluated by:
  • tst_ecmascripttests
24-891
1031 return l.integerValue() >= r.integerValue();
executed 24 times by 1 test: return l.integerValue() >= r.integerValue();
Executed by:
  • tst_ecmascripttests
24
1032 if (l.isNumber() && r.isNumber())
l.isNumber()Description
TRUEevaluated 426 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qquicklayouts
  • tst_qquicktext
FALSEevaluated 534 times by 1 test
Evaluated by:
  • tst_ecmascripttests
r.isNumber()Description
TRUEevaluated 338 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qquicklayouts
  • tst_qquicktext
FALSEevaluated 88 times by 1 test
Evaluated by:
  • tst_ecmascripttests
88-534
1033 return l.asDouble() >= r.asDouble();
executed 338 times by 4 tests: return l.asDouble() >= r.asDouble();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qquicklayouts
  • tst_qquicktext
338
1034 String *sl = l.stringValue();-
1035 String *sr = r.stringValue();-
1036 if (sl && sr) {
slDescription
TRUEevaluated 232 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 392 times by 1 test
Evaluated by:
  • tst_ecmascripttests
srDescription
TRUEevaluated 168 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
64-392
1037#ifdef V4_BOOTSTRAP-
1038 Q_UNIMPLEMENTED();-
1039 return false;-
1040#else-
1041 return !sl->compare(sr);
executed 168 times by 1 test: return !sl->compare(sr);
Executed by:
  • tst_ecmascripttests
168
1042#endif-
1043 }-
1044-
1045 Object *ro = r.objectValue();-
1046 Object *lo = l.objectValue();-
1047 if (ro || lo) {
roDescription
TRUEevaluated 132 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 324 times by 1 test
Evaluated by:
  • tst_ecmascripttests
loDescription
TRUEevaluated 75 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 246 times by 1 test
Evaluated by:
  • tst_ecmascripttests
75-324
1048#ifdef V4_BOOTSTRAP-
1049 Q_UNIMPLEMENTED();-
1050#else-
1051 QV4::ExecutionEngine *e = (lo ? lo : ro)->engine();
loDescription
TRUEevaluated 131 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 76 times by 1 test
Evaluated by:
  • tst_ecmascripttests
76-131
1052 QV4::Scope scope(e);-
1053 QV4::ScopedValue pl(scope, lo ? RuntimeHelpers::objectDefaultValue(lo, QV4::NUMBER_HINT) : l.asReturnedValue());-
1054 QV4::ScopedValue pr(scope, ro ? RuntimeHelpers::objectDefaultValue(ro, QV4::NUMBER_HINT) : r.asReturnedValue());-
1055 return Runtime::method_compareGreaterEqual(pl, pr);
executed 208 times by 1 test: return Runtime::method_compareGreaterEqual(pl, pr);
Executed by:
  • tst_ecmascripttests
208
1056#endif-
1057 }-
1058-
1059 double dl = RuntimeHelpers::toNumber(l);-
1060 double dr = RuntimeHelpers::toNumber(r);-
1061 return dl >= dr;
executed 247 times by 1 test: return dl >= dr;
Executed by:
  • tst_ecmascripttests
247
1062}-
1063-
1064QV4::Bool Runtime::method_compareLessEqual(const Value &l, const Value &r)-
1065{-
1066 TRACE2(l, r);-
1067 if (l.isInteger() && r.isInteger())
l.isInteger()Description
TRUEevaluated 112 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 7457 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
r.isInteger()Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 68 times by 1 test
Evaluated by:
  • tst_ecmascripttests
44-7457
1068 return l.integerValue() <= r.integerValue();
executed 44 times by 1 test: return l.integerValue() <= r.integerValue();
Executed by:
  • tst_ecmascripttests
44
1069 if (l.isNumber() && r.isNumber())
l.isNumber()Description
TRUEevaluated 290 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
FALSEevaluated 7234 times by 1 test
Evaluated by:
  • tst_ecmascripttests
r.isNumber()Description
TRUEevaluated 202 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
FALSEevaluated 88 times by 1 test
Evaluated by:
  • tst_ecmascripttests
88-7234
1070 return l.asDouble() <= r.asDouble();
executed 202 times by 6 tests: return l.asDouble() <= r.asDouble();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
202
1071 String *sl = l.stringValue();-
1072 String *sr = r.stringValue();-
1073 if (sl && sr) {
slDescription
TRUEevaluated 6913 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 410 times by 1 test
Evaluated by:
  • tst_ecmascripttests
srDescription
TRUEevaluated 6848 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
64-6913
1074#ifdef V4_BOOTSTRAP-
1075 Q_UNIMPLEMENTED();-
1076 return false;-
1077#else-
1078 return !sr->compare(sl);
executed 6847 times by 1 test: return !sr->compare(sl);
Executed by:
  • tst_ecmascripttests
6847
1079#endif-
1080 }-
1081-
1082 Object *ro = r.objectValue();-
1083 Object *lo = l.objectValue();-
1084 if (ro || lo) {
roDescription
TRUEevaluated 152 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 324 times by 1 test
Evaluated by:
  • tst_ecmascripttests
loDescription
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 247 times by 1 test
Evaluated by:
  • tst_ecmascripttests
76-324
1085#ifdef V4_BOOTSTRAP-
1086 Q_UNIMPLEMENTED();-
1087#else-
1088 QV4::ExecutionEngine *e = (lo ? lo : ro)->engine();
loDescription
TRUEevaluated 151 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 76 times by 1 test
Evaluated by:
  • tst_ecmascripttests
76-151
1089 QV4::Scope scope(e);-
1090 QV4::ScopedValue pl(scope, lo ? RuntimeHelpers::objectDefaultValue(lo, QV4::NUMBER_HINT) : l.asReturnedValue());-
1091 QV4::ScopedValue pr(scope, ro ? RuntimeHelpers::objectDefaultValue(ro, QV4::NUMBER_HINT) : r.asReturnedValue());-
1092 return Runtime::method_compareLessEqual(pl, pr);
executed 228 times by 1 test: return Runtime::method_compareLessEqual(pl, pr);
Executed by:
  • tst_ecmascripttests
228
1093#endif-
1094 }-
1095-
1096 double dl = RuntimeHelpers::toNumber(l);-
1097 double dr = RuntimeHelpers::toNumber(r);-
1098 return dl <= dr;
executed 245 times by 1 test: return dl <= dr;
Executed by:
  • tst_ecmascripttests
245
1099}-
1100-
1101#ifndef V4_BOOTSTRAP-
1102Bool Runtime::method_compareInstanceof(ExecutionEngine *engine, const Value &left, const Value &right)-
1103{-
1104 TRACE2(left, right);-
1105-
1106 Scope scope(engine);-
1107 ScopedValue v(scope, method_instanceof(engine, left, right));-
1108 return v->booleanValue();
never executed: return v->booleanValue();
0
1109}-
1110-
1111uint Runtime::method_compareIn(ExecutionEngine *engine, const Value &left, const Value &right)-
1112{-
1113 TRACE2(left, right);-
1114-
1115 Scope scope(engine);-
1116 ScopedValue v(scope, method_in(engine, left, right));-
1117 return v->booleanValue();
never executed: return v->booleanValue();
0
1118}-
1119-
1120-
1121ReturnedValue Runtime::method_callGlobalLookup(ExecutionEngine *engine, uint index, Value *argv, int argc)-
1122{-
1123 Lookup *l = engine->currentStackFrame->v4Function->compilationUnit->runtimeLookups + index;-
1124 Value function = Value::fromReturnedValue(l->globalGetter(l, engine));-
1125 if (!function.isFunctionObject())
!function.isFunctionObject()Description
TRUEevaluated 140 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 26886643 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qv4assembler
140-26886643
1126 return engine->throwTypeError();
executed 140 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
140
1127-
1128 Value thisObject = Primitive::undefinedValue();-
1129 return static_cast<FunctionObject &>(function).call(&thisObject, argv, argc);
executed 26901057 times by 2 tests: return static_cast<FunctionObject &>(function).call(&thisObject, argv, argc);
Executed by:
  • tst_ecmascripttests
  • tst_qv4assembler
26901057
1130}-
1131-
1132ReturnedValue Runtime::method_callPossiblyDirectEval(ExecutionEngine *engine, Value *argv, int argc)-
1133{-
1134 Scope scope(engine);-
1135 ScopedValue thisObject(scope);-
1136-
1137 ExecutionContext &ctx = static_cast<ExecutionContext &>(engine->currentStackFrame->jsFrame->context);-
1138 ScopedFunctionObject function(scope, ctx.getPropertyAndBase(engine->id_eval(), thisObject));-
1139 if (engine->hasException)
engine->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 1580728 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qquickworkerscript
0-1580728
1140 return Encode::undefined();
never executed: return Encode::undefined();
0
1141-
1142 if (!function) {
!functionDescription
TRUEnever evaluated
FALSEevaluated 1580745 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qquickworkerscript
0-1580745
1143 QString objectAsString = QStringLiteral("[null]");-
1144 if (!thisObject->isUndefined())
!thisObject->isUndefined()Description
TRUEnever evaluated
FALSEnever evaluated
0
1145 objectAsString = thisObject->toQStringNoThrow();
never executed: objectAsString = thisObject->toQStringNoThrow();
0
1146 QString msg = QStringLiteral("Property 'eval' of object %2 is not a function").arg(objectAsString);-
1147 return engine->throwTypeError(msg);
never executed: return engine->throwTypeError(msg);
0
1148 }-
1149-
1150 if (function->d() == engine->evalFunction()->d())
function->d() ...unction()->d()Description
TRUEevaluated 1579469 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qquickworkerscript
FALSEevaluated 1187 times by 1 test
Evaluated by:
  • tst_ecmascripttests
1187-1579469
1151 return static_cast<EvalFunction *>(function.getPointer())->evalCall(thisObject, argv, argc, true);
executed 1579460 times by 7 tests: return static_cast<EvalFunction *>(function.getPointer())->evalCall(thisObject, argv, argc, true);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qquickworkerscript
1579460
1152-
1153 return function->call(thisObject, argv, argc);
executed 1187 times by 1 test: return function->call(thisObject, argv, argc);
Executed by:
  • tst_ecmascripttests
1187
1154}-
1155-
1156ReturnedValue Runtime::method_callName(ExecutionEngine *engine, int nameIndex, Value *argv, int argc)-
1157{-
1158 Scope scope(engine);-
1159 ScopedValue thisObject(scope);-
1160 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);-
1161-
1162 ExecutionContext &ctx = static_cast<ExecutionContext &>(engine->currentStackFrame->jsFrame->context);-
1163 ScopedFunctionObject f(scope, ctx.getPropertyAndBase(name, thisObject));-
1164 if (engine->hasException)
engine->hasExceptionDescription
TRUEevaluated 20 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qquickworkerscript
FALSEevaluated 52483 times by 42 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltimer
  • tst_qqmltranslation
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • ...
20-52483
1165 return Encode::undefined();
executed 20 times by 6 tests: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qquickworkerscript
20
1166-
1167 if (!f) {
!fDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 52482 times by 42 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltimer
  • tst_qqmltranslation
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • ...
2-52482
1168 QString objectAsString = QStringLiteral("[null]");-
1169 if (!thisObject->isUndefined())
!thisObject->isUndefined()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEnever evaluated
0-2
1170 objectAsString = thisObject->toQStringNoThrow();
executed 2 times by 1 test: objectAsString = thisObject->toQStringNoThrow();
Executed by:
  • tst_qqmlecmascript
2
1171 QString msg = QStringLiteral("Property '%1' of object %2 is not a function")-
1172 .arg(engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]->toQString(),-
1173 objectAsString);-
1174 return engine->throwTypeError(msg);
executed 2 times by 1 test: return engine->throwTypeError(msg);
Executed by:
  • tst_qqmlecmascript
2
1175 }-
1176-
1177 return f->call(thisObject, argv, argc);
executed 52482 times by 42 tests: return f->call(thisObject, argv, argc);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltimer
  • tst_qqmltranslation
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • ...
52482
1178}-
1179-
1180ReturnedValue Runtime::method_callProperty(ExecutionEngine *engine, Value *base, int nameIndex, Value *argv, int argc)-
1181{-
1182 Scope scope(engine);-
1183 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);-
1184 ScopedObject lookupObject(scope, base);-
1185-
1186 if (!lookupObject) {
!lookupObjectDescription
TRUEevaluated 11332 times by 16 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEevaluated 472284 times by 78 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • ...
11332-472284
1187 Q_ASSERT(!base->isEmpty());-
1188 if (base->isNullOrUndefined()) {
base->isNullOrUndefined()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 11324 times by 16 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickdraghandler
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
8-11324
1189 QString message = QStringLiteral("Cannot call method '%1' of %2")-
1190 .arg(name->toQString(), base->toQStringNoThrow());-
1191 return engine->throwTypeError(message);
executed 8 times by 1 test: return engine->throwTypeError(message);
Executed by:
  • tst_qqmlecmascript
8
1192 }-
1193-
1194 if (base->isManaged()) {
base->isManaged()Description
TRUEevaluated 10948 times by 14 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEevaluated 376 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qquickdraghandler
376-10948
1195 Managed *m = static_cast<Managed *>(base);-
1196 lookupObject = m->internalClass()->prototype;-
1197 Q_ASSERT(m->internalClass()->prototype);-
1198 } else {
executed 10948 times by 14 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
10948
1199 lookupObject = RuntimeHelpers::convertToObject(engine, *base);-
1200 if (engine->hasException) // type error
engine->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 376 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qquickdraghandler
0-376
1201 return Encode::undefined();
never executed: return Encode::undefined();
0
1202 if (!engine->currentStackFrame->v4Function->isStrict())
!engine->curre...on->isStrict()Description
TRUEevaluated 376 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qquickdraghandler
FALSEnever evaluated
0-376
1203 base = lookupObject;
executed 376 times by 5 tests: base = lookupObject;
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qquickdraghandler
376
1204 }
executed 376 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qquickdraghandler
376
1205 }-
1206-
1207 ScopedFunctionObject f(scope, static_cast<Object *>(lookupObject)->get(name));-
1208-
1209 if (!f) {
!fDescription
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
FALSEevaluated 483594 times by 78 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • ...
14-483594
1210 QString error = QStringLiteral("Property '%1' of object %2 is not a function")-
1211 .arg(engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]->toQString(),-
1212 base->toQStringNoThrow());-
1213 return engine->throwTypeError(error);
executed 14 times by 2 tests: return engine->throwTypeError(error);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
14
1214 }-
1215-
1216 return f->call(base, argv, argc);
executed 483594 times by 78 tests: return f->call(base, argv, argc);
Executed by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • ...
483594
1217}-
1218-
1219ReturnedValue Runtime::method_callPropertyLookup(ExecutionEngine *engine, Value *base, uint index, Value *argv, int argc)-
1220{-
1221 Lookup *l = engine->currentStackFrame->v4Function->compilationUnit->runtimeLookups + index;-
1222 // ok to have the value on the stack here-
1223 Value f = Value::fromReturnedValue(l->getter(l, engine, *base));-
1224-
1225 if (!f.isFunctionObject())
!f.isFunctionObject()Description
TRUEnever evaluated
FALSEevaluated 48 times by 3 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickworkerscript
0-48
1226 return engine->throwTypeError();
never executed: return engine->throwTypeError();
0
1227-
1228 return static_cast<FunctionObject &>(f).call(base, argv, argc);
executed 48 times by 3 tests: return static_cast<FunctionObject &>(f).call(base, argv, argc);
Executed by:
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickworkerscript
48
1229}-
1230-
1231ReturnedValue Runtime::method_callElement(ExecutionEngine *engine, Value *base, const Value &index, Value *argv, int argc)-
1232{-
1233 Scope scope(engine);-
1234 ScopedValue thisObject(scope, base->toObject(engine));-
1235 base = thisObject;-
1236-
1237 ScopedPropertyKey str(scope, index.toPropertyKey(engine));-
1238 if (engine->hasException)
engine->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 1903 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
0-1903
1239 return Encode::undefined();
never executed: return Encode::undefined();
0
1240-
1241 ScopedFunctionObject f(scope, static_cast<Object *>(base)->get(str));-
1242 if (!f)
!fDescription
TRUEevaluated 328 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1575 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
328-1575
1243 return engine->throwTypeError();
executed 328 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
328
1244-
1245 return f->call(base, argv, argc);
executed 1575 times by 6 tests: return f->call(base, argv, argc);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1575
1246}-
1247-
1248ReturnedValue Runtime::method_callValue(ExecutionEngine *engine, const Value &func, Value *argv, int argc)-
1249{-
1250 if (!func.isFunctionObject())
!func.isFunctionObject()Description
TRUEnever evaluated
FALSEevaluated 472 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickworkerscript
0-472
1251 return engine->throwTypeError(QStringLiteral("%1 is not a function").arg(func.toQStringNoThrow()));
never executed: return engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "%1 is not a function")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "%1 is not a function" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()).arg(func.toQStringNoThrow()));
never executed: return qstring_literal_temp;
0
1252 return static_cast<const FunctionObject &>(func).call(nullptr, argv, argc);
executed 472 times by 5 tests: return static_cast<const FunctionObject &>(func).call(nullptr, argv, argc);
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickworkerscript
472
1253}-
1254-
1255ReturnedValue Runtime::method_callQmlScopeObjectProperty(ExecutionEngine *engine, Value *base,-
1256 int propertyIndex, Value *argv, int argc)-
1257{-
1258 Scope scope(engine);-
1259 ScopedFunctionObject fo(scope, method_loadQmlScopeObjectProperty(engine, *base, propertyIndex,-
1260 /*captureRequired*/true));-
1261 if (!fo) {
!foDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
2-14
1262 QString error = QStringLiteral("Property '%1' of scope object is not a function").arg(propertyIndex);-
1263 return engine->throwTypeError(error);
executed 2 times by 1 test: return engine->throwTypeError(error);
Executed by:
  • tst_qqmlecmascript
2
1264 }-
1265-
1266 QObject *qmlScopeObj = static_cast<QmlContext *>(base)->d()->qml()->scopeObject;-
1267 ScopedValue qmlScopeValue(scope, QObjectWrapper::wrap(engine, qmlScopeObj));-
1268 return fo->call(qmlScopeValue, argv, argc);
executed 14 times by 1 test: return fo->call(qmlScopeValue, argv, argc);
Executed by:
  • tst_qqmlecmascript
14
1269}-
1270-
1271ReturnedValue Runtime::method_callQmlContextObjectProperty(ExecutionEngine *engine, Value *base,-
1272 int propertyIndex, Value *argv, int argc)-
1273{-
1274 Scope scope(engine);-
1275 ScopedFunctionObject fo(scope, method_loadQmlContextObjectProperty(engine, *base, propertyIndex,-
1276 /*captureRequired*/true));-
1277 if (!fo) {
!foDescription
TRUEnever evaluated
FALSEnever evaluated
0
1278 QString error = QStringLiteral("Property '%1' of context object is not a function").arg(propertyIndex);-
1279 return engine->throwTypeError(error);
never executed: return engine->throwTypeError(error);
0
1280 }-
1281-
1282 QObject *qmlContextObj = static_cast<QmlContext *>(base)->d()->qml()->context->contextData()->contextObject;-
1283 ScopedValue qmlContextValue(scope, QObjectWrapper::wrap(engine, qmlContextObj));-
1284 return fo->call(qmlContextValue, argv, argc);
never executed: return fo->call(qmlContextValue, argv, argc);
0
1285}-
1286-
1287struct CallArgs {-
1288 Value *argv;-
1289 int argc;-
1290};-
1291-
1292static CallArgs createSpreadArguments(Scope &scope, Value *argv, int argc)-
1293{-
1294 ScopedValue it(scope);-
1295 ScopedValue done(scope);-
1296-
1297 int argCount = 0;-
1298-
1299 Value *v = scope.alloc<Scope::Uninitialized>();-
1300 Value *arguments = v;-
1301 for (int i = 0; i < argc; ++i) {
i < argcDescription
TRUEevaluated 457 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 116 times by 1 test
Evaluated by:
  • tst_ecmascripttests
116-457
1302 if (!argv[i].isEmpty()) {
!argv[i].isEmpty()Description
TRUEevaluated 199 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 258 times by 1 test
Evaluated by:
  • tst_ecmascripttests
199-258
1303 *v = argv[i];-
1304 ++argCount;-
1305 v = scope.alloc<Scope::Uninitialized>();-
1306 continue;
executed 199 times by 1 test: continue;
Executed by:
  • tst_ecmascripttests
199
1307 }-
1308 // spread element-
1309 ++i;-
1310 it = Runtime::method_getIterator(scope.engine, argv[i], /* ForInIterator */ 1);-
1311 if (scope.engine->hasException)
scope.engine->hasExceptionDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 188 times by 1 test
Evaluated by:
  • tst_ecmascripttests
72-188
1312 return { nullptr, 0 };
executed 72 times by 1 test: return { nullptr, 0 };
Executed by:
  • tst_ecmascripttests
72
1313 while (1) {-
1314 done = Runtime::method_iteratorNext(scope.engine, it, v);-
1315 if (scope.engine->hasException)
scope.engine->hasExceptionDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 316 times by 1 test
Evaluated by:
  • tst_ecmascripttests
72-316
1316 return { nullptr, 0 };
executed 72 times by 1 test: return { nullptr, 0 };
Executed by:
  • tst_ecmascripttests
72
1317 Q_ASSERT(done->isBoolean());-
1318 if (done->booleanValue())
done->booleanValue()Description
TRUEevaluated 116 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 200 times by 1 test
Evaluated by:
  • tst_ecmascripttests
116-200
1319 break;
executed 116 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
116
1320 ++argCount;-
1321 v = scope.alloc<Scope::Uninitialized>();-
1322 }
executed 200 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
200
1323 }
executed 116 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
116
1324 return { arguments, argCount };
executed 116 times by 1 test: return { arguments, argCount };
Executed by:
  • tst_ecmascripttests
116
1325}-
1326-
1327ReturnedValue Runtime::method_callWithSpread(ExecutionEngine *engine, const Value &function, const Value &thisObject, Value *argv, int argc)-
1328{-
1329 Q_ASSERT(argc >= 1);-
1330 if (!function.isFunctionObject())
!function.isFunctionObject()Description
TRUEnever evaluated
FALSEevaluated 100 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-100
1331 return engine->throwTypeError();
never executed: return engine->throwTypeError();
0
1332-
1333 Scope scope(engine);-
1334 CallArgs arguments = createSpreadArguments(scope, argv, argc);-
1335 if (engine->hasException)
engine->hasExceptionDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
48-52
1336 return Encode::undefined();
executed 48 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
48
1337-
1338 return static_cast<const FunctionObject &>(function).call(&thisObject, arguments.argv, arguments.argc);
executed 52 times by 1 test: return static_cast<const FunctionObject &>(function).call(&thisObject, arguments.argv, arguments.argc);
Executed by:
  • tst_ecmascripttests
52
1339}-
1340-
1341ReturnedValue Runtime::method_construct(ExecutionEngine *engine, const Value &function, const Value &newTarget, Value *argv, int argc)-
1342{-
1343 if (!function.isFunctionObject())
!function.isFunctionObject()Description
TRUEevaluated 206 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 113560 times by 18 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
206-113560
1344 return engine->throwTypeError();
executed 206 times by 1 test: return engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
206
1345-
1346 return static_cast<const FunctionObject &>(function).callAsConstructor(argv, argc, &newTarget);
executed 113556 times by 18 tests: return static_cast<const FunctionObject &>(function).callAsConstructor(argv, argc, &newTarget);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
113556
1347}-
1348-
1349ReturnedValue Runtime::method_constructWithSpread(ExecutionEngine *engine, const Value &function, const Value &newTarget, Value *argv, int argc)-
1350{-
1351 Q_UNIMPLEMENTED();-
1352 if (!function.isFunctionObject())
!function.isFunctionObject()Description
TRUEnever evaluated
FALSEevaluated 160 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-160
1353 return engine->throwTypeError();
never executed: return engine->throwTypeError();
0
1354-
1355 Scope scope(engine);-
1356 CallArgs arguments = createSpreadArguments(scope, argv, argc);-
1357 if (engine->hasException)
engine->hasExceptionDescription
TRUEevaluated 96 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
64-96
1358 return Encode::undefined();
executed 96 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
96
1359-
1360 return static_cast<const FunctionObject &>(function).callAsConstructor(arguments.argv, arguments.argc, &newTarget);
executed 64 times by 1 test: return static_cast<const FunctionObject &>(function).callAsConstructor(arguments.argv, arguments.argc, &newTarget);
Executed by:
  • tst_ecmascripttests
64
1361}-
1362-
1363void Runtime::method_throwException(ExecutionEngine *engine, const Value &value)-
1364{-
1365 if (!value.isEmpty())
!value.isEmpty()Description
TRUEevaluated 17309 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
FALSEnever evaluated
0-17309
1366 engine->throwError(value);
executed 17309 times by 9 tests: engine->throwError(value);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
17309
1367}
executed 17301 times by 9 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
17301
1368-
1369ReturnedValue Runtime::method_typeofValue(ExecutionEngine *engine, const Value &value)-
1370{-
1371 Scope scope(engine);-
1372 ScopedString res(scope);-
1373 switch (value.type()) {-
1374 case Value::Undefined_Type:
executed 2122 times by 4 tests: case Value::Undefined_Type:
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qv4debugger
2122
1375 res = engine->id_undefined();-
1376 break;
executed 2125 times by 4 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qv4debugger
2125
1377 case Value::Null_Type:
executed 30 times by 5 tests: case Value::Null_Type:
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qv4debugger
30
1378 res = engine->id_object();-
1379 break;
executed 30 times by 5 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qv4debugger
30
1380 case Value::Boolean_Type:
executed 148 times by 4 tests: case Value::Boolean_Type:
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_signalspy
148
1381 res = engine->id_boolean();-
1382 break;
executed 148 times by 4 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_signalspy
148
1383 case Value::Managed_Type:
executed 83799 times by 10 tests: case Value::Managed_Type:
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
  • tst_scenegraph
  • tst_signalspy
83799
1384 if (value.isString())
value.isString()Description
TRUEevaluated 6923 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
FALSEevaluated 76792 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
  • tst_scenegraph
  • tst_signalspy
6923-76792
1385 res = engine->id_string();
executed 6918 times by 8 tests: res = engine->id_string();
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
6918
1386 else if (value.isSymbol())
value.isSymbol()Description
TRUEevaluated 212 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 76608 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
  • tst_scenegraph
  • tst_signalspy
212-76608
1387 res = engine->id_symbol();
executed 212 times by 1 test: res = engine->id_symbol();
Executed by:
  • tst_ecmascripttests
212
1388 else if (value.objectValue()->as<FunctionObject>())
value.objectVa...ctionObject>()Description
TRUEevaluated 37190 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_qv4debugger
  • tst_signalspy
FALSEevaluated 39445 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
  • tst_scenegraph
37190-39445
1389 res = engine->id_function();
executed 37162 times by 5 tests: res = engine->id_function();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_qv4debugger
  • tst_signalspy
37162
1390 else-
1391 res = engine->id_object(); // ### implementation-defined
executed 39432 times by 7 tests: res = engine->id_object();
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
  • tst_scenegraph
39432
1392 break;
executed 83723 times by 10 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
  • tst_scenegraph
  • tst_signalspy
83723
1393 default:
executed 1432 times by 7 tests: default:
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
1432
1394 res = engine->id_number();-
1395 break;
executed 1432 times by 7 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
1432
1396 }-
1397 return res.asReturnedValue();
executed 87355 times by 10 tests: return res.asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qv4debugger
  • tst_scenegraph
  • tst_signalspy
87355
1398}-
1399-
1400QV4::ReturnedValue Runtime::method_typeofName(ExecutionEngine *engine, int nameIndex)-
1401{-
1402 Scope scope(engine);-
1403 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);-
1404 ScopedValue prop(scope, static_cast<ExecutionContext &>(engine->currentStackFrame->jsFrame->context).getProperty(name));-
1405 // typeof doesn't throw. clear any possible exception-
1406 scope.engine->hasException = false;-
1407 return method_typeofValue(engine, prop);
executed 2895 times by 4 tests: return method_typeofValue(engine, prop);
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_scenegraph
2895
1408}-
1409-
1410ReturnedValue Runtime::method_createWithContext(ExecutionEngine *engine, Value *jsStackFrame)-
1411{-
1412 QV4::Value &accumulator = jsStackFrame[CallData::Accumulator];-
1413 accumulator = accumulator.toObject(engine);-
1414 if (engine->hasException)
engine->hasExceptionDescription
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 657 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qv4debugger
7-657
1415 return Encode::undefined();
executed 7 times by 2 tests: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
7
1416 Q_ASSERT(accumulator.isObject());-
1417 const Object &obj = static_cast<const Object &>(accumulator);-
1418 ExecutionContext *context = static_cast<ExecutionContext *>(jsStackFrame + CallData::Context);-
1419 return context->newWithContext(obj.d())->asReturnedValue();
executed 659 times by 4 tests: return context->newWithContext(obj.d())->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qv4debugger
659
1420}-
1421-
1422ReturnedValue Runtime::method_createCatchContext(ExecutionContext *parent, int blockIndex, int exceptionVarNameIndex)-
1423{-
1424 ExecutionEngine *e = parent->engine();-
1425 return parent->newCatchContext(e->currentStackFrame, blockIndex,
executed 4320786 times by 13 tests: return parent->newCatchContext(e->currentStackFrame, blockIndex, e->currentStackFrame->v4Function->compilationUnit->runtimeStrings[exceptionVarNameIndex])->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_qv4debugger
4320786
1426 e->currentStackFrame->v4Function->compilationUnit->runtimeStrings[exceptionVarNameIndex])->asReturnedValue();
executed 4320786 times by 13 tests: return parent->newCatchContext(e->currentStackFrame, blockIndex, e->currentStackFrame->v4Function->compilationUnit->runtimeStrings[exceptionVarNameIndex])->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_qv4debugger
4320786
1427}-
1428-
1429ReturnedValue Runtime::method_createBlockContext(ExecutionContext *parent, int index)-
1430{-
1431 ExecutionEngine *e = parent->engine();-
1432 return parent->newBlockContext(e->currentStackFrame, index)->asReturnedValue();
executed 562 times by 2 tests: return parent->newBlockContext(e->currentStackFrame, index)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qv4debugger
562
1433}-
1434-
1435ReturnedValue Runtime::method_cloneBlockContext(ExecutionContext *previous)-
1436{-
1437 return ExecutionContext::cloneBlockContext(static_cast<Heap::CallContext *>(previous->d()))->asReturnedValue();
executed 194 times by 2 tests: return ExecutionContext::cloneBlockContext(static_cast<Heap::CallContext *>(previous->d()))->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qv4debugger
194
1438}-
1439-
1440-
1441ReturnedValue Runtime::method_createScriptContext(ExecutionEngine *engine, int index)-
1442{-
1443 Q_ASSERT(engine->currentStackFrame->context()->d()->type == Heap::ExecutionContext::Type_GlobalContext ||