OpenCoverage

qv4context.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4context.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 <QString>-
41#include "qv4debugging_p.h"-
42#include <qv4context_p.h>-
43#include <qv4object_p.h>-
44#include <qv4objectproto_p.h>-
45#include <private/qv4mm_p.h>-
46#include <qv4argumentsobject_p.h>-
47#include "qv4function_p.h"-
48#include "qv4errorobject_p.h"-
49#include "qv4string_p.h"-
50#include "qv4qmlcontext_p.h"-
51#include "qv4stackframe_p.h"-
52-
53using namespace QV4;-
54-
55DEFINE_MANAGED_VTABLE(ExecutionContext);-
56DEFINE_MANAGED_VTABLE(CallContext);-
57-
58Heap::CallContext *ExecutionContext::newBlockContext(CppStackFrame *frame, int blockIndex)-
59{-
60 Function *function = frame->v4Function;-
61-
62 Heap::InternalClass *ic = function->compilationUnit->runtimeBlocks.at(blockIndex);-
63 uint nLocals = ic->size;-
64 size_t requiredMemory = sizeof(CallContext::Data) - sizeof(Value) + sizeof(Value) * nLocals;-
65-
66 ExecutionEngine *v4 = function->internalClass->engine;-
67 Heap::CallContext *c = v4->memoryManager->allocManaged<CallContext>(requiredMemory, ic);-
68 c->init();-
69 c->type = Heap::ExecutionContext::Type_BlockContext;-
70-
71 Heap::ExecutionContext *outer = static_cast<Heap::ExecutionContext *>(frame->context()->m());-
72 c->outer.set(v4, outer);-
73 c->function.set(v4, static_cast<Heap::FunctionObject *>(frame->jsFrame->function.m()));-
74-
75 c->locals.size = nLocals;-
76 c->locals.alloc = nLocals;-
77-
78 return c;
executed 4346263 times by 13 tests: return c;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_qv4debugger
4346263
79}-
80-
81Heap::CallContext *ExecutionContext::cloneBlockContext(Heap::CallContext *context)-
82{-
83 uint nLocals = context->locals.alloc;-
84 size_t requiredMemory = sizeof(CallContext::Data) - sizeof(Value) + sizeof(Value) * nLocals;-
85-
86 ExecutionEngine *v4 = context->internalClass->engine;-
87 Heap::CallContext *c = v4->memoryManager->allocManaged<CallContext>(requiredMemory, context->internalClass);-
88 memcpy(c, context, requiredMemory);-
89-
90 return c;
executed 194 times by 2 tests: return c;
Executed by:
  • tst_ecmascripttests
  • tst_qv4debugger
194
91-
92}-
93-
94Heap::CallContext *ExecutionContext::newCallContext(CppStackFrame *frame)-
95{-
96 Function *function = frame->v4Function;-
97 Heap::ExecutionContext *outer = static_cast<Heap::ExecutionContext *>(frame->context()->m());-
98-
99 uint nFormals = qMax(static_cast<uint>(frame->originalArgumentsCount), function->nFormals);-
100 uint localsAndFormals = function->compiledFunction->nLocals + nFormals;-
101 size_t requiredMemory = sizeof(CallContext::Data) - sizeof(Value) + sizeof(Value) * (localsAndFormals);-
102-
103 ExecutionEngine *v4 = outer->internalClass->engine;-
104 Heap::CallContext *c = v4->memoryManager->allocManaged<CallContext>(requiredMemory, function->internalClass);-
105 c->init();-
106-
107 c->outer.set(v4, outer);-
108 c->function.set(v4, static_cast<Heap::FunctionObject *>(frame->jsFrame->function.m()));-
109-
110 const CompiledData::Function *compiledFunction = function->compiledFunction;-
111 uint nLocals = compiledFunction->nLocals;-
112 c->locals.size = nLocals;-
113 c->locals.alloc = localsAndFormals;-
114 // memory allocated from the JS heap is 0 initialized, so check if empty is 0-
115 Q_ASSERT(Primitive::undefinedValue().asReturnedValue() == 0);-
116-
117 Value *args = c->locals.values + nLocals;-
118 ::memcpy(args, frame->originalArguments, frame->originalArgumentsCount * sizeof(Value));-
119 c->nArgs = frame->originalArgumentsCount;-
120 for (uint i = frame->originalArgumentsCount; i < function->nFormals; ++i)
i < function->nFormalsDescription
TRUEevaluated 2412 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
FALSEevaluated 17898 times by 27 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickapplication
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquickworkerscript
  • ...
2412-17898
121 args[i] = Encode::undefined();
executed 2411 times by 8 tests: args[i] = Encode::undefined();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
2411
122-
123 return c;
executed 17894 times by 27 tests: return c;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickapplication
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquickworkerscript
  • ...
17894
124}-
125-
126Heap::ExecutionContext *ExecutionContext::newWithContext(Heap::Object *with)-
127{-
128 Heap::ExecutionContext *c = engine()->memoryManager->alloc<ExecutionContext>(Heap::ExecutionContext::Type_WithContext);-
129 c->outer.set(engine(), d());-
130 c->activation.set(engine(), with);-
131-
132 return c;
executed 657 times by 4 tests: return c;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qv4debugger
657
133}-
134-
135Heap::ExecutionContext *ExecutionContext::newCatchContext(CppStackFrame *frame, int blockIndex, Heap::String *exceptionVarName)-
136{-
137 Scope scope(frame->context());-
138 ScopedString name(scope, exceptionVarName);-
139 ScopedValue val(scope, scope.engine->catchException(nullptr));-
140 ScopedContext ctx(scope, newBlockContext(frame, blockIndex));-
141 ctx->setProperty(name, val);-
142 return ctx->d();
executed 4372343 times by 13 tests: return ctx->d();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_qv4debugger
4372343
143}-
144-
145void ExecutionContext::createMutableBinding(String *name, bool deletable)-
146{-
147 Scope scope(this);-
148-
149 // find the right context to create the binding on-
150 ScopedObject activation(scope);-
151 ScopedContext ctx(scope, this);-
152 while (ctx) {
ctxDescription
TRUEevaluated 542086 times by 21 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4assembler
  • tst_qv4debugger
  • tst_testfiltering
FALSEevaluated 517053 times by 21 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4assembler
  • tst_qv4debugger
  • tst_testfiltering
517053-542086
153 switch (ctx->d()->type) {-
154 case Heap::ExecutionContext::Type_CallContext:
executed 157 times by 1 test: case Heap::ExecutionContext::Type_CallContext:
Executed by:
  • tst_ecmascripttests
157
155 if (!activation) {
!activationDescription
TRUEevaluated 129 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
28-129
156 Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx->d());-
157 if (!c->activation)
!c->activationDescription
TRUEevaluated 127 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_ecmascripttests
2-127
158 c->activation.set(scope.engine, scope.engine->newObject());
executed 127 times by 1 test: c->activation.set(scope.engine, scope.engine->newObject());
Executed by:
  • tst_ecmascripttests
127
159 activation = c->activation;-
160 }
executed 130 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
130
161 break;
executed 158 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
158
162 case Heap::ExecutionContext::Type_QmlContext: {
executed 1484 times by 15 tests: case Heap::ExecutionContext::Type_QmlContext:
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1484
163 // this is ugly, as it overrides the inner callcontext, but has to stay as long-
164 // as bindings still get their own callcontext-
165 activation = ctx->d()->activation;-
166 break;
executed 1484 times by 15 tests: break;
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1484
167 }-
168 case Heap::ExecutionContext::Type_GlobalContext: {
executed 516251 times by 21 tests: case Heap::ExecutionContext::Type_GlobalContext:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4assembler
  • tst_qv4debugger
  • tst_testfiltering
516251
169 Q_ASSERT(scope.engine->globalObject->d() == ctx->d()->activation);-
170 if (!activation)
!activationDescription
TRUEevaluated 514605 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qv4assembler
  • tst_qv4debugger
FALSEevaluated 1614 times by 16 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1614-514605
171 activation = ctx->d()->activation;
executed 514575 times by 7 tests: activation = ctx->d()->activation;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qv4assembler
  • tst_qv4debugger
514575
172 break;
executed 516465 times by 21 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4assembler
  • tst_qv4debugger
  • tst_testfiltering
516465
173 }-
174 case Heap::ExecutionContext::Type_BlockContext:
executed 24308 times by 2 tests: case Heap::ExecutionContext::Type_BlockContext:
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
24308
175 // never create activation records on block contexts-
176 default:
never executed: default:
0
177 break;
executed 24304 times by 2 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
24304
178 }-
179 ctx = ctx->d()->outer;-
180 }
executed 543040 times by 21 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4assembler
  • tst_qv4debugger
  • tst_testfiltering
