OpenCoverage

qv4compiler.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/compiler/qv4compiler.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtQml module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include <qv4compiler_p.h>-
41#include <qv4compileddata_p.h>-
42#include <qv4codegen_p.h>-
43#include <private/qv4string_p.h>-
44#include <private/qv4value_p.h>-
45#include <private/qv4alloca_p.h>-
46#include <private/qqmljslexer_p.h>-
47#include <private/qqmljsast_p.h>-
48#include <wtf/MathExtras.h>-
49#include <QCryptographicHash>-
50-
51// generated by qmake:-
52#include "qml_compile_hash_p.h"-
53-
54QV4::Compiler::StringTableGenerator::StringTableGenerator()-
55{-
56 clear();-
57}
executed 2339094 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
2339094
58-
59int QV4::Compiler::StringTableGenerator::registerString(const QString &str)-
60{-
61 QHash<QString, int>::ConstIterator it = stringToId.constFind(str);-
62 if (it != stringToId.cend())
it != stringToId.cend()Description
TRUEevaluated 12437617 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
FALSEevaluated 13594089 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
12437617-13594089
63 return *it;
executed 12433251 times by 146 tests: return *it;
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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
12433251
64 stringToId.insert(str, strings.size());-
65 strings.append(str);-
66 stringDataSize += QV4::CompiledData::String::calculateSize(str);-
67 return strings.size() - 1;
executed 13589500 times by 146 tests: return strings.size() - 1;
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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
13589500
68}-
69-
70int QV4::Compiler::StringTableGenerator::getStringId(const QString &string) const-
71{-
72 Q_ASSERT(stringToId.contains(string));-
73 return stringToId.value(string);
executed 10214921 times by 146 tests: return stringToId.value(string);
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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
10214921
74}-
75-
76void QV4::Compiler::StringTableGenerator::clear()-
77{-
78 strings.clear();-
79 stringToId.clear();-
80 stringDataSize = 0;-
81}
executed 2338030 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
2338030
82-
83void QV4::Compiler::StringTableGenerator::serialize(CompiledData::Unit *unit)-
84{-
85 char *dataStart = reinterpret_cast<char *>(unit);-
86 quint32_le *stringTable = reinterpret_cast<quint32_le *>(dataStart + unit->offsetToStringTable);-
87 char *stringData = dataStart + unit->offsetToStringTable + unit->stringTableSize * sizeof(uint);-
88 for (int i = 0; i < strings.size(); ++i) {
i < strings.size()Description
TRUEevaluated 13591906 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
FALSEevaluated 2338368 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
2338368-13591906
89 stringTable[i] = stringData - dataStart;-
90 const QString &qstr = strings.at(i);-
91-
92 QV4::CompiledData::String *s = reinterpret_cast<QV4::CompiledData::String *>(stringData);-
93 s->refcount = -1;-
94 s->size = qstr.length();-
95 s->allocAndCapacityReservedFlag = 0;-
96 s->offsetOn32Bit = sizeof(QV4::CompiledData::String);-
97 s->offsetOn64Bit = sizeof(QV4::CompiledData::String);-
98#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN-
99 memcpy(s + 1, qstr.constData(), qstr.length()*sizeof(ushort));-
100#else-
101 ushort *uc = reinterpret_cast<ushort *>(s + 1);-
102 for (int i = 0; i < qstr.length(); ++i)-
103 uc[i] = qToLittleEndian<ushort>(qstr.at(i).unicode());-
104#endif-
105 reinterpret_cast<ushort *>(s + 1)[s->size] = 0;-
106-
107 stringData += QV4::CompiledData::String::calculateSize(qstr);-
108 }
executed 13592313 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
13592313
109}
executed 2338279 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
2338279
110-
111QV4::Compiler::JSUnitGenerator::JSUnitGenerator(QV4::Compiler::Module *module)-
112 : module(module)-
113{-
114 // Make sure the empty string always gets index 0-
115 registerString(QString());-
116}
executed 2338766 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
2338766
117-
118int QV4::Compiler::JSUnitGenerator::registerGetterLookup(const QString &name)-
119{-
120 return registerGetterLookup(registerString(name));
never executed: return registerGetterLookup(registerString(name));
0
121}-
122-
123int QV4::Compiler::JSUnitGenerator::registerGetterLookup(int nameIndex)-
124{-
125 CompiledData::Lookup l;-
126 l.type_and_flags = CompiledData::Lookup::Type_Getter;-
127 l.nameIndex = nameIndex;-
128 lookups << l;-
129 return lookups.size() - 1;
executed 1912609 times by 7 tests: return lookups.size() - 1;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickworkerscript
1912609
130}-
131-
132int QV4::Compiler::JSUnitGenerator::registerSetterLookup(const QString &name)-
133{-
134 return registerSetterLookup(registerString(name));
never executed: return registerSetterLookup(registerString(name));
0
135}-
136-
137int QV4::Compiler::JSUnitGenerator::registerSetterLookup(int nameIndex)-
138{-
139 CompiledData::Lookup l;-
140 l.type_and_flags = CompiledData::Lookup::Type_Setter;-
141 l.nameIndex = nameIndex;-
142 lookups << l;-
143 return lookups.size() - 1;
executed 595615 times by 1 test: return lookups.size() - 1;
Executed by:
  • tst_ecmascripttests
595615
144}-
145-
146int QV4::Compiler::JSUnitGenerator::registerGlobalGetterLookup(const QString &name)-
147{-
148 return registerGlobalGetterLookup(registerString(name));
never executed: return registerGlobalGetterLookup(registerString(name));
0
149}-
150-
151int QV4::Compiler::JSUnitGenerator::registerGlobalGetterLookup(int nameIndex)-
152{-
153 CompiledData::Lookup l;-
154 l.type_and_flags = CompiledData::Lookup::Type_GlobalGetter;-
155 l.nameIndex = nameIndex;-
156 lookups << l;-
157 return lookups.size() - 1;
executed 3401780 times by 7 tests: return lookups.size() - 1;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickworkerscript
  • tst_qv4assembler
3401780
158}-
159-
160int QV4::Compiler::JSUnitGenerator::registerRegExp(QQmlJS::AST::RegExpLiteral *regexp)-
161{-
162 CompiledData::RegExp re;-
163 re.stringIndex = registerString(regexp->pattern.toString());-
164-
165 re.flags = 0;-
166 if (regexp->flags & QQmlJS::Lexer::RegExp_Global)
regexp->flags ...:RegExp_GlobalDescription
TRUEevaluated 3184 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
FALSEevaluated 1052669 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
3184-1052669
167 re.flags |= CompiledData::RegExp::RegExp_Global;
executed 3183 times by 5 tests: re.flags |= CompiledData::RegExp::RegExp_Global;
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
3183
168 if (regexp->flags & QQmlJS::Lexer::RegExp_IgnoreCase)
regexp->flags ...Exp_IgnoreCaseDescription
TRUEevaluated 684 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
FALSEevaluated 1055182 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
684-1055182
169 re.flags |= CompiledData::RegExp::RegExp_IgnoreCase;
executed 684 times by 4 tests: re.flags |= CompiledData::RegExp::RegExp_IgnoreCase;
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
684
170 if (regexp->flags & QQmlJS::Lexer::RegExp_Multiline)
regexp->flags ...gExp_MultilineDescription
TRUEevaluated 482 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
FALSEevaluated 1054428 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
482-1054428
171 re.flags |= CompiledData::RegExp::RegExp_Multiline;
executed 482 times by 4 tests: re.flags |= CompiledData::RegExp::RegExp_Multiline;
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
482
172-
173 regexps.append(re);-
174 return regexps.size() - 1;
executed 1056139 times by 8 tests: return regexps.size() - 1;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
1056139
175}-
176-
177int QV4::Compiler::JSUnitGenerator::registerConstant(QV4::ReturnedValue v)-
178{-
179 int idx = constants.indexOf(v);-
180 if (idx >= 0)
idx >= 0Description
TRUEevaluated 286578 times by 44 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • ...
FALSEevaluated 362475 times by 68 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • ...
286578-362475
181 return idx;
executed 286657 times by 44 tests: return idx;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • ...
286657
182 constants.append(v);-
183 return constants.size() - 1;
executed 363637 times by 68 tests: return constants.size() - 1;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • ...
363637
184}-
185-
186QV4::ReturnedValue QV4::Compiler::JSUnitGenerator::constant(int idx)-
187{-
188 return constants.at(idx);
never executed: return constants.at(idx);
0
189}-
190-
191int QV4::Compiler::JSUnitGenerator::registerJSClass(const QStringList &members)-
192{-
193 // ### re-use existing class definitions.-
194-
195 const int size = CompiledData::JSClass::calculateSize(members.size());-
196 jsClassOffsets.append(jsClassData.size());-
197 const int oldSize = jsClassData.size();-
198 jsClassData.resize(jsClassData.size() + size);-
199 memset(jsClassData.data() + oldSize, 0, size);-
200-
201 CompiledData::JSClass *jsClass = reinterpret_cast<CompiledData::JSClass*>(jsClassData.data() + oldSize);-
202 jsClass->nMembers = members.size();-
203 CompiledData::JSClassMember *member = reinterpret_cast<CompiledData::JSClassMember*>(jsClass + 1);-
204-
205 for (const auto &name : members) {-
206 member->nameOffset = registerString(name);-
207 member->isAccessor = false;-
208 ++member;-
209 }
executed 73600 times by 33 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlprofilerservice
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickparticlegroup
  • ...
73600
210-
211 return jsClassOffsets.size() - 1;
executed 71551 times by 36 tests: return jsClassOffsets.size() - 1;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • ...
71551
212}-
213-
214QV4::CompiledData::Unit *QV4::Compiler::JSUnitGenerator::generateUnit(GeneratorOption option)-
215{-
216 registerString(module->fileName);-
217 registerString(module->finalUrl);-
218 for (Context *f : qAsConst(module->functions)) {-
219 registerString(f->name);-
220 for (int i = 0; i < f->arguments.size(); ++i)
i < f->arguments.size()Description
TRUEevaluated 1762029 times by 57 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlprofilerservice
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • ...
FALSEevaluated 3400717 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
1762029-3400717
221 registerString(f->arguments.at(i));
executed 1762119 times by 57 tests: registerString(f->arguments.at(i));
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlprofilerservice
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • ...
1762119
222 for (int i = 0; i < f->locals.size(); ++i)
i < f->locals.size()Description
TRUEevaluated 126556 times by 15 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickworkerscript
  • tst_qv4debugger
FALSEevaluated 3399885 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
126556-3399885
223 registerString(f->locals.at(i));
executed 126565 times by 15 tests: registerString(f->locals.at(i));
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickworkerscript
  • tst_qv4debugger
126565
224 }
executed 3399981 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
3399981
225 for (Context *c : qAsConst(module->blocks)) {-
226 for (int i = 0; i < c->locals.size(); ++i)
i < c->locals.size()Description
TRUEevaluated 249183 times by 24 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
FALSEevaluated 345644 times by 40 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
249183-345644
227 registerString(c->locals.at(i));
executed 249259 times by 24 tests: registerString(c->locals.at(i));
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
249259
228 }
executed 345692 times by 40 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
345692
229-
230 Q_ALLOCA_VAR(quint32_le, blockClassAndFunctionOffsets, (module->functions.size() + module->classes.size() + module->blocks.size()) * sizeof(quint32_le));-
231 uint jsClassDataOffset = 0;-
232-
233 char *dataPtr;-
234 CompiledData::Unit *unit;-
235 {-
236 QV4::CompiledData::Unit tempHeader = generateHeader(option, blockClassAndFunctionOffsets, &jsClassDataOffset);-
237 dataPtr = reinterpret_cast<char *>(malloc(tempHeader.unitSize));-
238 memset(dataPtr, 0, tempHeader.unitSize);-
239 memcpy(&unit, &dataPtr, sizeof(CompiledData::Unit*));-
240 memcpy(unit, &tempHeader, sizeof(tempHeader));-
241 }-
242-
243 memcpy(dataPtr + unit->offsetToFunctionTable, blockClassAndFunctionOffsets, unit->functionTableSize * sizeof(quint32_le));-
244 memcpy(dataPtr + unit->offsetToClassTable, blockClassAndFunctionOffsets + unit->functionTableSize, unit->classTableSize * sizeof(quint32_le));-
245 memcpy(dataPtr + unit->offsetToBlockTable, blockClassAndFunctionOffsets + unit->functionTableSize + unit->classTableSize, unit->blockTableSize * sizeof(quint32_le));-
246-
247 for (int i = 0; i < module->functions.size(); ++i) {
i < module->functions.size()Description
TRUEevaluated 3400858 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
FALSEevaluated 2337236 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
2337236-3400858
248 Context *function = module->functions.at(i);-
249 if (function == module->rootContext)
function == mo...e->rootContextDescription
TRUEevaluated 2289442 times by 40 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • ...
FALSEevaluated 1111277 times by 138 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_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
1111277-2289442
250 unit->indexOfRootFunction = i;
executed 2289674 times by 40 tests: unit->indexOfRootFunction = i;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • ...
2289674
251-
252 writeFunction(dataPtr + blockClassAndFunctionOffsets[i], function);-
253 }
executed 3399153 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
3399153
254-
255 for (int i = 0; i < module->classes.size(); ++i) {
i < module->classes.size()Description
TRUEevaluated 9287 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2336509 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
9287-2336509
256 const Class &c = module->classes.at(i);-
257-
258 writeClass(dataPtr + blockClassAndFunctionOffsets[i + module->functions.size()], c);-
259 }
executed 9279 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
9279
260-
261 for (int i = 0; i < module->blocks.size(); ++i) {
i < module->blocks.size()Description
TRUEevaluated 345506 times by 40 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
FALSEevaluated 2337364 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
345506-2337364
262 Context *block = module->blocks.at(i);-
263-
264 writeBlock(dataPtr + blockClassAndFunctionOffsets[i + module->classes.size() + module->functions.size()], block);-
265 }
executed 345461 times by 40 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
345461
266-
267 CompiledData::Lookup *lookupsToWrite = reinterpret_cast<CompiledData::Lookup*>(dataPtr + unit->offsetToLookupTable);-
268 for (const CompiledData::Lookup &l : qAsConst(lookups))-
269 *lookupsToWrite++ = l;
executed 5915068 times by 8 tests: *lookupsToWrite++ = l;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickworkerscript
  • tst_qv4assembler
5915068
270-
271 CompiledData::RegExp *regexpTable = reinterpret_cast<CompiledData::RegExp *>(dataPtr + unit->offsetToRegexpTable);-
272 memcpy(regexpTable, regexps.constData(), regexps.size() * sizeof(*regexpTable));-
273-
274#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN-
275 ReturnedValue *constantTable = reinterpret_cast<ReturnedValue *>(dataPtr + unit->offsetToConstantTable);-
276 memcpy(constantTable, constants.constData(), constants.size() * sizeof(ReturnedValue));-
277#else-
278 quint64_le *constantTable = reinterpret_cast<quint64_le *>(dataPtr + unit->offsetToConstantTable);-
279 for (int i = 0; i < constants.count(); ++i)-
280 constantTable[i] = constants.at(i);-
281#endif-
282-
283 {-
284 memcpy(dataPtr + jsClassDataOffset, jsClassData.constData(), jsClassData.size());-
285-
286 // write js classes and js class lookup table-
287 quint32_le *jsClassOffsetTable = reinterpret_cast<quint32_le *>(dataPtr + unit->offsetToJSClassTable);-
288 for (int i = 0; i < jsClassOffsets.count(); ++i)
i < jsClassOffsets.count()Description
TRUEevaluated 71661 times by 36 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • ...
FALSEevaluated 2336913 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
71661-2336913
289 jsClassOffsetTable[i] = jsClassDataOffset + jsClassOffsets.at(i);
executed 71682 times by 36 tests: jsClassOffsetTable[i] = jsClassDataOffset + jsClassOffsets.at(i);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • ...
71682
290 }-
291-
292 // write strings and string table-
293 if (option == GenerateWithStringTable)
option == Gene...ithStringTableDescription
TRUEevaluated 2287067 times by 31 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
FALSEevaluated 48529 times by 141 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • ...
48529-2287067
294 stringTable.serialize(unit);
executed 2286268 times by 31 tests: stringTable.serialize(unit);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
2286268
295-
296 unit->generateChecksum();-
297-
298 return unit;
executed 2338257 times by 146 tests: return unit;
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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
2338257
299}-
300-
301void QV4::Compiler::JSUnitGenerator::writeFunction(char *f, QV4::Compiler::Context *irFunction) const-
302{-
303 QV4::CompiledData::Function *function = (QV4::CompiledData::Function *)f;-
304-
305 quint32 currentOffset = sizeof(QV4::CompiledData::Function);-
306 currentOffset = (currentOffset + 7) & ~quint32(0x7);-
307-
308 function->nameIndex = getStringId(irFunction->name);-
309 function->flags = 0;-
310 if (irFunction->isStrict)
irFunction->isStrictDescription
TRUEevaluated 1085596 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qv4assembler
FALSEevaluated 2314284 times by 138 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
1085596-2314284
311 function->flags |= CompiledData::Function::IsStrict;
executed 1085630 times by 4 tests: function->flags |= CompiledData::Function::IsStrict;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qv4assembler
1085630
312 if (irFunction->isArrowFunction)
irFunction->isArrowFunctionDescription
TRUEevaluated 1569 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3399050 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
1569-3399050
313 function->flags |= CompiledData::Function::IsArrowFunction;
executed 1568 times by 1 test: function->flags |= CompiledData::Function::IsArrowFunction;
Executed by:
  • tst_ecmascripttests
1568
314 if (irFunction->isGenerator)
irFunction->isGeneratorDescription
TRUEevaluated 9270 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3391560 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
9270-3391560
315 function->flags |= CompiledData::Function::IsGenerator;
executed 9267 times by 1 test: function->flags |= CompiledData::Function::IsGenerator;
Executed by:
  • tst_ecmascripttests
9267
316 function->nestedFunctionIndex =-
317 irFunction->returnsClosure ? quint32(module->functions.indexOf(irFunction->nestedContexts.first()))
irFunction->returnsClosureDescription
TRUEevaluated 12 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qmlcachegen
  • tst_qqmlecmascript
FALSEevaluated 3399998 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
12-3399998
318 : std::numeric_limits<uint32_t>::max();-
319 function->length = irFunction->formals ? irFunction->formals->length() : 0;
irFunction->formalsDescription
TRUEevaluated 809212 times by 57 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlprofilerservice
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • ...
FALSEevaluated 2590397 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
809212-2590397
320 function->nFormals = irFunction->arguments.size();-
321 function->formalsOffset = currentOffset;-
322 currentOffset += function->nFormals * sizeof(quint32);-
323-
324 function->nLocals = irFunction->locals.size();-
325 function->localsOffset = currentOffset;-
326 currentOffset += function->nLocals * sizeof(quint32);-
327-
328 function->nLineNumbers = irFunction->lineNumberMapping.size();-
329 function->lineNumberOffset = currentOffset;-
330 currentOffset += function->nLineNumbers * sizeof(CompiledData::CodeOffsetToLine);-
331-
332-
333 function->nRegisters = irFunction->registerCountInFunction;-
334-
335 function->nDependingIdObjects = 0;-
336 function->nDependingContextProperties = 0;-
337 function->nDependingScopeProperties = 0;-
338-
339 if (!irFunction->idObjectDependencies.isEmpty()) {
!irFunction->i...cies.isEmpty()Description
TRUEevaluated 2873 times by 67 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • 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
  • tst_qquickbehaviors
  • ...
FALSEevaluated 3396973 times by 138 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
2873-3396973
340 function->nDependingIdObjects = irFunction->idObjectDependencies.count();-
341 function->dependingIdObjectsOffset = currentOffset;-
342 currentOffset += function->nDependingIdObjects * sizeof(quint32);-
343 }
executed 2873 times by 67 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • 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
  • tst_qquickbehaviors
  • ...
2873
344-
345 if (!irFunction->contextObjectPropertyDependencies.isEmpty()) {
!irFunction->c...cies.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 3399192 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
0-3399192
346 function->nDependingContextProperties = irFunction->contextObjectPropertyDependencies.count();-
347 function->dependingContextPropertiesOffset = currentOffset;-
348 currentOffset += function->nDependingContextProperties * sizeof(quint32) * 2;-
349 }
never executed: end of block
0
350-
351 if (!irFunction->scopeObjectPropertyDependencies.isEmpty()) {
!irFunction->s...cies.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 3400235 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
0-3400235
352 function->nDependingScopeProperties = irFunction->scopeObjectPropertyDependencies.count();-
353 function->dependingScopePropertiesOffset = currentOffset;-
354 currentOffset += function->nDependingScopeProperties * sizeof(quint32) * 2;-
355 }
never executed: end of block
0
356-
357 function->location.line = irFunction->line;-
358 function->location.column = irFunction->column;-
359-
360 function->codeOffset = currentOffset;-
361 function->codeSize = irFunction->code.size();-
362-
363 // write formals-
364 quint32_le *formals = (quint32_le *)(f + function->formalsOffset);-
365 for (int i = 0; i < irFunction->arguments.size(); ++i)
i < irFunction...guments.size()Description
TRUEevaluated 1761611 times by 57 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlprofilerservice
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • ...
FALSEevaluated 3398321 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
1761611-3398321
366 formals[i] = getStringId(irFunction->arguments.at(i));
executed 1761821 times by 57 tests: formals[i] = getStringId(irFunction->arguments.at(i));
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlitemmodels
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlprofilerservice
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • ...
1761821
367-
368 // write locals-
369 quint32_le *locals = (quint32_le *)(f + function->localsOffset);-
370 for (int i = 0; i < irFunction->locals.size(); ++i)
i < irFunction->locals.size()Description
TRUEevaluated 126444 times by 15 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickworkerscript
  • tst_qv4debugger
FALSEevaluated 3400678 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
126444-3400678
371 locals[i] = getStringId(irFunction->locals.at(i));
executed 126499 times by 15 tests: locals[i] = getStringId(irFunction->locals.at(i));
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickworkerscript
  • tst_qv4debugger
126499
372-
373 // write line numbers-
374 memcpy(f + function->lineNumberOffset, irFunction->lineNumberMapping.constData(), irFunction->lineNumberMapping.size()*sizeof(CompiledData::CodeOffsetToLine));-
375-
376 // write QML dependencies-
377 quint32_le *writtenDeps = (quint32_le *)(f + function->dependingIdObjectsOffset);-
378 for (int id : irFunction->idObjectDependencies) {-
379 Q_ASSERT(id >= 0);-
380 *writtenDeps++ = static_cast<quint32>(id);-
381 }
executed 3009 times by 67 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • 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
  • tst_qquickbehaviors
  • ...
3009
382-
383 writtenDeps = (quint32_le *)(f + function->dependingContextPropertiesOffset);-
384 for (auto property : irFunction->contextObjectPropertyDependencies) {-
385 *writtenDeps++ = property.key(); // property index-
386 *writtenDeps++ = property.value(); // notify index-
387 }
never executed: end of block
0
388-
389 writtenDeps = (quint32_le *)(f + function->dependingScopePropertiesOffset);-
390 for (auto property : irFunction->scopeObjectPropertyDependencies) {-
391 *writtenDeps++ = property.key(); // property index-
392 *writtenDeps++ = property.value(); // notify index-
393 }
never executed: end of block
0
394-
395 // write byte code-
396 memcpy(f + function->codeOffset, irFunction->code.constData(), irFunction->code.size());-
397}
executed 3399930 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
3399930
398-
399static_assert(int(QV4::Compiler::Class::Method::Regular) == int(QV4::CompiledData::Method::Regular), "Incompatible layout");-
400static_assert(int(QV4::Compiler::Class::Method::Getter) == int(QV4::CompiledData::Method::Getter), "Incompatible layout");-
401static_assert(int(QV4::Compiler::Class::Method::Setter) == int(QV4::CompiledData::Method::Setter), "Incompatible layout");-
402-
403void QV4::Compiler::JSUnitGenerator::writeClass(char *b, const QV4::Compiler::Class &c)-
404{-
405 QV4::CompiledData::Class *cls = reinterpret_cast<QV4::CompiledData::Class *>(b);-
406-
407 quint32 currentOffset = sizeof(QV4::CompiledData::Class);-
408-
409 QVector<Class::Method> allMethods = c.staticMethods;-
410 allMethods += c.methods;-
411-
412 cls->constructorFunction = c.constructorIndex;-
413 cls->nameIndex = c.nameIndex;-
414 cls->nMethods = c.methods.size();-
415 cls->nStaticMethods = c.staticMethods.size();-
416 cls->methodTableOffset = currentOffset;-
417 CompiledData::Method *method = reinterpret_cast<CompiledData::Method *>(b + currentOffset);-
418-
419 // write methods-
420 for (int i = 0; i < allMethods.size(); ++i) {
i < allMethods.size()Description
TRUEevaluated 7822 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 9247 times by 1 test
Evaluated by:
  • tst_ecmascripttests
7822-9247
421 method->name = allMethods.at(i).nameIndex;-
422 method->type = allMethods.at(i).type;-
423 method->function = allMethods.at(i).functionIndex;-
424 ++method;-
425 }
executed 7860 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
7860
426-
427 static const bool showCode = qEnvironmentVariableIsSet("QV4_SHOW_BYTECODE");-
428 if (showCode) {
showCodeDescription
TRUEnever evaluated
FALSEevaluated 9239 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-9239
429 qDebug() << "=== Class " << stringForIndex(cls->nameIndex) << "static methods" << cls->nStaticMethods << "methods" << cls->nMethods;-
430 qDebug() << " constructor:" << cls->constructorFunction;-
431 const char *staticString = ": static ";-
432 for (uint i = 0; i < cls->nStaticMethods + cls->nMethods; ++i) {
i < cls->nStat... cls->nMethodsDescription
TRUEnever evaluated
FALSEnever evaluated
0
433 if (i == cls->nStaticMethods)
i == cls->nStaticMethodsDescription
TRUEnever evaluated
FALSEnever evaluated
0
434 staticString = ": ";
never executed: staticString = ": ";
0
435 const char *type;-
436 switch (cls->methodTable()[i].type) {-
437 case CompiledData::Method::Getter:
never executed: case CompiledData::Method::Getter:
0
438 type = "get "; break;
never executed: break;
0
439 case CompiledData::Method::Setter:
never executed: case CompiledData::Method::Setter:
0
440 type = "set "; break;
never executed: break;
0
441 default:
never executed: default:
0
442 type = "";-
443-
444 }
never executed: end of block
0
445 qDebug() << " " << i << staticString << type << stringForIndex(cls->methodTable()[i].name) << cls->methodTable()[i].function;-
446 }
never executed: end of block
0
447 qDebug();-
448 }
never executed: end of block
0
449}
executed 9237 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
9237
450-
451void QV4::Compiler::JSUnitGenerator::writeBlock(char *b, QV4::Compiler::Context *irBlock) const-
452{-
453 QV4::CompiledData::Block *block = reinterpret_cast<QV4::CompiledData::Block *>(b);-
454-
455 quint32 currentOffset = sizeof(QV4::CompiledData::Block);-
456 currentOffset = (currentOffset + 7) & ~quint32(0x7);-
457-
458 block->nLocals = irBlock->locals.size();-
459 block->localsOffset = currentOffset;-
460 currentOffset += block->nLocals * sizeof(quint32);-
461-
462 // write locals-
463 quint32_le *locals = (quint32_le *)(b + block->localsOffset);-
464 for (int i = 0; i < irBlock->locals.size(); ++i)
i < irBlock->locals.size()Description
TRUEevaluated 249068 times by 24 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
FALSEevaluated 345299 times by 40 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
249068-345299
465 locals[i] = getStringId(irBlock->locals.at(i));
executed 249137 times by 24 tests: locals[i] = getStringId(irBlock->locals.at(i));
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
249137
466-
467 static const bool showCode = qEnvironmentVariableIsSet("QV4_SHOW_BYTECODE");-
468 if (showCode) {
showCodeDescription
TRUEnever evaluated
FALSEevaluated 345344 times by 40 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
0-345344
469 qDebug() << "=== Variables for block" << irBlock->blockIndex;-
470 for (int i = 0; i < irBlock->locals.size(); ++i)
i < irBlock->locals.size()Description
TRUEnever evaluated
FALSEnever evaluated
0
471 qDebug() << " " << i << ":" << locals[i];
never executed: QMessageLogger(__FILE__, 471, __PRETTY_FUNCTION__).debug() << " " << i << ":" << locals[i];
0
472 qDebug();-
473 }
never executed: end of block
0
474}
executed 345240 times by 40 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
345240
475-
476QV4::CompiledData::Unit QV4::Compiler::JSUnitGenerator::generateHeader(QV4::Compiler::JSUnitGenerator::GeneratorOption option, quint32_le *blockAndFunctionOffsets, uint *jsClassDataOffset)-
477{-
478 CompiledData::Unit unit;-
479 memset(&unit, 0, sizeof(unit));-
480 memcpy(unit.magic, CompiledData::magic_str, sizeof(unit.magic));-
481 unit.flags = QV4::CompiledData::Unit::IsJavascript;-
482 unit.flags |= module->unitFlags;-
483 unit.version = QV4_DATA_STRUCTURE_VERSION;-
484 unit.qtVersion = QT_VERSION;-
485 qstrcpy(unit.libraryVersionHash, QML_COMPILE_HASH);-
486 memset(unit.md5Checksum, 0, sizeof(unit.md5Checksum));-
487 memset(unit.dependencyMD5Checksum, 0, sizeof(unit.dependencyMD5Checksum));-
488-
489 quint32 nextOffset = sizeof(CompiledData::Unit);-
490-
491 unit.functionTableSize = module->functions.size();-
492 unit.offsetToFunctionTable = nextOffset;-
493 nextOffset += unit.functionTableSize * sizeof(uint);-
494-
495 unit.classTableSize = module->classes.size();-
496 unit.offsetToClassTable = nextOffset;-
497 nextOffset += unit.classTableSize * sizeof(uint);-
498-
499 unit.blockTableSize = module->blocks.size();-
500 unit.offsetToBlockTable = nextOffset;-
501 nextOffset += unit.blockTableSize * sizeof(uint);-
502-
503 unit.lookupTableSize = lookups.count();-
504 unit.offsetToLookupTable = nextOffset;-
505 nextOffset += unit.lookupTableSize * sizeof(CompiledData::Lookup);-
506-
507 unit.regexpTableSize = regexps.size();-
508 unit.offsetToRegexpTable = nextOffset;-
509 nextOffset += unit.regexpTableSize * sizeof(CompiledData::RegExp);-
510-
511 unit.constantTableSize = constants.size();-
512-
513 // Ensure we load constants from well-aligned addresses into for example SSE registers.-
514 nextOffset = static_cast<quint32>(WTF::roundUpToMultipleOf(16, nextOffset));-
515 unit.offsetToConstantTable = nextOffset;-
516 nextOffset += unit.constantTableSize * sizeof(ReturnedValue);-
517-
518 unit.jsClassTableSize = jsClassOffsets.count();-
519 unit.offsetToJSClassTable = nextOffset;-
520 nextOffset += unit.jsClassTableSize * sizeof(uint);-
521-
522 *jsClassDataOffset = nextOffset;-
523 nextOffset += jsClassData.size();-
524-
525 nextOffset = (nextOffset + 7) & ~quint32(0x7);-
526-
527 for (int i = 0; i < module->functions.size(); ++i) {
i < module->functions.size()Description
TRUEevaluated 3397949 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
FALSEevaluated 2337103 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
2337103-3397949
528 Context *f = module->functions.at(i);-
529 blockAndFunctionOffsets[i] = nextOffset;-
530-
531 const int qmlIdDepsCount = f->idObjectDependencies.count();-
532 const int qmlPropertyDepsCount = f->scopeObjectPropertyDependencies.count() + f->contextObjectPropertyDependencies.count();-
533 nextOffset += QV4::CompiledData::Function::calculateSize(f->arguments.size(), f->locals.size(), f->lineNumberMapping.size(), f->nestedContexts.size(),-
534 qmlIdDepsCount, qmlPropertyDepsCount, f->code.size());-
535 }
executed 3398870 times by 139 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
3398870
536 blockAndFunctionOffsets += module->functions.size();-
537-
538 for (int i = 0; i < module->classes.size(); ++i) {
i < module->classes.size()Description
TRUEevaluated 9277 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2337460 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
9277-2337460
539 const Class &c = module->classes.at(i);-
540 blockAndFunctionOffsets[i] = nextOffset;-
541-
542 nextOffset += QV4::CompiledData::Class::calculateSize(c.staticMethods.size(), c.methods.size());-
543 }
executed 9288 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
9288
544 blockAndFunctionOffsets += module->classes.size();-
545-
546 for (int i = 0; i < module->blocks.size(); ++i) {
i < module->blocks.size()Description
TRUEevaluated 345525 times by 40 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
FALSEevaluated 2336015 times by 146 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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
345525-2336015
547 Context *c = module->blocks.at(i);-
548 blockAndFunctionOffsets[i] = nextOffset;-
549-
550 nextOffset += QV4::CompiledData::Block::calculateSize(c->locals.size());-
551 }
executed 345627 times by 40 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
345627
552-
553 if (option == GenerateWithStringTable) {
option == Gene...ithStringTableDescription
TRUEevaluated 2289380 times by 31 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
FALSEevaluated 48529 times by 141 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • ...
48529-2289380
554 unit.stringTableSize = stringTable.stringCount();-
555 unit.offsetToStringTable = nextOffset;-
556 nextOffset += stringTable.sizeOfTableAndData();-
557 } else {
executed 2289805 times by 31 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
2289805
558 unit.stringTableSize = 0;-
559 unit.offsetToStringTable = 0;-
560 }
executed 48529 times by 141 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • ...
48529
561 unit.indexOfRootFunction = -1;-
562 unit.sourceFileIndex = getStringId(module->fileName);-
563 unit.finalUrlIndex = getStringId(module->finalUrl);-
564 unit.sourceTimeStamp = module->sourceTimeStamp.isValid() ? module->sourceTimeStamp.toMSecsSinceEpoch() : 0;
module->source...tamp.isValid()Description
TRUEevaluated 2742 times by 126 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • ...
FALSEevaluated 2332485 times by 70 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlmoduleplugin
  • tst_qqmlnativeconnector
  • ...
2742-2332485
565 unit.nImports = 0;-
566 unit.offsetToImports = 0;-
567 unit.nObjects = 0;-
568 unit.offsetToObjects = 0;-
569-
570 unit.unitSize = nextOffset;-
571-
572 return unit;
executed 2335178 times by 146 tests: return unit;
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_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • ...
2335178
573}-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0