OpenCoverage

qv4persistent_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4persistent_p.h
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#ifndef QV4PERSISTENT_H-
40#define QV4PERSISTENT_H-
41-
42//-
43// W A R N I N G-
44// --------------
45//-
46// This file is not part of the Qt API. It exists purely as an-
47// implementation detail. This header file may change from version to-
48// version without notice, or even be removed.-
49//-
50// We mean it.-
51//-
52-
53#include "qv4value_p.h"-
54#include "qv4managed_p.h"-
55-
56QT_BEGIN_NAMESPACE-
57-
58namespace QV4 {-
59-
60struct Q_QML_EXPORT PersistentValueStorage-
61{-
62 PersistentValueStorage(ExecutionEngine *engine);-
63 ~PersistentValueStorage();-
64-
65 Value *allocate();-
66 static void free(Value *e);-
67-
68 void mark(MarkStack *markStack);-
69-
70 struct Iterator {-
71 Iterator(void *p, int idx);-
72 Iterator(const Iterator &o);-
73 Iterator & operator=(const Iterator &o);-
74 ~Iterator();-
75 void *p;-
76 int index;-
77 Iterator &operator++();-
78 bool operator !=(const Iterator &other) {-
79 return p != other.p || index != other.index;
executed 118051618 times by 154 tests: return p != other.p || index != other.index;
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
  • ...
118051618
80 }-
81 Value &operator *();-
82 };-
83 Iterator begin() { return Iterator(firstPage, 0); }
executed 223946 times by 154 tests: return Iterator(firstPage, 0);
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
  • ...
223946
84 Iterator end() { return Iterator(nullptr, 0); }
executed 117999173 times by 154 tests: return Iterator(nullptr, 0);
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
  • ...
117999173
85-
86 static ExecutionEngine *getEngine(Value *v);-
87-
88 ExecutionEngine *engine;-
89 void *firstPage;-
90private:-
91 static void freePage(void *page);-
92};-
93-
94class Q_QML_EXPORT PersistentValue-
95{-
96public:-
97 PersistentValue() {}-
98 PersistentValue(const PersistentValue &other);-
99 PersistentValue &operator=(const PersistentValue &other);-
100 PersistentValue &operator=(const WeakValue &other);-
101 PersistentValue &operator=(Object *object);-
102 ~PersistentValue();-
103-
104 PersistentValue(ExecutionEngine *engine, const Value &value);-
105 PersistentValue(ExecutionEngine *engine, ReturnedValue value);-
106 PersistentValue(ExecutionEngine *engine, Object *object);-
107-
108 void set(ExecutionEngine *engine, const Value &value);-
109 void set(ExecutionEngine *engine, ReturnedValue value);-
110 void set(ExecutionEngine *engine, Heap::Base *obj);-
111-
112 ReturnedValue value() const {-
113 return (val ? val->asReturnedValue() : Encode::undefined());
executed 1177898 times by 131 tests: return (val ? val->asReturnedValue() : Encode::undefined());
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • 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_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
1177898
114 }-
115 Value *valueRef() const {-
116 return val;
executed 5139314 times by 129 tests: return val;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • 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_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • ...
5139314
117 }-
118 Managed *asManaged() const {-
119 if (!val)
!valDescription
TRUEnever evaluated
FALSEnever evaluated
0
120 return nullptr;
never executed: return nullptr;
0
121 return val->managed();
never executed: return val->managed();
0
122 }-
123 template<typename T>-
124 T *as() const {-
125 if (!val)
!valDescription
TRUEevaluated 76 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmlqt
FALSEevaluated 275573 times by 69 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • ...
76-275573
126 return nullptr;
executed 76 times by 2 tests: return nullptr;
Executed by:
  • tst_examples
  • tst_qqmlqt
76
127 return val->as<T>();
executed 275573 times by 69 tests: return val->as<T>();
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • ...
275573
128 }-
129-
130 ExecutionEngine *engine() const {-
131 if (!val)
!valDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qjsvalueiterator
FALSEevaluated 3944 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickworkerscript
6-3944
132 return nullptr;
executed 6 times by 1 test: return nullptr;
Executed by:
  • tst_qjsvalueiterator
6
133 return PersistentValueStorage::getEngine(val);
executed 3944 times by 12 tests: return PersistentValueStorage::getEngine(val);
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickworkerscript
3944
134 }-
135-
136 bool isUndefined() const { return !val || val->isUndefined(); }
executed 153437 times by 39 tests: return !val || val->isUndefined();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • ...
153437
137 bool isNullOrUndefined() const { return !val || val->isNullOrUndefined(); }
executed 398 times by 13 tests: return !val || val->isNullOrUndefined();
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
398
138 void clear() {-
139 PersistentValueStorage::free(val);-
140 val = nullptr;-
141 }
executed 385434 times by 150 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • 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
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
385434
142 bool isEmpty() { return !val; }
never executed: return !val;
0
143-
144private:-
145 Value *val = nullptr;-
146};-
147-
148class Q_QML_EXPORT WeakValue-
149{-
150public:-
151 WeakValue() {}-
152 WeakValue(const WeakValue &other);-
153 WeakValue(ExecutionEngine *engine, const Value &value);-
154 WeakValue &operator=(const WeakValue &other);-
155 ~WeakValue();-
156-
157 void set(ExecutionEngine *engine, const Value &value)-
158 {-
159 if (!val)
!valDescription
TRUEevaluated 1688113 times by 154 tests
Evaluated 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
  • ...
FALSEnever evaluated
0-1688113
160 allocVal(engine);
executed 1688114 times by 154 tests: allocVal(engine);
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
  • ...
1688114
161 *val = value;-
162 }
executed 1688145 times by 154 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
  • ...
1688145
163-
164 void set(ExecutionEngine *engine, ReturnedValue value)-
165 {-
166 if (!val)
!valDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEnever evaluated
0-6
167 allocVal(engine);
executed 6 times by 1 test: allocVal(engine);
Executed by:
  • tst_qqmlecmascript
6
168 *val = value;-
169 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qqmlecmascript
6
170-
171 void set(ExecutionEngine *engine, Heap::Base *obj)-
172 {-
173 if (!val)
!valDescription
TRUEevaluated 66349 times by 99 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
2-66349
174 allocVal(engine);
executed 66349 times by 99 tests: allocVal(engine);
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
66349
175 *val = obj;-
176 }
executed 66351 times by 99 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
66351
177-
178 ReturnedValue value() const {-
179 return (val ? val->asReturnedValue() : Encode::undefined());
executed 7676491 times by 135 tests: return (val ? val->asReturnedValue() : Encode::undefined());
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • 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_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • ...
7676491
180 }-
181 Value *valueRef() const {-
182 return val;
executed 16 times by 1 test: return val;
Executed by:
  • tst_qqmlecmascript
16
183 }-
184 Managed *asManaged() const {-
185 if (!val)
!valDescription
TRUEnever evaluated
FALSEevaluated 619899 times by 99 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
0-619899
186 return nullptr;
never executed: return nullptr;
0
187 return val->managed();
executed 619899 times by 99 tests: return val->managed();
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
619899
188 }-
189 template <typename T>-
190 T *as() const {-
191 if (!val)
!valDescription
TRUEevaluated 1149781 times by 154 tests
Evaluated 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
  • ...
FALSEevaluated 3059 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
3059-1149781
192 return nullptr;
executed 1149758 times by 154 tests: return nullptr;
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
  • ...
1149758
193 return val->as<T>();
executed 3059 times by 5 tests: return val->as<T>();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
3059
194 }-
195-
196 ExecutionEngine *engine() const {-
197 if (!val)
!valDescription
TRUEnever evaluated
FALSEevaluated 1752672 times by 154 tests
Evaluated 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
  • ...
0-1752672
198 return nullptr;
never executed: return nullptr;
0
199 return PersistentValueStorage::getEngine(val);
executed 1752679 times by 154 tests: return PersistentValueStorage::getEngine(val);
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
  • ...
1752679
200 }-
201-
202 bool isUndefined() const { return !val || val->isUndefined(); }
executed 13353037 times by 142 tests: return !val || val->isUndefined();
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • 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_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • ...
13353037
203 bool isNullOrUndefined() const { return !val || val->isNullOrUndefined(); }
executed 986 times by 12 tests: return !val || val->isNullOrUndefined();
Executed by:
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquicktext
986
204 void clear() { free(); }
executed 59484 times by 56 tests: end of block
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlmetatype
  • tst_qqmlnativeconnector
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltimer
  • ...
59484
205-
206 void markOnce(MarkStack *markStack);-
207-
208private:-
209 Value *val = nullptr;-
210-
211private:-
212 Q_NEVER_INLINE void allocVal(ExecutionEngine *engine);-
213-
214 void free();-
215};-
216-
217} // namespace QV4-
218-
219QT_END_NAMESPACE-
220-
221#endif-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0