OpenCoverage

qv4compilercontrolflow_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/compiler/qv4compilercontrolflow_p.h
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtQml module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39#ifndef QV4COMPILERCONTROLFLOW_P_H-
40#define QV4COMPILERCONTROLFLOW_P_H-
41-
42//-
43// W A R N I N G-
44// --------------
45//-
46// This file is not part of the Qt API. It exists purely as an-
47// implementation detail. This header file may change from version to-
48// version without notice, or even be removed.-
49//-
50// We mean it.-
51//-
52-
53#include <private/qv4global_p.h>-
54#include <private/qv4codegen_p.h>-
55#include <private/qqmljsast_p.h>-
56#include <private/qv4bytecodegenerator_p.h>-
57-
58QT_BEGIN_NAMESPACE-
59-
60namespace QV4 {-
61-
62namespace Compiler {-
63-
64struct ControlFlow {-
65 using Reference = Codegen::Reference;-
66 using BytecodeGenerator = Moth::BytecodeGenerator;-
67 using Instruction = Moth::Instruction;-
68-
69 enum Type {-
70 Loop,-
71 With,-
72 Block,-
73 Finally,-
74 Catch-
75 };-
76-
77 enum UnwindType {-
78 Break,-
79 Continue,-
80 Return-
81 };-
82-
83 struct UnwindTarget {-
84 BytecodeGenerator::Label linkLabel;-
85 int unwindLevel;-
86 };-
87-
88 Codegen *cg;-
89 ControlFlow *parent;-
90 Type type;-
91-
92 ControlFlow(Codegen *cg, Type type)-
93 : cg(cg), parent(cg->controlFlow), type(type)-
94 {-
95 cg->controlFlow = this;-
96 }
executed 1808077 times by 76 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
1808077
97-
98 virtual ~ControlFlow() {-
99 cg->controlFlow = parent;-
100 }
executed 1815632 times by 76 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
1815632
101-
102 UnwindTarget unwindTarget(UnwindType type, const QString &label = QString())-
103 {-
104 Q_ASSERT(type == Break || type == Continue || type == Return);-
105 ControlFlow *flow = this;-
106 int level = 0;-
107 while (flow) {
flowDescription
TRUEevaluated 553069 times by 28 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • ...
FALSEevaluated 501977 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • ...
501977-553069
108 BytecodeGenerator::Label l = flow->getUnwindTarget(type, label);-
109 if (l.isValid())
l.isValid()Description
TRUEevaluated 18110 times by 10 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 537738 times by 28 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • ...
18110-537738
110 return UnwindTarget{l, level};
executed 18112 times by 10 tests: return UnwindTarget{l, level};
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
18112
111 if (flow->requiresUnwind())
flow->requiresUnwind()Description
TRUEevaluated 82890 times by 13 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
FALSEevaluated 452832 times by 26 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • ...
82890-452832
112 ++level;
executed 82875 times by 13 tests: ++level;
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
82875
113 flow = flow->parent;-
114 }
executed 536372 times by 28 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • ...
536372
115 if (type == Return)
type == ReturnDescription
TRUEevaluated 502571 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • ...
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qjsengine
6-502571
116 return UnwindTarget{ cg->returnLabel(), level };
executed 505876 times by 27 tests: return UnwindTarget{ cg->returnLabel(), level };
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • ...
505876
117 return UnwindTarget();
executed 6 times by 1 test: return UnwindTarget();
Executed by:
  • tst_qjsengine
6
118 }-
119-
120 virtual QString label() const { return QString(); }
executed 282 times by 3 tests: return QString();
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
282
121-
122 bool hasLoop() const {-
123 const ControlFlow *flow = this;-
124 while (flow) {
flowDescription
TRUEevaluated 2190619 times by 76 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
FALSEevaluated 1672862 times by 76 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
1672862-2190619
125 if (flow->type == Loop)
flow->type == LoopDescription
TRUEevaluated 64236 times by 26 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_signalspy
  • ...
FALSEevaluated 2126927 times by 76 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
64236-2126927
126 return true;
executed 64244 times by 26 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_signalspy
  • ...
64244
127 flow = flow->parent;-
128 }
executed 2128177 times by 76 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
2128177
129 return false;
executed 1675981 times by 76 tests: return false;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
1675981
130 }-
131-
132protected:-
133 virtual BytecodeGenerator::Label getUnwindTarget(UnwindType, const QString & = QString()) {-
134 return BytecodeGenerator::Label();
executed 532531 times by 28 tests: return BytecodeGenerator::Label();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • ...
532531
135 }-
136 virtual bool requiresUnwind() {-
137 return false;
never executed: return false;
0
138 }-
139-
140public:-
141 BytecodeGenerator::ExceptionHandler *parentUnwindHandler() {-
142 return parent ? parent->unwindHandler() : nullptr;
executed 160405 times by 22 tests: return parent ? parent->unwindHandler() : nullptr;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
160405
143 }-
144-
145 virtual BytecodeGenerator::ExceptionHandler *unwindHandler() {-
146 return parentUnwindHandler();
never executed: return parentUnwindHandler();
0
147 }-
148-
149-
150protected:-
151 QString loopLabel() const {-
152 QString label;-
153 if (cg->_labelledStatement) {
cg->_labelledStatementDescription
TRUEevaluated 603 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
FALSEevaluated 29962 times by 32 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
  • ...
603-29962
154 label = cg->_labelledStatement->label.toString();-
155 cg->_labelledStatement = nullptr;-
156 }
executed 603 times by 5 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
603
157 return label;
executed 30522 times by 32 tests: return label;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
  • ...
30522
158 }-
159 BytecodeGenerator *generator() const {-
160 return cg->bytecodeGenerator;
executed 862770 times by 22 tests: return cg->bytecodeGenerator;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
862770
161 }-
162};-
163-
164struct ControlFlowUnwind : public ControlFlow-
165{-
166 BytecodeGenerator::ExceptionHandler unwindLabel;-
167-
168 ControlFlowUnwind(Codegen *cg, Type type)-
169 : ControlFlow(cg, type)-
170 {-
171 }
executed 1813663 times by 76 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
1813663
172-
173 void setupUnwindHandler()-
174 {-
175 unwindLabel = generator()->newExceptionHandler();-
176 }
executed 129245 times by 22 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
129245
177-
178 void emitUnwindHandler()-
179 {-
180 Q_ASSERT(requiresUnwind());-
181-
182 Instruction::UnwindDispatch dispatch;-
183 generator()->addInstruction(dispatch);-
184 }
executed 129947 times by 22 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
129947
185-
186 virtual BytecodeGenerator::ExceptionHandler *unwindHandler() override {-
187 return unwindLabel.isValid() ? &unwindLabel : parentUnwindHandler();
executed 31337 times by 17 tests: return unwindLabel.isValid() ? &unwindLabel : parentUnwindHandler();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
31337
188 }-
189};-
190-
191struct ControlFlowLoop : public ControlFlowUnwind-
192{-
193 QString loopLabel;-
194 BytecodeGenerator::Label *breakLabel = nullptr;-
195 BytecodeGenerator::Label *continueLabel = nullptr;-
196 bool _requiresUnwind;-
197-
198 ControlFlowLoop(Codegen *cg, BytecodeGenerator::Label *breakLabel, BytecodeGenerator::Label *continueLabel = nullptr, bool requiresUnwind = false)-
199 : ControlFlowUnwind(cg, Loop), loopLabel(ControlFlow::loopLabel()), breakLabel(breakLabel), continueLabel(continueLabel), _requiresUnwind(requiresUnwind)-
200 {-
201 if (_requiresUnwind) {
_requiresUnwindDescription
TRUEevaluated 13449 times by 13 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
FALSEevaluated 17157 times by 30 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • ...
13449-17157
202 setupUnwindHandler();-
203 generator()->setUnwindHandler(&unwindLabel);-
204 }
executed 13484 times by 13 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
13484
205 }
executed 30661 times by 32 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
  • ...
30661
206-
207 ~ControlFlowLoop() {-
208 if (_requiresUnwind) {
_requiresUnwindDescription
TRUEevaluated 13528 times by 13 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
FALSEevaluated 17131 times by 30 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • ...
13528-17131
209 unwindLabel.link();-
210 generator()->setUnwindHandler(parentUnwindHandler());-
211 emitUnwindHandler();-
212 }
executed 13554 times by 13 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
13554
213 }
executed 30714 times by 32 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
  • ...
30714
214-
215 bool requiresUnwind() override {-
216 return _requiresUnwind;
executed 15651 times by 16 tests: return _requiresUnwind;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
15651
217 }-
218-
219 BytecodeGenerator::Label getUnwindTarget(UnwindType type, const QString &label) override {-
220 switch (type) {-
221 case Break:
executed 17118 times by 9 tests: case Break:
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
17118
222 if (breakLabel && (label.isEmpty() || label == loopLabel))
breakLabelDescription
TRUEevaluated 17168 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEnever evaluated
label.isEmpty()Description
TRUEevaluated 16945 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 248 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
label == loopLabelDescription
TRUEevaluated 160 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
FALSEevaluated 88 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
0-17168
223 return *breakLabel;
executed 17029 times by 9 tests: return *breakLabel;
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
17029
224 break;
executed 88 times by 2 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
88
225 case Continue:
executed 1212 times by 9 tests: case Continue:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1212
226 if (continueLabel && (label.isEmpty() || label == loopLabel))
continueLabelDescription
TRUEevaluated 1086 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 126 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
label.isEmpty()Description
TRUEevaluated 826 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 262 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
label == loopLabelDescription
TRUEevaluated 152 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
FALSEevaluated 110 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
110-1086
227 return *continueLabel;
executed 976 times by 9 tests: return *continueLabel;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
976
228 break;
executed 236 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
236
229 default:
executed 1778 times by 14 tests: default:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1778
230 break;
executed 1777 times by 14 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1777
231 }-
232 return BytecodeGenerator::Label();
executed 2102 times by 14 tests: return BytecodeGenerator::Label();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_testfiltering
2102
233 }-
234-
235 QString label() const override { return loopLabel; }
executed 170 times by 3 tests: return loopLabel;
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
170
236};-
237-
238-
239struct ControlFlowWith : public ControlFlowUnwind-
240{-
241 ControlFlowWith(Codegen *cg)-
242 : ControlFlowUnwind(cg, With)-
243 {-
244 setupUnwindHandler();-
245-
246 // assumes the with object is in the accumulator-
247 Instruction::PushWithContext pushScope;-
248 generator()->addInstruction(pushScope);-
249 generator()->setUnwindHandler(&unwindLabel);-
250 }
executed 818 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qv4debugger
818
251-
252 ~ControlFlowWith() {-
253 // emit code for unwinding-
254 unwindLabel.link();-
255-
256 generator()->setUnwindHandler(parentUnwindHandler());-
257 Instruction::PopContext pop;-
258 generator()->addInstruction(pop);-
259-
260 emitUnwindHandler();-
261 }
executed 819 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qv4debugger
819
262-
263 bool requiresUnwind() override {-
264 return true;
executed 893 times by 6 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qv4debugger
893
265 }-
266-
267-
268};-
269-
270struct ControlFlowBlock : public ControlFlowUnwind-
271{-
272 ControlFlowBlock(Codegen *cg, AST::Node *ast)-
273 : ControlFlowUnwind(cg, Block)-
274 {-
275 block = cg->enterBlock(ast);-
276 block->emitBlockHeader(cg);-
277-
278 if (block->requiresExecutionContext) {
block->require...ecutionContextDescription
TRUEevaluated 825 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qv4debugger
FALSEevaluated 1666518 times by 75 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
825-1666518
279 setupUnwindHandler();-
280 generator()->setUnwindHandler(&unwindLabel);-
281 }
executed 825 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qv4debugger
825
282 }
executed 1664723 times by 76 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
1664723
283-
284 virtual ~ControlFlowBlock() {-
285 // emit code for unwinding-
286 if (block->requiresExecutionContext) {
block->require...ecutionContextDescription
TRUEevaluated 826 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qv4debugger
FALSEevaluated 1666009 times by 75 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
826-1666009
287 unwindLabel.link();-
288 generator()->setUnwindHandler(parentUnwindHandler());-
289 }
executed 826 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qv4debugger
826
290-
291 block->emitBlockFooter(cg);-
292-
293 if (block->requiresExecutionContext )
block->require...ecutionContextDescription
TRUEevaluated 825 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qv4debugger
FALSEevaluated 1670661 times by 75 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
825-1670661
294 emitUnwindHandler();
executed 825 times by 3 tests: emitUnwindHandler();
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qv4debugger
825
295 cg->leaveBlock();-
296 }
executed 1669689 times by 76 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
1669689
297-
298 virtual bool requiresUnwind() override {-
299 return block->requiresExecutionContext;
executed 450006 times by 27 tests: return block->requiresExecutionContext;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • ...
450006
300 }-
301-
302 Context *block;-
303};-
304-
305struct ControlFlowCatch : public ControlFlowUnwind-
306{-
307 AST::Catch *catchExpression;-
308 bool insideCatch = false;-
309 BytecodeGenerator::ExceptionHandler exceptionLabel;-
310 bool oldLookupByName;-
311-
312 ControlFlowCatch(Codegen *cg, AST::Catch *catchExpression)-
313 : ControlFlowUnwind(cg, Catch), catchExpression(catchExpression),-
314 exceptionLabel(generator()->newExceptionHandler())-
315 {-
316 generator()->setUnwindHandler(&exceptionLabel);-
317 }
executed 113791 times by 21 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
113791
318-
319 virtual bool requiresUnwind() override {-
320 return true;
executed 194657 times by 21 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
194657
321 }-
322-
323 BytecodeGenerator::ExceptionHandler *unwindHandler() override {-
324 return insideCatch ? &unwindLabel : &exceptionLabel;
executed 315 times by 5 tests: return insideCatch ? &unwindLabel : &exceptionLabel;
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qv4debugger
315
325 }-
326-
327 ~ControlFlowCatch() {-
328 // emit code for unwinding-
329 insideCatch = true;-
330 setupUnwindHandler();-
331-
332 Codegen::RegisterScope scope(cg);-
333-
334 // exceptions inside the try block go here-
335 exceptionLabel.link();-
336 BytecodeGenerator::Jump noException = generator()->jumpNoException();-
337-
338 Context *block = cg->enterBlock(catchExpression);-
339-
340 block->emitBlockHeader(cg);-
341-
342 generator()->setUnwindHandler(&unwindLabel);-
343-
344 if (catchExpression->patternElement->bindingIdentifier.isEmpty())
catchExpressio...fier.isEmpty()Description
TRUEevaluated 334 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 113694 times by 21 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
334-113694
345 // destructuring pattern-
346 cg->initializeAndDestructureBindingElement(catchExpression->patternElement, Reference::fromName(cg, QStringLiteral("@caught")));
executed 334 times by 1 test: cg->initializeAndDestructureBindingElement(catchExpression->patternElement, Reference::fromName(cg, ([]() noexcept -> QString { enum { Size = sizeof(u"" "@caught")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "@caught" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
Executed by:
  • tst_ecmascripttests
executed 334 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
334
347 // skip the additional block-
348 cg->statementList(catchExpression->statement->statements);-
349-
350 // exceptions inside catch and break/return statements go here-
351 unwindLabel.link();-
352 block->emitBlockFooter(cg);-
353-
354 cg->leaveBlock();-
355-
356 noException.link();-
357 generator()->setUnwindHandler(parentUnwindHandler());-
358-
359 emitUnwindHandler();-
360 insideCatch = false;-
361 }
executed 113700 times by 21 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
113700
362};-
363-
364struct ControlFlowFinally : public ControlFlowUnwind-
365{-
366 AST::Finally *finally;-
367 bool insideFinally = false;-
368-
369 ControlFlowFinally(Codegen *cg, AST::Finally *finally)-
370 : ControlFlowUnwind(cg, Finally), finally(finally)-
371 {-
372 Q_ASSERT(finally != nullptr);-
373 setupUnwindHandler();-
374 generator()->setUnwindHandler(&unwindLabel);-
375 }
executed 825 times by 5 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
825
376-
377 virtual bool requiresUnwind() override {-
378 return !insideFinally;
executed 1350 times by 5 tests: return !insideFinally;
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
1350
379 }-
380-
381 BytecodeGenerator::ExceptionHandler *unwindHandler() override {-
382 return insideFinally ? parentUnwindHandler() : ControlFlowUnwind::unwindHandler();
executed 513 times by 5 tests: return insideFinally ? parentUnwindHandler() : ControlFlowUnwind::unwindHandler();
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
513
383 }-
384-
385 ~ControlFlowFinally() {-
386 // emit code for unwinding-
387 unwindLabel.link();-
388-
389 Codegen::RegisterScope scope(cg);-
390-
391 insideFinally = true;-
392 int returnValueTemp = -1;-
393 if (cg->requiresReturnValue) {
cg->requiresReturnValueDescription
TRUEevaluated 134 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
FALSEevaluated 692 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsvalue
134-692
394 returnValueTemp = generator()->newRegister();-
395 Instruction::MoveReg move;-
396 move.srcReg = cg->_returnAddress;-
397 move.destReg = returnValueTemp;-
398 generator()->addInstruction(move);-
399 }
executed 134 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
134
400 int exceptionTemp = generator()->newRegister();-
401 Instruction::GetException instr;-
402 generator()->addInstruction(instr);-
403 Reference::fromStackSlot(cg, exceptionTemp).storeConsumeAccumulator();-
404-
405 generator()->setUnwindHandler(parentUnwindHandler());-
406 cg->statement(finally->statement);-
407 insideFinally = false;-
408-
409 if (cg->requiresReturnValue) {
cg->requiresReturnValueDescription
TRUEevaluated 134 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
FALSEevaluated 692 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsvalue
134-692
410 Instruction::MoveReg move;-
411 move.srcReg = returnValueTemp;-
412 move.destReg = cg->_returnAddress;-
413 generator()->addInstruction(move);-
414 }
executed 134 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
134
415 Reference::fromStackSlot(cg, exceptionTemp).loadInAccumulator();-
416 Instruction::SetException setException;-
417 generator()->addInstruction(setException);-
418-
419 emitUnwindHandler();-
420 }
executed 826 times by 5 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
826
421};-
422-
423} } // QV4::Compiler namespace-
424-
425QT_END_NAMESPACE-
426-
427#endif-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0