OpenCoverage

qv4objectiterator.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4objectiterator.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#include "qv4objectiterator_p.h"-
40#include "qv4object_p.h"-
41#include "qv4stringobject_p.h"-
42#include "qv4identifier_p.h"-
43#include "qv4argumentsobject_p.h"-
44#include "qv4string_p.h"-
45#include "qv4iterator_p.h"-
46-
47using namespace QV4;-
48-
49void ForInIteratorPrototype::init(ExecutionEngine *)-
50{-
51 defineDefaultProperty(QStringLiteral("next"), method_next, 0);
executed 98485 times by 153 tests: return qstring_literal_temp;
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
  • ...
98485
52}
executed 99106 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
  • ...
99106
53-
54ReturnedValue ForInIteratorPrototype::method_next(const FunctionObject *b, const Value *thisObject, const Value *, int)-
55{-
56 const ForInIteratorObject *forIn = thisObject->as<ForInIteratorObject>();-
57 Q_ASSERT(forIn);-
58 Scope scope(b->engine());-
59 ScopedValue n(scope, forIn->nextPropertyName());-
60 bool done = false;-
61 if (n->asReturnedValue() == Encode::null()) {
n->asReturnedV...Encode::null()Description
TRUEevaluated 8053 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 16685 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
8053-16685
62 done = true;-
63 n = Primitive::undefinedValue();-
64 }
executed 8053 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
8053
65 return IteratorPrototype::createIterResultObject(scope.engine, n, done);
executed 24733 times by 12 tests: return IteratorPrototype::createIterResultObject(scope.engine, n, 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
24733
66}-
67-
68void ObjectIterator::init(const Object *o)-
69{-
70 object->setM(o ? o->m() : nullptr);-
71 current->setM(o ? o->m() : nullptr);-
72-
73 if (object->as<ArgumentsObject>()) {
object->as<ArgumentsObject>()Description
TRUEevaluated 288 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 29423 times by 36 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
288-29423
74 Scope scope(engine);-
75 Scoped<ArgumentsObject> (scope, object->asReturnedValue())->fullyCreate();-
76 }
executed 288 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
288
77}
executed 29709 times by 36 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
29709
78-
79void ObjectIterator::next(Value *name, uint *index, Property *pd, PropertyAttributes *attrs)-
80{-
81 name->setM(nullptr);-
82 *index = UINT_MAX;-
83-
84 if (!object->as<Object>()) {
!object->as<Object>()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qjsengine
FALSEevaluated 90525 times by 36 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
2-90525
85 *attrs = PropertyAttributes();-
86 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qjsengine
2
87 }-
88 Scope scope(engine);-
89 ScopedObject o(scope);-
90 ScopedString n(scope);-
91-
92 while (1) {-
93 Object *co = current->objectValue();-
94 if (!co)
!coDescription
TRUEevaluated 27970 times by 36 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
FALSEevaluated 107595 times by 36 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
27970-107595
95 break;
executed 27970 times by 36 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
27970
96-
97 while (1) {-
98 co->advanceIterator(this, name, index, pd, attrs);-
99 if (attrs->isEmpty())
attrs->isEmpty()Description
TRUEevaluated 45117 times by 36 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
FALSEevaluated 62635 times by 35 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickparticlegroup
  • ...
45117-62635
100 break;
executed 45100 times by 36 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
45100
101 // check the property is not already defined earlier in the proto chain-
102 if (co->heapObject() != object->heapObject()) {
co->heapObject...->heapObject()Description
TRUEevaluated 102 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 62493 times by 35 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickparticlegroup
  • ...
102-62493
103 o = object->as<Object>();-
104 n = *name;-
105 bool shadowed = false;-
106 while (o->d() != current->heapObject()) {
o->d() != curr...->heapObject()Description
TRUEevaluated 118 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 80 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
80-118
107 PropertyKey id = n ? (n->toPropertyKey()) : PropertyKey::fromArrayIndex(*index);
nDescription
TRUEevaluated 108 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
10-108
108 if (id.isValid() && o->getOwnProperty(id) != Attr_Invalid) {
id.isValid()Description
TRUEevaluated 118 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEnever evaluated
o->getOwnPrope...= Attr_InvalidDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 96 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
0-118
109 shadowed = true;-
110 break;
executed 22 times by 2 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
22
111 }-
112 o = o->getPrototypeOf();-
113 }
executed 96 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
96
114 if (shadowed)
shadowedDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 80 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
22-80
115 continue;
executed 22 times by 2 tests: continue;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
22
116 }
executed 80 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
80
117 return;
executed 62570 times by 35 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickparticlegroup
  • ...
62570
118 }-
119-
120 if (flags & WithProtoChain)
flags & WithProtoChainDescription
TRUEevaluated 28479 times by 24 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
FALSEevaluated 16619 times by 25 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickparticlegroup
  • tst_qquickpositioners
  • tst_qquickspritesequence
  • tst_qquickworkerscript
  • tst_qv4debugger
16619-28479
121 current->setM(co->getPrototypeOf());
executed 28477 times by 24 tests: current->setM(co->getPrototypeOf());
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
28477
122 else-
123 current->setM(nullptr);
executed 16619 times by 25 tests: current->setM(nullptr);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickparticlegroup
  • tst_qquickpositioners
  • tst_qquickspritesequence
  • tst_qquickworkerscript
  • tst_qv4debugger
16619
124-
125 arrayIndex = 0;-
126 memberIndex = 0;-
127 }
executed 45118 times by 36 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
45118
128 *attrs = PropertyAttributes();-
129}
executed 27968 times by 36 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
27968
130-
131ReturnedValue ObjectIterator::nextPropertyName(Value *value)-
132{-
133 Object *o = object->objectValue();-
134 if (!o)
!oDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlsqldatabase
0-6
135 return Encode::null();
never executed: return Encode::null();
0
136-
137 PropertyAttributes attrs;-
138 uint index;-
139 Scope scope(engine);-
140 ScopedProperty p(scope);-
141 ScopedString name(scope);-
142 next(name.getRef(), &index, p, &attrs);-
143 if (attrs.isEmpty())
attrs.isEmpty()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlsqldatabase
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlsqldatabase
2-4
144 return Encode::null();
executed 2 times by 1 test: return Encode::null();
Executed by:
  • tst_qqmlsqldatabase
2
145-
146 *value = o->getValue(p->value, attrs);-
147-
148 if (!!name)
!!nameDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlsqldatabase
FALSEnever evaluated
0-4
149 return name->asReturnedValue();
executed 4 times by 1 test: return name->asReturnedValue();
Executed by:
  • tst_qqmlsqldatabase
4
150 Q_ASSERT(index < UINT_MAX);-
151 return Encode(index);
never executed: return Encode(index);
0
152}-
153-
154ReturnedValue ObjectIterator::nextPropertyNameAsString(Value *value)-
155{-
156 Object *o = object->objectValue();-
157 if (!o)
!oDescription
TRUEnever evaluated
FALSEevaluated 50217 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickparticlegroup
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspritesequence
  • tst_qquickvisualdatamodel
  • ...
0-50217
158 return Encode::null();
never executed: return Encode::null();
0
159-
160 PropertyAttributes attrs;-
161 uint index;-
162 Scope scope(engine);-
163 ScopedProperty p(scope);-
164 ScopedString name(scope);-
165 next(name.getRef(), &index, p, &attrs);-
166 if (attrs.isEmpty())
attrs.isEmpty()Description
TRUEevaluated 14025 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickparticlegroup
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspritesequence
  • tst_qquickvisualdatamodel
  • ...
FALSEevaluated 36215 times by 25 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickparticlegroup
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspritesequence
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_qv4debugger
14025-36215
167 return Encode::null();
executed 14025 times by 27 tests: return Encode::null();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickparticlegroup
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspritesequence
  • tst_qquickvisualdatamodel
  • ...
14025
168-
169 *value = o->getValue(p->value, attrs);-
170-
171 if (!!name)
!!nameDescription
TRUEevaluated 36203 times by 25 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickparticlegroup
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspritesequence
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_qv4debugger
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
18-36203
172 return name->asReturnedValue();
executed 36202 times by 25 tests: return name->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickparticlegroup
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspritesequence
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_qv4debugger
36202
173 Q_ASSERT(index < UINT_MAX);-
174 return Encode(engine->newString(QString::number(index)));
executed 18 times by 2 tests: return Encode(engine->newString(QString::number(index)));
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
18
175}-
176-
177ReturnedValue ObjectIterator::nextPropertyNameAsString()-
178{-
179 if (!object->as<Object>())
!object->as<Object>()Description
TRUEevaluated 44 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 32639 times by 15 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
44-32639
180 return Encode::null();
executed 44 times by 2 tests: return Encode::null();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
44
181-
182 PropertyAttributes attrs;-
183 uint index;-
184 Scope scope(engine);-
185 ScopedProperty p(scope);-
186 ScopedString name(scope);-
187 next(name.getRef(), &index, p, &attrs);-
188 if (attrs.isEmpty())
attrs.isEmpty()Description
TRUEevaluated 10615 times by 15 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
FALSEevaluated 22082 times by 15 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
10615-22082
189 return Encode::null();
executed 10615 times by 15 tests: return Encode::null();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
10615
190-
191 if (!!name)
!!nameDescription
TRUEevaluated 16548 times by 13 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 5508 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_qv4debugger
  • tst_testfiltering
5508-16548
192 return name->asReturnedValue();
executed 16541 times by 13 tests: return name->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_testfiltering
16541
193 Q_ASSERT(index < UINT_MAX);-
194 return Encode(engine->newString(QString::number(index)));
executed 5520 times by 9 tests: return Encode(engine->newString(QString::number(index)));
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_qv4debugger
  • tst_testfiltering
5520
195}-
196-
197-
198DEFINE_OBJECT_VTABLE(ForInIteratorObject);-
199-
200void Heap::ForInIteratorObject::markObjects(Heap::Base *that, MarkStack *markStack)-
201{-
202 ForInIteratorObject *o = static_cast<ForInIteratorObject *>(that);-
203 o->workArea[0].mark(markStack);-
204 o->workArea[1].mark(markStack);-
205 Object::markObjects(that, markStack);-
206}
executed 38 times by 2 tests: end of block
Executed by:
  • tst_qqmlqt
  • tst_qquicklayouts
38
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0