543040
181-
182 PropertyKey id = name->toPropertyKey();-
183 if (activation->getOwnProperty(id) != Attr_Invalid)
activation->ge...= Attr_InvalidDescription
TRUEevaluated 384 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 517358 times by 21 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4assembler
  • tst_qv4debugger
  • tst_testfiltering
384-517358
184 return;
executed 384 times by 2 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
384
185 ScopedProperty desc(scope);-
186 PropertyAttributes attrs(Attr_Data);-
187 attrs.setConfigurable(deletable);-
188 if (!activation->defineOwnProperty(id, desc, attrs))
!activation->d..., desc, attrs)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 517187 times by 21 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4assembler
  • tst_qv4debugger
  • tst_testfiltering
4-517187
189 scope.engine->throwTypeError();
executed 4 times by 1 test: scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
4
190}
executed 517200 times by 21 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4assembler
  • tst_qv4debugger
  • tst_testfiltering
517200
191-
192bool ExecutionContext::deleteProperty(String *name)-
193{-
194 PropertyKey id = name->toPropertyKey();-
195-
196 Heap::ExecutionContext *ctx = d();-
197 for (; ctx; ctx = ctx->outer) {
ctxDescription
TRUEevaluated 144 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_ecmascripttests
10-144
198 switch (ctx->type) {-
199 case Heap::ExecutionContext::Type_BlockContext:
never executed: case Heap::ExecutionContext::Type_BlockContext:
0
200 case Heap::ExecutionContext::Type_CallContext: {
executed 8 times by 1 test: case Heap::ExecutionContext::Type_CallContext:
Executed by:
  • tst_ecmascripttests
8
201 Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx);-
202 uint index = c->internalClass->find(id);-
203 if (index < UINT_MAX)
index < (0x7fffffff * 2U + 1U)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
4
204 // ### throw in strict mode?-
205 return false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
4
206 Q_FALLTHROUGH();-
207 }-
208 case Heap::ExecutionContext::Type_WithContext:
code before this statement executed 4 times by 1 test: case Heap::ExecutionContext::Type_WithContext:
Executed by:
  • tst_ecmascripttests
executed 75 times by 1 test: case Heap::ExecutionContext::Type_WithContext:
Executed by:
  • tst_ecmascripttests
4-75
209 case Heap::ExecutionContext::Type_GlobalContext: {
executed 61 times by 2 tests: case Heap::ExecutionContext::Type_GlobalContext:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
61
210 if (ctx->activation) {
ctx->activationDescription
TRUEevaluated 141 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEnever evaluated
0-141
211 Scope scope(this);-
212 ScopedObject object(scope, ctx->activation);-
213 if (object && object->hasProperty(name->toPropertyKey()))
object->hasPro...PropertyKey())Description
TRUEevaluated 129 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
12-129
214 return object->deleteProperty(name->toPropertyKey());
executed 128 times by 2 tests: return object->deleteProperty(name->toPropertyKey());
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
128
215 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
12
216 break;
executed 12 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
12
217 }-
218 case Heap::ExecutionContext::Type_QmlContext:
never executed: case Heap::ExecutionContext::Type_QmlContext:
0
219 // can't delete properties on qml objects-
220 break;
never executed: break;
0
221 }-
222 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
12
223-
224 return !engine()->currentStackFrame->v4Function->isStrict();
executed 10 times by 1 test: return !engine()->currentStackFrame->v4Function->isStrict();
Executed by:
  • tst_ecmascripttests
10
225}-
226-
227ExecutionContext::Error ExecutionContext::setProperty(String *name, const Value &value)-
228{-
229 PropertyKey id = name->toPropertyKey();-
230-
231 QV4::ExecutionEngine *v4 = engine();-
232 Heap::ExecutionContext *ctx = d();-
233-
234 for (; ctx; ctx = ctx->outer) {
ctxDescription
TRUEevaluated 77414331 times by 45 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickbehaviors
  • ...
FALSEevaluated 788 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
788-77414331
235 switch (ctx->type) {-
236 case Heap::ExecutionContext::Type_WithContext: {
executed 1531 times by 2 tests: case Heap::ExecutionContext::Type_WithContext:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
1531
237 Scope scope(v4);-
238 ScopedObject w(scope, ctx->activation);-
239 if (w->hasProperty(name->toPropertyKey())) {
w->hasProperty...PropertyKey())Description
TRUEevaluated 320 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 1209 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
320-1209
240 if (!w->put(name, value))
!w->put(name, value)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 318 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
2-318
241 return TypeError;
executed 2 times by 1 test: return TypeError;
Executed by:
  • tst_ecmascripttests
2
242 return NoError;
executed 318 times by 2 tests: return NoError;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
318
243 }-
244 break;
executed 1207 times by 2 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
1207
245 }-
246 case Heap::ExecutionContext::Type_BlockContext:
executed 4415313 times by 13 tests: case Heap::ExecutionContext::Type_BlockContext:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_qv4debugger
4415313
247 case Heap::ExecutionContext::Type_CallContext: {
executed 1618 times by 8 tests: case Heap::ExecutionContext::Type_CallContext:
Executed by:
  • tst_ecmascripttests
  • tst_qmlcachegen
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qquickapplication
  • tst_qquickitem2
  • tst_qquickstates
1618
248 Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx);-
249 uint index = c->internalClass->find(id);-
250 if (index < UINT_MAX) {
index < (0x7fffffff * 2U + 1U)Description
TRUEevaluated 4361107 times by 13 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_qv4debugger
FALSEevaluated 30452 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qmlcachegen
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qquickapplication
  • tst_qquickitem2
  • tst_qquickstates
  • tst_qv4debugger
30452-4361107
251 static_cast<Heap::CallContext *>(c)->locals.set(v4, index, value);-
252 return NoError;
executed 4373543 times by 13 tests: return NoError;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_qtqmlmodules
  • tst_qv4debugger
4373543
253 }-
254 }-
255 Q_FALLTHROUGH();-
256 case Heap::ExecutionContext::Type_GlobalContext:
code before this statement executed 30443 times by 9 tests: case Heap::ExecutionContext::Type_GlobalContext:
Executed by:
  • tst_ecmascripttests
  • tst_qmlcachegen
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qquickapplication
  • tst_qquickitem2
  • tst_qquickstates
  • tst_qv4debugger
executed 73171035 times by 7 tests: case Heap::ExecutionContext::Type_GlobalContext:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qv4assembler
  • tst_qv4debugger
30443-73171035
257 if (ctx->activation) {
ctx->activationDescription
TRUEevaluated 73043228 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qv4assembler
  • tst_qv4debugger
FALSEevaluated 30227 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qmlcachegen
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qquickapplication
  • tst_qquickitem2
  • tst_qquickstates
  • tst_qv4debugger
30227-73043228
258 uint member = ctx->activation->internalClass->find(id);-
259 if (member < UINT_MAX) {
member < (0x7f...fff * 2U + 1U)Description
TRUEevaluated 73174503 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qv4assembler
  • tst_qv4debugger
FALSEevaluated 870 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
870-73174503
260 Scope scope(v4);-
261 ScopedObject a(scope, ctx->activation);-
262 if (!a->putValue(member, value))
!a->putValue(member, value)Description
TRUEevaluated 240 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 72948698 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qv4assembler
  • tst_qv4debugger
240-72948698
263 return TypeError;
executed 240 times by 1 test: return TypeError;
Executed by:
  • tst_ecmascripttests
240
264 return NoError;
executed 72956395 times by 7 tests: return NoError;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qv4assembler
  • tst_qv4debugger
72956395
265 }-
266 }
executed 870 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
870
267 break;
executed 31118 times by 11 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qquickapplication
  • tst_qquickitem2
  • tst_qquickstates
  • tst_qv4debugger
31118
268 case Heap::ExecutionContext::Type_QmlContext: {
executed 42756 times by 36 tests: case Heap::ExecutionContext::Type_QmlContext:
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
42756
269 Scope scope(v4);-
270 ScopedObject activation(scope, ctx->activation);-
271 if (!activation->put(name, value))
!activation->put(name, value)Description
TRUEevaluated 14 times by 3 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qquickworkerscript
FALSEevaluated 42742 times by 35 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • ...
14-42742
272 return TypeError;
executed 14 times by 3 tests: return TypeError;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qquickworkerscript
14
273 return NoError;
executed 42742 times by 35 tests: return NoError;
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • ...
42742
274 }-
275 }-
276-
277 }
executed 32337 times by 11 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qquickapplication
  • tst_qquickitem2
  • tst_qquickstates
  • tst_qv4debugger
