OpenCoverage

qv4identifier.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4identifier.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 "qv4identifier_p.h"-
40#include "qv4identifiertable_p.h"-
41#include "qv4string_p.h"-
42-
43QT_BEGIN_NAMESPACE-
44-
45namespace QV4 {-
46-
47static const uchar prime_deltas[] = {-
48 0, 0, 1, 3, 1, 5, 3, 3, 1, 9, 7, 5, 3, 9, 25, 3,-
49 1, 21, 3, 21, 7, 15, 9, 5, 3, 29, 15, 0, 0, 0, 0, 0-
50};-
51-
52static inline int primeForNumBits(int numBits)-
53{-
54 return (1 << numBits) + prime_deltas[numBits];
executed 134329 times by 84 tests: return (1 << numBits) + prime_deltas[numBits];
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • 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
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • ...
134329
55}-
56-
57-
58IdentifierHashData::IdentifierHashData(IdentifierTable *table, int numBits)-
59 : size(0)-
60 , numBits(numBits)-
61 , identifierTable(table)-
62{-
63 refCount.store(1);-
64 alloc = primeForNumBits(numBits);-
65 entries = (IdentifierHashEntry *)malloc(alloc*sizeof(IdentifierHashEntry));-
66 memset(entries, 0, alloc*sizeof(IdentifierHashEntry));-
67 identifierTable->addIdentifierHash(this);-
68}
executed 133883 times by 84 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • 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
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • ...
133883
69-
70IdentifierHashData::IdentifierHashData(IdentifierHashData *other)-
71 : size(other->size)-
72 , numBits(other->numBits)-
73 , identifierTable(other->identifierTable)-
74{-
75 refCount.store(1);-
76 alloc = other->alloc;-
77 entries = (IdentifierHashEntry *)malloc(alloc*sizeof(IdentifierHashEntry));-
78 memcpy(entries, other->entries, alloc*sizeof(IdentifierHashEntry));-
79 identifierTable->addIdentifierHash(this);-
80}
never executed: end of block
0
81-
82IdentifierHashData::~IdentifierHashData() {-
83 free(entries);-
84 if (identifierTable)
identifierTableDescription
TRUEevaluated 87753 times by 77 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • ...
FALSEevaluated 5667 times by 80 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
5667-87753
85 identifierTable->removeIdentifierHash(this);
executed 87753 times by 77 tests: identifierTable->removeIdentifierHash(this);
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • ...
87753
86}
executed 93420 times by 84 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • 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
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • ...
93420
87-
88IdentifierHash::IdentifierHash(ExecutionEngine *engine)-
89{-
90 d = new IdentifierHashData(engine->identifierTable, 3);-
91}
executed 133883 times by 84 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • 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
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • ...
133883
92-
93void IdentifierHash::detach()-
94{-
95 if (!d || d->refCount == 1)
!dDescription
TRUEnever evaluated
FALSEevaluated 19014 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmlvaluetypeproviders
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickflickable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
d->refCount == 1Description
TRUEevaluated 19014 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmlvaluetypeproviders
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickflickable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
FALSEnever evaluated
0-19014
96 return;
executed 19014 times by 34 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmlvaluetypeproviders
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickflickable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
19014
97 IdentifierHashData *newData = new IdentifierHashData(d);-
98 if (d && !d->refCount.deref())
dDescription
TRUEnever evaluated
FALSEnever evaluated
!d->refCount.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
99 delete d;
never executed: delete d;
0
100 d = newData;-
101}
never executed: end of block
0
102-
103-
104IdentifierHashEntry *IdentifierHash::addEntry(PropertyKey identifier)-
105{-
106 Q_ASSERT(identifier.isStringOrSymbol());-
107-
108 // fill up to max 50%-
109 bool grow = (d->alloc <= d->size*2);-
110-
111 if (grow) {
growDescription
TRUEevaluated 446 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquicktext
FALSEevaluated 12244 times by 70 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • ...
446-12244
112 ++d->numBits;-
113 int newAlloc = primeForNumBits(d->numBits);-
114 IdentifierHashEntry *newEntries = (IdentifierHashEntry *)malloc(newAlloc * sizeof(IdentifierHashEntry));-
115 memset(newEntries, 0, newAlloc*sizeof(IdentifierHashEntry));-
116 for (int i = 0; i < d->alloc; ++i) {
i < d->allocDescription
TRUEevaluated 5186 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquicktext
FALSEevaluated 446 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquicktext
446-5186
117 const IdentifierHashEntry &e = d->entries[i];-
118 if (!e.identifier.isValid())
!e.identifier.isValid()Description
TRUEevaluated 2370 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquicktext
FALSEevaluated 2816 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquicktext
2370-2816
119 continue;
executed 2370 times by 11 tests: continue;
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquicktext
2370
120 uint idx = e.identifier.id() % newAlloc;-
121 while (newEntries[idx].identifier.isValid()) {
newEntries[idx...fier.isValid()Description
TRUEevaluated 94 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
FALSEevaluated 2816 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquicktext
94-2816
122 ++idx;-
123 idx %= newAlloc;-
124 }
executed 94 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
94
125 newEntries[idx] = e;-
126 }
executed 2816 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquicktext
2816
127 free(d->entries);-
128 d->entries = newEntries;-
129 d->alloc = newAlloc;-
130 }
executed 446 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquicktext
446
131-
132 uint idx = identifier.id() % d->alloc;-
133 while (d->entries[idx].identifier.isValid()) {
d->entries[idx...fier.isValid()Description
TRUEevaluated 1188 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_scenegraph
  • tst_testfiltering
FALSEevaluated 12690 times by 70 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • ...
1188-12690
134 Q_ASSERT(d->entries[idx].identifier != identifier);-
135 ++idx;-
136 idx %= d->alloc;-
137 }
executed 1188 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_scenegraph
  • tst_testfiltering
1188
138 d->entries[idx].identifier = identifier;-
139 ++d->size;-
140 return d->entries + idx;
executed 12690 times by 70 tests: return d->entries + idx;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • ...
12690
141}-
142-
143const IdentifierHashEntry *IdentifierHash::lookup(PropertyKey identifier) const-
144{-
145 if (!d || !identifier.isStringOrSymbol())
!dDescription
TRUEnever evaluated
FALSEevaluated 2637592 times by 70 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • ...
!identifier.isStringOrSymbol()Description
TRUEnever evaluated
FALSEevaluated 2637592 times by 70 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • ...
0-2637592
146 return nullptr;
never executed: return nullptr;
0
147 Q_ASSERT(d->entries);-
148-
149 uint idx = identifier.id() % d->alloc;-
150 while (1) {-
151 if (!d->entries[idx].identifier.isValid())
!d->entries[id...fier.isValid()Description
TRUEevaluated 2094002 times by 68 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • ...
FALSEevaluated 971828 times by 58 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • ...
971828-2094002
152 return nullptr;
executed 2094002 times by 68 tests: return nullptr;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • ...
2094002
153 if (d->entries[idx].identifier == identifier)
d->entries[idx... == identifierDescription
TRUEevaluated 543590 times by 50 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • ...
FALSEevaluated 428238 times by 37 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmlvaluetypeproviders
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmultipointtoucharea
  • ...
428238-543590
154 return d->entries + idx;
executed 543590 times by 50 tests: return d->entries + idx;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • ...
543590
155 ++idx;-
156 idx %= d->alloc;-
157 }
executed 428238 times by 37 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmlvaluetypeproviders
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmultipointtoucharea
  • ...
428238
158}
never executed: end of block
0
159-
160const IdentifierHashEntry *IdentifierHash::lookup(const QString &str) const-
161{-
162 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 19026 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmlvaluetypeproviders
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickflickable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
0-19026
163 return nullptr;
never executed: return nullptr;
0
164-
165 PropertyKey id = d->identifierTable->asPropertyKey(str);-
166 return lookup(id);
executed 19026 times by 34 tests: return lookup(id);
Executed by:
  • tst_examples
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmlvaluetypeproviders
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickflickable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
19026
167}-
168-
169const IdentifierHashEntry *IdentifierHash::lookup(String *str) const-
170{-
171 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 2618566 times by 70 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • ...
0-2618566
172 return nullptr;
never executed: return nullptr;
0
173 PropertyKey id = d->identifierTable->asPropertyKey(str);-
174 if (id.isValid())
id.isValid()Description
TRUEevaluated 2618566 times by 70 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • ...
FALSEnever evaluated
0-2618566
175 return lookup(id);
executed 2618566 times by 70 tests: return lookup(id);
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • ...
2618566
176 return lookup(str->toQString());
never executed: return lookup(str->toQString());
0
177}-
178-
179const PropertyKey IdentifierHash::toIdentifier(const QString &str) const-
180{-
181 Q_ASSERT(d);-
182 return d->identifierTable->asPropertyKey(str);
executed 5146 times by 34 tests: return d->identifierTable->asPropertyKey(str);
Executed by:
  • tst_examples
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmlvaluetypeproviders
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickflickable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
5146
183}-
184-
185const PropertyKey IdentifierHash::toIdentifier(Heap::String *str) const-
186{-
187 Q_ASSERT(d);-
188 return d->identifierTable->asPropertyKey(str);
executed 7544 times by 67 tests: return d->identifierTable->asPropertyKey(str);
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • ...
7544
189}-
190-
191QString QV4::IdentifierHash::findId(int value) const-
192{-
193 IdentifierHashEntry *e = d->entries;-
194 IdentifierHashEntry *end = e + d->alloc;-
195 while (e < end) {
e < endDescription
TRUEevaluated 2814 times by 2 tests
Evaluated by:
  • tst_qqmlcontext
  • tst_qqmlenginedebugservice
FALSEnever evaluated
0-2814
196 if (e->identifier.isValid() && e->value == value)
e->identifier.isValid()Description
TRUEevaluated 519 times by 2 tests
Evaluated by:
  • tst_qqmlcontext
  • tst_qqmlenginedebugservice
FALSEevaluated 2295 times by 2 tests
Evaluated by:
  • tst_qqmlcontext
  • tst_qqmlenginedebugservice
e->value == valueDescription
TRUEevaluated 386 times by 2 tests
Evaluated by:
  • tst_qqmlcontext
  • tst_qqmlenginedebugservice
FALSEevaluated 133 times by 2 tests
Evaluated by:
  • tst_qqmlcontext
  • tst_qqmlenginedebugservice
133-2295
197 return e->identifier.toQString();
executed 386 times by 2 tests: return e->identifier.toQString();
Executed by:
  • tst_qqmlcontext
  • tst_qqmlenginedebugservice
386
198 ++e;-
199 }
executed 2428 times by 2 tests: end of block
Executed by:
  • tst_qqmlcontext
  • tst_qqmlenginedebugservice
2428
200 return QString();
never executed: return QString();
0
201}-
202-
203void IdentifierHashData::markObjects(MarkStack *markStack) const-
204{-
205 IdentifierHashEntry *e = entries;-
206 IdentifierHashEntry *end = e + alloc;-
207 while (e < end) {
e < endDescription
TRUEevaluated 651112 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_scenegraph
  • tst_testfiltering
FALSEevaluated 58848 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_scenegraph
  • tst_testfiltering
58848-651112
208 if (Heap::Base *o = e->identifier.asStringOrSymbol())
Heap::Base *o ...ringOrSymbol()Description
TRUEevaluated 11140 times by 15 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_scenegraph
  • tst_testfiltering
FALSEevaluated 639972 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_scenegraph
  • tst_testfiltering
11140-639972
209 o->mark(markStack);
executed 11140 times by 15 tests: o->mark(markStack);
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_scenegraph
  • tst_testfiltering
11140
210 ++e;-
211 }
executed 651112 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_scenegraph
  • tst_testfiltering
651112
212}
executed 58848 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_scenegraph
  • tst_testfiltering
58848
213-
214-
215}-
216-
217QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0