32337
278-
279 return RangeError;
executed 787 times by 3 tests: return RangeError;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
787
280}-
281-
282ReturnedValue ExecutionContext::getProperty(String *name)-
283{-
284 PropertyKey id = name->toPropertyKey();-
285-
286 Heap::ExecutionContext *ctx = d();-
287 for (; ctx; ctx = ctx->outer) {
ctxDescription
TRUEevaluated 5539835 times by 89 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • 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_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
FALSEevaluated 532 times by 14 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlqt
  • tst_qquickdesignersupport
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • tst_qv4debugger
532-5539835
288 switch (ctx->type) {-
289 case Heap::ExecutionContext::Type_BlockContext:
executed 1160 times by 8 tests: case Heap::ExecutionContext::Type_BlockContext:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickitem2
  • tst_qv4debugger
1160
290 case Heap::ExecutionContext::Type_CallContext: {
executed 7349 times by 22 tests: case Heap::ExecutionContext::Type_CallContext:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickapplication
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
7349
291 Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx);-
292-
293 uint index = c->internalClass->find(id);-
294 if (index < UINT_MAX)
index < (0x7fffffff * 2U + 1U)Description
TRUEevaluated 2500 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qmlcachegen
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qv4debugger
FALSEevaluated 6012 times by 22 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickapplication
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
2500-6012
295 return c->locals[index].asReturnedValue();
executed 2499 times by 6 tests: return c->locals[index].asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qmlcachegen
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qv4debugger
2499
296 Q_FALLTHROUGH();-
297 }-
298 case Heap::ExecutionContext::Type_WithContext:
code before this statement executed 6012 times by 22 tests: case Heap::ExecutionContext::Type_WithContext:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickapplication
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
executed 7588 times by 22 tests: case Heap::ExecutionContext::Type_WithContext:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickapplication
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
6012-7588
299 case Heap::ExecutionContext::Type_GlobalContext:
executed 3149933 times by 21 tests: case Heap::ExecutionContext::Type_GlobalContext:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_qv4debugger
3149933
300 case Heap::ExecutionContext::Type_QmlContext: {
executed 2379820 times by 84 tests: case Heap::ExecutionContext::Type_QmlContext:
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • ...
2379820
301 if (ctx->activation) {
ctx->activationDescription
TRUEevaluated 5531473 times by 89 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • 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_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
FALSEevaluated 5876 times by 22 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickapplication
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
5876-5531473
302 Scope scope(this);-
303 ScopedObject activation(scope, ctx->activation);-
304 bool hasProperty = false;-
305 ReturnedValue v = activation->get(id, nullptr, &hasProperty);-
306 if (hasProperty)
hasPropertyDescription
TRUEevaluated 5529962 times by 89 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • 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_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
FALSEevaluated 1518 times by 16 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qquickdesignersupport
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_qv4debugger
1518-5529962
307 return v;
executed 5529964 times by 89 tests: return v;
Executed by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • 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_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
5529964
308 }
executed 1518 times by 16 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qquickdesignersupport
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_qv4debugger
1518
309 break;
executed 7393 times by 28 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickapplication
  • tst_qquickdesignersupport
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquickvisualdatamodel
  • ...
7393
310 }-
311 }-
312 }
executed 7394 times by 28 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickapplication
  • tst_qquickdesignersupport
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquickvisualdatamodel
  • ...
7394
313 return engine()->throwReferenceError(*name);
executed 532 times by 14 tests: return engine()->throwReferenceError(*name);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlqt
  • tst_qquickdesignersupport
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • tst_qv4debugger
532
314}-
315-
316ReturnedValue ExecutionContext::getPropertyAndBase(String *name, Value *base)-
317{-
318 base->setM(nullptr);-
319 PropertyKey id = name->toPropertyKey();-
320-
321 Heap::ExecutionContext *ctx = d();-
322 for (; ctx; ctx = ctx->outer) {
ctxDescription
TRUEevaluated 1640850 times by 42 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltimer
  • tst_qqmltranslation
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • ...
FALSEevaluated 20 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qquickworkerscript
20-1640850
323 switch (ctx->type) {-
324 case Heap::ExecutionContext::Type_BlockContext:
executed 224 times by 2 tests: case Heap::ExecutionContext::Type_BlockContext:
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
224
325 case Heap::ExecutionContext::Type_CallContext: {
executed 5475 times by 12 tests: case Heap::ExecutionContext::Type_CallContext:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickworkerscript
5475
326 Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx);-
327-
328 uint index = c->internalClass->find(id);-
329 if (index < UINT_MAX)
index < (0x7fffffff * 2U + 1U)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5696 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickworkerscript
2-5696
330 return c->locals[index].asReturnedValue();
executed 2 times by 1 test: return c->locals[index].asReturnedValue();
Executed by:
  • tst_ecmascripttests
2
331 Q_FALLTHROUGH();-
332 }-
333 case Heap::ExecutionContext::Type_GlobalContext: {
code before this statement executed 5697 times by 12 tests: case Heap::ExecutionContext::Type_GlobalContext:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickworkerscript
executed 1582175 times by 8 tests: case Heap::ExecutionContext::Type_GlobalContext:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qquickworkerscript
  • tst_qv4debugger
5697-1582175
334 if (ctx->activation) {
ctx->activationDescription
TRUEevaluated 1582539 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qquickworkerscript
  • tst_qv4debugger
FALSEevaluated 5294 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickworkerscript
5294-1582539
335 Scope scope(this);-
336 ScopedObject activation(scope, ctx->activation);-
337 bool hasProperty = false;-
338 ReturnedValue v = activation->get(name, &hasProperty);-
339 if (hasProperty)
hasPropertyDescription
TRUEevaluated 1582391 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qv4debugger
FALSEevaluated 28 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qquickworkerscript
28-1582391
340 return v;
executed 1582183 times by 5 tests: return v;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qv4debugger
1582183
341 }
executed 28 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qquickworkerscript
28
342 break;
executed 5317 times by 13 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickworkerscript
5317
343 }-
344 case Heap::ExecutionContext::Type_WithContext:
executed 444 times by 2 tests: case Heap::ExecutionContext::Type_WithContext:
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
444
345 case Heap::ExecutionContext::Type_QmlContext: {
executed 52216 times by 39 tests: case Heap::ExecutionContext::Type_QmlContext:
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltimer
  • tst_qqmltranslation
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquickitem
  • ...
52216
346 Scope scope(this);-
347 ScopedObject o(scope, ctx->activation);-
348 bool hasProperty = false;-
349 ReturnedValue v = o->get(id, nullptr, &hasProperty);-
350 if (hasProperty) {
hasPropertyDescription
TRUEevaluated 50562 times by 40 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltimer
  • tst_qqmltranslation
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickgridview
  • ...
FALSEevaluated 2099 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qquickworkerscript
2099-50562
351 base->setM(o->d());-
352 return v;
executed 50562 times by 40 tests: return v;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltimer
  • tst_qqmltranslation
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickgridview
  • ...
50562
353 }-
354 break;
executed 2099 times by 6 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qquickworkerscript
2099
355 }-
356 }-
357 }
executed 7417 times by 13 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickworkerscript
7417
358 return engine()->throwReferenceError(*name);
executed 20 times by 6 tests: return engine()->throwReferenceError(*name);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qquickworkerscript
20
359}-
360-
361void Heap::CallContext::setArg(uint index, Value v)-
362{-
363 locals.set(internalClass->engine, locals.size + index, v);-
364}
executed 67 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
67
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0