OpenCoverage

qv4arraydata.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4arraydata.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3using namespace QV4;-
4-
5const QV4::VTable ArrayData::static_vtbl = { 0, (sizeof(ArrayData::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(ArrayData::Data) + (ArrayData::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(ArrayData::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), ArrayData::IsExecutionContext, ArrayData::IsString, ArrayData::IsObject, ArrayData::IsFunctionObject, ArrayData::IsErrorObject, ArrayData::IsArrayData, ArrayData::IsStringOrSymbol, ArrayData::MyType, { 0, 0, 0, 0 }, "ArrayData", ArrayData::virtualDestroy, ArrayData::Data::markObjects, ArrayData::virtualIsEqualTo, ArrayData::virtualGet, ArrayData::virtualPut, ArrayData::virtualDeleteProperty, ArrayData::virtualHasProperty, ArrayData::virtualGetOwnProperty, ArrayData::virtualDefineOwnProperty, ArrayData::virtualIsExtensible, ArrayData::virtualPreventExtensions, ArrayData::virtualGetPrototypeOf, ArrayData::virtualSetPrototypeOf, ArrayData::virtualGetLength, ArrayData::virtualAdvanceIterator, ArrayData::virtualInstanceOf, ArrayData::virtualCall, ArrayData::virtualCallAsConstructor, };-
6-
7const ArrayVTable SimpleArrayData::static_vtbl =-
8{-
9 { nullptr, (sizeof(SimpleArrayData::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(SimpleArrayData::Data) + (SimpleArrayData::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(SimpleArrayData::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), SimpleArrayData::IsExecutionContext, SimpleArrayData::IsString, SimpleArrayData::IsObject, SimpleArrayData::IsFunctionObject, SimpleArrayData::IsErrorObject, SimpleArrayData::IsArrayData, SimpleArrayData::IsStringOrSymbol, SimpleArrayData::MyType, { 0, 0, 0, 0 }, "SimpleArrayData", SimpleArrayData::virtualDestroy, SimpleArrayData::Data::markObjects, SimpleArrayData::virtualIsEqualTo, SimpleArrayData::virtualGet, SimpleArrayData::virtualPut, SimpleArrayData::virtualDeleteProperty, SimpleArrayData::virtualHasProperty, SimpleArrayData::virtualGetOwnProperty, SimpleArrayData::virtualDefineOwnProperty, SimpleArrayData::virtualIsExtensible, SimpleArrayData::virtualPreventExtensions, SimpleArrayData::virtualGetPrototypeOf, SimpleArrayData::virtualSetPrototypeOf, SimpleArrayData::virtualGetLength, SimpleArrayData::virtualAdvanceIterator, SimpleArrayData::virtualInstanceOf, SimpleArrayData::virtualCall, SimpleArrayData::virtualCallAsConstructor, },-
10 Heap::ArrayData::Simple,-
11 SimpleArrayData::reallocate,-
12 SimpleArrayData::get,-
13 SimpleArrayData::put,-
14 SimpleArrayData::putArray,-
15 SimpleArrayData::del,-
16 SimpleArrayData::setAttribute,-
17 SimpleArrayData::push_front,-
18 SimpleArrayData::pop_front,-
19 SimpleArrayData::truncate,-
20 SimpleArrayData::length-
21};-
22-
23const ArrayVTable SparseArrayData::static_vtbl =-
24{-
25 { nullptr, (sizeof(SparseArrayData::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(SparseArrayData::Data) + (SparseArrayData::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(SparseArrayData::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), SparseArrayData::IsExecutionContext, SparseArrayData::IsString, SparseArrayData::IsObject, SparseArrayData::IsFunctionObject, SparseArrayData::IsErrorObject, SparseArrayData::IsArrayData, SparseArrayData::IsStringOrSymbol, SparseArrayData::MyType, { 0, 0, 0, 0 }, "SparseArrayData", SparseArrayData::virtualDestroy, SparseArrayData::Data::markObjects, SparseArrayData::virtualIsEqualTo, SparseArrayData::virtualGet, SparseArrayData::virtualPut, SparseArrayData::virtualDeleteProperty, SparseArrayData::virtualHasProperty, SparseArrayData::virtualGetOwnProperty, SparseArrayData::virtualDefineOwnProperty, SparseArrayData::virtualIsExtensible, SparseArrayData::virtualPreventExtensions, SparseArrayData::virtualGetPrototypeOf, SparseArrayData::virtualSetPrototypeOf, SparseArrayData::virtualGetLength, SparseArrayData::virtualAdvanceIterator, SparseArrayData::virtualInstanceOf, SparseArrayData::virtualCall, SparseArrayData::virtualCallAsConstructor, },-
26 Heap::ArrayData::Sparse,-
27 SparseArrayData::reallocate,-
28 SparseArrayData::get,-
29 SparseArrayData::put,-
30 SparseArrayData::putArray,-
31 SparseArrayData::del,-
32 SparseArrayData::setAttribute,-
33 SparseArrayData::push_front,-
34 SparseArrayData::pop_front,-
35 SparseArrayData::truncate,-
36 SparseArrayData::length-
37};-
38-
39static_assert(bool(sizeof(Heap::ArrayData) == sizeof(Heap::SimpleArrayData)), "sizeof(Heap::ArrayData) == sizeof(Heap::SimpleArrayData)");-
40static_assert(bool(sizeof(Heap::ArrayData) == sizeof(Heap::SparseArrayData)), "sizeof(Heap::ArrayData) == sizeof(Heap::SparseArrayData)");-
41-
42void Heap::ArrayData::markObjects(Heap::Base *base, MarkStack *stack)-
43{-
44 ArrayData *a = static_cast<ArrayData *>(base);-
45 a->values.mark(stack);-
46}
executed 13121 times by 11 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_quicktestmainwithsetup
  • tst_testfiltering
13121
47-
48-
49void ArrayData::realloc(Object *o, Type newType, uint requested, bool enforceAttributes)-
50{-
51 Scope scope(o->engine());-
52 Scoped<ArrayData> d(scope, o->arrayData());-
53-
54 uint alloc = 8;-
55 uint toCopy = 0;-
56 uint offset = 0;-
57-
58 if (d
dDescription
TRUEevaluated 22063 times by 16 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickworkerscript
  • tst_qv4debugger
FALSEevaluated 71822 times by 51 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
) {
22063-71822
59 bool hasAttrs = d->attrs();-
60 enforceAttributes |= hasAttrs;-
61-
62 if (requested <= d->alloc()
requested <= d->alloc()Description
TRUEevaluated 13353 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickworkerscript
FALSEevaluated 8704 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
&& newType == d->type()
newType == d->type()Description
TRUEevaluated 8014 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickworkerscript
FALSEevaluated 5342 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
&& hasAttrs == enforceAttributes
hasAttrs == enforceAttributesDescription
TRUEevaluated 7193 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickworkerscript
FALSEevaluated 823 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
823-13353
63 return;
executed 7193 times by 7 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlxmlhttprequest
  • tst_qquickworkerscript
7193
64 if (alloc < d->alloc()
alloc < d->alloc()Description
TRUEevaluated 2280 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquickpositioners
  • tst_qv4debugger
FALSEevaluated 12598 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
)
2280-12598
65 alloc = d->alloc();
executed 2280 times by 7 tests: alloc = d->alloc();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquickpositioners
  • tst_qv4debugger
2280
66-
67 if (d->type() < Heap::ArrayData::Sparse
d->type() < He...ayData::SparseDescription
TRUEevaluated 9663 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
FALSEevaluated 5211 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
5211-9663
68 offset = d->d()->offset;-
69 toCopy = d->d()->values.size;-
70 }
executed 9668 times by 12 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
else {
9668
71 toCopy = d->alloc();-
72 }
executed 5211 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
5211
73 if (d->type() > newType
d->type() > newTypeDescription
TRUEevaluated 2631 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 12250 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
)
2631-12250
74 newType = d->type();
executed 2631 times by 1 test: newType = d->type();
Executed by:
  • tst_ecmascripttests
2631
75 }
executed 14875 times by 12 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
14875
76 if (enforceAttributes
enforceAttributesDescription
TRUEevaluated 6517 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 80174 times by 51 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
&& newType == Heap::ArrayData::Simple
newType == Hea...ayData::SimpleDescription
TRUEevaluated 822 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5699 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
822-80174
77 newType = Heap::ArrayData::Complex;
executed 818 times by 1 test: newType = Heap::ArrayData::Complex;
Executed by:
  • tst_ecmascripttests
818
78-
79 while (alloc < requested
alloc < requestedDescription
TRUEevaluated 10480 times by 13 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
FALSEevaluated 86694 times by 51 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
)
10480-86694
80 alloc *= 2;
executed 10482 times by 13 tests: alloc *= 2;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
10482
81 size_t size = sizeof(Heap::ArrayData) + (alloc - 1)*sizeof(Value);-
82 if (enforceAttributes
enforceAttributesDescription
TRUEevaluated 6516 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 80185 times by 51 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
)
6516-80185
83 size += alloc*sizeof(PropertyAttributes);
executed 6521 times by 1 test: size += alloc*sizeof(PropertyAttributes);
Executed by:
  • tst_ecmascripttests
6521
84-
85 Scoped<ArrayData> newData(scope);-
86 if (newType < Heap::ArrayData::Sparse
newType < Heap...ayData::SparseDescription
TRUEevaluated 78286 times by 51 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
FALSEevaluated 8394 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
) {
8394-78286
87 Heap::SimpleArrayData *n = scope.engine->memoryManager->allocManaged<SimpleArrayData>(size);-
88 n->init();-
89 n->offset = 0;-
90 n->values.size = d
dDescription
TRUEevaluated 6951 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
FALSEevaluated 71343 times by 51 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
? d->d()->values.size : 0;
6951-71343
91 newData = n;-
92 }
executed 78312 times by 51 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
else {
78312
93 Heap::SparseArrayData *n = scope.engine->memoryManager->allocManaged<SparseArrayData>(size);-
94 n->init();-
95 newData = n;-
96 }
executed 8404 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
8404
97 newData->setAlloc(alloc);-
98 newData->setType(newType);-
99 newData->setAttrs(enforceAttributes ? reinterpret_cast<PropertyAttributes *>(newData->d()->values.values + alloc) : nullptr);-
100 o->setArrayData(newData);-
101-
102 if (d
dDescription
TRUEevaluated 14888 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
FALSEevaluated 71885 times by 51 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
) {
14888-71885
103 if (enforceAttributes
enforceAttributesDescription
TRUEevaluated 6079 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 8807 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
) {
6079-8807
104 if (d->attrs()
d->attrs()Description
TRUEevaluated 2649 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3434 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
2649-3434
105 memcpy(newData->attrs(), d->attrs(), sizeof(PropertyAttributes)*toCopy);
executed 2649 times by 1 test: memcpy(newData->attrs(), d->attrs(), sizeof(PropertyAttributes)*toCopy);
Executed by:
  • tst_ecmascripttests
2649
106 else-
107 for (uint i = 0; i < toCopy
i < toCopyDescription
TRUEevaluated 25822 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3426 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; ++i)
3426-25822
108 newData->attrs()[i] = Attr_Data;
executed 25820 times by 1 test: newData->attrs()[i] = Attr_Data;
Executed by:
  • tst_ecmascripttests
25820
109 }
executed 6072 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
6072
110-
111 if (toCopy > d->d()->values.alloc - offset
toCopy > d->d(...alloc - offsetDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 14861 times by 12 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
) {
24-14861
112 uint copyFromStart = toCopy - (d->d()->values.alloc - offset);-
113-
114 memcpy(newData->d()->values.values + toCopy - copyFromStart, d->d()->values.values, sizeof(Value)*copyFromStart);-
115 toCopy -= copyFromStart;-
116 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_qqmlecmascript
24
117-
118 memcpy(newData->d()->values.values, d->d()->values.values + offset, sizeof(Value)*toCopy);-
119 }
executed 14871 times by 12 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qv4debugger
14871
120-
121 if (newType != Heap::ArrayData::Sparse
newType != Hea...ayData::SparseDescription
TRUEevaluated 78282 times by 51 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
FALSEevaluated 8403 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
)
8403-78282
122 return;
executed 78280 times by 51 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
78280
123-
124 Heap::SparseArrayData *sparse = static_cast<Heap::SparseArrayData *>(newData->d());-
125-
126 Value *lastFree;-
127 if (d && d->type() == Heap::ArrayData::Sparse
d->type() == H...ayData::SparseDescription
TRUEevaluated 5213 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2718 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
) {
2718-5213
128 Heap::SparseArrayData *old = static_cast<Heap::SparseArrayData *>(d->d());-
129 sparse->sparse = old->sparse;-
130 old->sparse = nullptr;-
131 lastFree = &sparse->sparse->freeList;-
132 }
executed 5215 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
else {
5215
133 sparse->sparse = new SparseArray;-
134 lastFree = &sparse->sparse->freeList;-
135 *lastFree = Encode(0);-
136 for (uint i = 0; i < toCopy
i < toCopyDescription
TRUEevaluated 21077 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3183 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
; ++i) {
3183-21077
137 if (!sparse->values[i].isEmpty()
!sparse->values[i].isEmpty()Description
TRUEevaluated 2563 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 18514 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
2563-18514
138 SparseArrayNode *n = sparse->sparse->insert(i);-
139 n->value = i;-
140 }
executed 2565 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
else {
2565
141 *lastFree = Encode(i);-
142 sparse->values.values[i].setEmpty();-
143 lastFree = &sparse->values.values[i];-
144 }
executed 18516 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
18516
145 }-
146 }
executed 3183 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
3183
147-
148 if (toCopy < sparse->values.alloc
toCopy < sparse->values.allocDescription
TRUEevaluated 5790 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
FALSEevaluated 2609 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
2609-5790
149 for (uint i = toCopy; i < sparse->values.alloc
i < sparse->values.allocDescription
TRUEevaluated 4237763 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
FALSEevaluated 5801 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
; ++i) {
5801-4237763
150 *lastFree = Encode(i);-
151 sparse->values.values[i].setEmpty();-
152 lastFree = &sparse->values.values[i];-
153 }
executed 4237749 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
4237749
154 }
executed 5804 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
5804
155 *lastFree = Encode(-1);-
156-
157 ((sparse->sparse->freeList.isInteger()) ? static_cast<void>(0) : qt_assert("sparse->sparse->freeList.isInteger()", __FILE__, 202));-
158-
159}
executed 8406 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
8406
160-
161Heap::ArrayData *SimpleArrayData::reallocate(Object *o, uint n, bool enforceAttributes)-
162{-
163 realloc(o, Heap::ArrayData::Simple, n, enforceAttributes);-
164 return
executed 5858 times by 8 tests: return o->arrayData();
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
o->arrayData();
executed 5858 times by 8 tests: return o->arrayData();
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
5858
165}-
166-
167void ArrayData::ensureAttributes(Object *o)-
168{-
169 if (o->arrayData()
o->arrayData()Description
TRUEevaluated 5987 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
&& o->arrayData()->attrs
o->arrayData()->attrsDescription
TRUEevaluated 2572 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3423 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-5987
170 return;
executed 2572 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
2572
171-
172 ArrayData::realloc(o, Heap::ArrayData::Simple, 0, true);-
173}
executed 3415 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
3415
174-
175ReturnedValue SimpleArrayData::get(const Heap::ArrayData *d, uint index)-
176{-
177 const Heap::SimpleArrayData *dd = static_cast<const Heap::SimpleArrayData *>(d);-
178 if (index >= dd->values.size
index >= dd->values.sizeDescription
TRUEevaluated 70340 times by 16 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
FALSEevaluated 8454 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8454-70340
179 return
executed 70338 times by 16 tests: return Primitive::emptyValue().asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
Primitive::emptyValue().asReturnedValue();
executed 70338 times by 16 tests: return Primitive::emptyValue().asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlapplicationengine
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
70338
180 return
executed 8454 times by 1 test: return dd->data(index).asReturnedValue();
Executed by:
  • tst_ecmascripttests
dd->data(index).asReturnedValue();
executed 8454 times by 1 test: return dd->data(index).asReturnedValue();
Executed by:
  • tst_ecmascripttests
8454
181}-
182-
183bool SimpleArrayData::put(Object *o, uint index, const Value &value)-
184{-
185 Heap::SimpleArrayData *dd = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
186 ((index >= dd->values.size || !dd->attrs || !dd->attrs[index].isAccessor()) ? static_cast<void>(0) : qt_assert("index >= dd->values.size || !dd->attrs || !dd->attrs[index].isAccessor()", __FILE__, 231));-
187-
188 dd->setData(o->engine(), index, value);-
189 if (index >= dd->values.size
index >= dd->values.sizeDescription
TRUEevaluated 21288 times by 19 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlsettings
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickmultipointtoucharea
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEnever evaluated
) {
0-21288
190 if (dd->attrs
dd->attrsDescription
TRUEnever evaluated
FALSEevaluated 21308 times by 19 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlsettings
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickmultipointtoucharea
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_testfiltering
)
0-21308
191 dd->attrs[index] = Attr_Data;
never executed: dd->attrs[index] = Attr_Data;
0
192 dd->values.size = index + 1;-
193 }
executed 21292 times by 19 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlsettings
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickmultipointtoucharea
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_testfiltering
21292
194 return
executed 21301 times by 19 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlsettings
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickmultipointtoucharea
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_testfiltering
true;
executed 21301 times by 19 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlsettings
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickmultipointtoucharea
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
  • tst_testfiltering
21301
195}-
196-
197bool SimpleArrayData::del(Object *o, uint index)-
198{-
199 Heap::SimpleArrayData *dd = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
200 if (index >= dd->values.size
index >= dd->values.sizeDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1626 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
)
16-1626
201 return
executed 16 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
true;
executed 16 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
16
202-
203 if (!dd->attrs
!dd->attrsDescription
TRUEevaluated 1202 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 425 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| dd->attrs[index].isConfigurable()
dd->attrs[inde...Configurable()Description
TRUEevaluated 82 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 351 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
82-1202
204 dd->setData(o->engine(), index, Primitive::emptyValue());-
205 if (dd->attrs
dd->attrsDescription
TRUEevaluated 82 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1205 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
)
82-1205
206 dd->attrs[index] = Attr_Data;
executed 82 times by 1 test: dd->attrs[index] = Attr_Data;
Executed by:
  • tst_ecmascripttests
82
207 return
executed 1285 times by 7 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
true;
executed 1285 times by 7 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1285
208 }-
209 if (dd->data(index).isEmpty()
dd->data(index).isEmpty()Description
TRUEnever evaluated
FALSEevaluated 342 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-342
210 return
never executed: return true;
true;
never executed: return true;
0
211 return
executed 342 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
false;
executed 342 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
342
212}-
213-
214void SimpleArrayData::setAttribute(Object *o, uint index, PropertyAttributes attrs)-
215{-
216 o->arrayData()->attrs[index] = attrs;-
217}
executed 866 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
866
218-
219void SimpleArrayData::push_front(Object *o, const Value *values, uint n)-
220{-
221 Heap::SimpleArrayData *dd = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
222 ((!dd->attrs) ? static_cast<void>(0) : qt_assert("!dd->attrs", __FILE__, 267));-
223 if (dd->values.size + n > dd->values.alloc
dd->values.siz...->values.allocDescription
TRUEevaluated 16 times by 3 tests
Evaluated by:
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qqmlecmascript
FALSEevaluated 20060 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
) {
16-20060
224 realloc(o, Heap::ArrayData::Simple, dd->values.size + n, false);-
225 ((o->d()->arrayData->type == Heap::ArrayData::Simple) ? static_cast<void>(0) : qt_assert("o->d()->arrayData->type == Heap::ArrayData::Simple", __FILE__, 270));-
226 dd = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
227 }
executed 16 times by 3 tests: end of block
Executed by:
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qqmlecmascript
16
228 if (n <= dd->offset
n <= dd->offsetDescription
TRUEevaluated 20022 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
FALSEevaluated 54 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qqmlecmascript
) {
54-20022
229 dd->offset -= n;-
230 }
executed 20022 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
else {
20022
231-
232 dd->offset = dd->values.alloc --
233 (n - dd->offset);-
234 }
executed 54 times by 4 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qqmlecmascript
54
235 dd->values.size += n;-
236 for (uint i = 0; i < n
i < nDescription
TRUEevaluated 20052 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qqmlecmascript
FALSEevaluated 20076 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qqmlecmascript
; ++i)
20052-20076
237 dd->setData(o->engine(), i, values[i]);
executed 20052 times by 4 tests: dd->setData(o->engine(), i, values[i]);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qqmlecmascript
20052
238}
executed 20076 times by 4 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qqmlecmascript
20076
239-
240ReturnedValue SimpleArrayData::pop_front(Object *o)-
241{-
242 Heap::SimpleArrayData *dd = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
243 ((!dd->attrs) ? static_cast<void>(0) : qt_assert("!dd->attrs", __FILE__, 288));-
244 if (!dd->values.size
!dd->values.sizeDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 122 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
)
8-122
245 return
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
246-
247 ReturnedValue v = dd->data(0).isEmpty()
dd->data(0).isEmpty()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 114 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
? Encode::undefined() : dd->data(0).asReturnedValue();
8-114
248 dd->offset = (dd->offset + 1) % dd->values.alloc;-
249 --dd->values.size;-
250 return
executed 122 times by 2 tests: return v;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
v;
executed 122 times by 2 tests: return v;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
122
251}-
252-
253uint SimpleArrayData::truncate(Object *o, uint newLen)-
254{-
255 Heap::SimpleArrayData *dd = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
256 if (dd->values.size < newLen
dd->values.size < newLenDescription
TRUEnever evaluated
FALSEevaluated 485 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
)
0-485
257 return
never executed: return newLen;
newLen;
never executed: return newLen;
0
258-
259 if (!dd->attrs
!dd->attrsDescription
TRUEevaluated 417 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 68 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
68-417
260 dd->values.size = newLen;-
261 return
executed 417 times by 7 tests: return newLen;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
newLen;
executed 417 times by 7 tests: return newLen;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
417
262 }-
263-
264 while (dd->values.size > newLen
dd->values.size > newLenDescription
TRUEevaluated 92 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
4-92
265 if (!dd->data(dd->values.size - 1).isEmpty()
!dd->data(dd->...- 1).isEmpty()Description
TRUEevaluated 92 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
&& !dd->attrs[dd->values.size - 1].isConfigurable()
!dd->attrs[dd-...Configurable()Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-92
266 return
executed 64 times by 1 test: return dd->values.size;
Executed by:
  • tst_ecmascripttests
dd->values.size;
executed 64 times by 1 test: return dd->values.size;
Executed by:
  • tst_ecmascripttests
64
267 --dd->values.size;-
268 }
executed 28 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
28
269 return
executed 4 times by 1 test: return dd->values.size;
Executed by:
  • tst_ecmascripttests
dd->values.size;
executed 4 times by 1 test: return dd->values.size;
Executed by:
  • tst_ecmascripttests
4
270}-
271-
272uint SimpleArrayData::length(const Heap::ArrayData *d)-
273{-
274 return
executed 270031 times by 17 tests: return d->values.size;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_quicktestmainwithsetup
  • tst_testfiltering
d->values.size;
executed 270031 times by 17 tests: return d->values.size;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_quicktestmainwithsetup
  • tst_testfiltering
270031
275}-
276-
277bool SimpleArrayData::putArray(Object *o, uint index, const Value *values, uint n)-
278{-
279 Heap::SimpleArrayData *dd = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
280 if (index + n > dd->values.alloc
index + n > dd->values.allocDescription
TRUEevaluated 5216 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
FALSEevaluated 136023 times by 17 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_quicktestmainwithsetup
  • tst_testfiltering
) {
5216-136023
281 reallocate(o, index + n + 1, false);-
282 dd = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
283 }
executed 5216 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsonbinding
  • tst_qqmlecmascript
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrepeater
5216
284 QV4::ExecutionEngine *e = o->engine();-
285 for (uint i = dd->values.size; i < index
i < indexDescription
TRUEnever evaluated
FALSEevaluated 141239 times by 18 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_quicktestmainwithsetup
  • tst_testfiltering
; ++i)
0-141239
286 dd->setData(e, i, Primitive::emptyValue());
never executed: dd->setData(e, i, Primitive::emptyValue());
0
287 for (uint i = 0; i < n
i < nDescription
TRUEevaluated 133485 times by 17 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 141266 times by 18 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_quicktestmainwithsetup
  • tst_testfiltering
; ++i)
133485-141266
288 dd->setData(e, index + i, values[i]);
executed 133489 times by 17 tests: dd->setData(e, index + i, values[i]);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_quicktestmainwithsetup
  • tst_testfiltering
133489
289 dd->values.size = qMax(dd->values.size, index + n);-
290 return
executed 141253 times by 18 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_quicktestmainwithsetup
  • tst_testfiltering
true;
executed 141253 times by 18 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_quicktestmainwithsetup
  • tst_testfiltering
141253
291}-
292-
293void SparseArrayData::free(Heap::ArrayData *d, uint idx)-
294{-
295 ((d && d->type == Heap::ArrayData::Sparse) ? static_cast<void>(0) : qt_assert("d && d->type == Heap::ArrayData::Sparse", __FILE__, 340));-
296 Value *v = d->values.values + idx;-
297 if (d->attrs
d->attrsDescription
TRUEevaluated 885 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& d->attrs[idx].isAccessor()
d->attrs[idx].isAccessor()Description
TRUEevaluated 188 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 700 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
8-885
298-
299 v[1] = d->sparse->freeList;-
300 v[0] = Encode(idx + 1);-
301 }
executed 186 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
else {
186
302 *v = d->sparse->freeList;-
303 }
executed 707 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
707
304 d->sparse->freeList = Encode(idx);-
305 if (d->attrs
d->attrsDescription
TRUEevaluated 887 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-887
306 d->attrs[idx].clear();
executed 887 times by 1 test: d->attrs[idx].clear();
Executed by:
  • tst_ecmascripttests
887
307}
executed 895 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
895
308-
309Heap::ArrayData *SparseArrayData::reallocate(Object *o, uint n, bool enforceAttributes)-
310{-
311 realloc(o, Heap::ArrayData::Sparse, n, enforceAttributes);-
312 return
executed 2629 times by 1 test: return o->arrayData();
Executed by:
  • tst_ecmascripttests
o->arrayData();
executed 2629 times by 1 test: return o->arrayData();
Executed by:
  • tst_ecmascripttests
2629
313}-
314-
315-
316uint SparseArrayData::allocate(Object *o, bool doubleSlot)-
317{-
318 ((o->d()->arrayData->type == Heap::ArrayData::Sparse) ? static_cast<void>(0) : qt_assert("o->d()->arrayData->type == Heap::ArrayData::Sparse", __FILE__, 363));-
319 Heap::SimpleArrayData *dd = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
320 if (doubleSlot
doubleSlotDescription
TRUEevaluated 3548 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 835 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
) {
835-3548
321 Value *last = &dd->sparse->freeList;-
322 while (1) {-
323 if (last->int_32() == -1
last->int_32() == -1Description
TRUEevaluated 2579 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1504 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
1504-2579
324 reallocate(o, dd->values.alloc + 2, true);-
325 dd = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
326 last = &dd->sparse->freeList;-
327 ((last->int_32() != -1) ? static_cast<void>(0) : qt_assert("last->int_32() != -1", __FILE__, 372));-
328 }
executed 2594 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
2594
329-
330 ((dd->values[static_cast<uint>(last->int_32())].int_32() != last->int_32()) ? static_cast<void>(0) : qt_assert("dd->values[static_cast<uint>(last->int_32())].int_32() != last->int_32()", __FILE__, 375));-
331 if (dd->values[static_cast<uint>(last->int_32())].int_32() == last->int_32() + 1
dd->values[sta...->int_32() + 1Description
TRUEevaluated 3557 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 536 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
536-3557
332-
333 uint idx = static_cast<uint>(last->int_32());-
334 *last = Encode(dd->values[static_cast<uint>(last->int_32()) + 1].int_32());-
335 dd->attrs[idx] = Attr_Accessor;-
336 return
executed 3549 times by 1 test: return idx;
Executed by:
  • tst_ecmascripttests
idx;
executed 3549 times by 1 test: return idx;
Executed by:
  • tst_ecmascripttests
3549
337 }-
338 last = &dd->values.values[last->int_32()];-
339 }
executed 536 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
536
340 }
never executed: end of block
else {
0
341 if (dd->sparse->freeList.int_32() == -1
dd->sparse->fr...int_32() == -1Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 827 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
) {
8-827
342 reallocate(o, dd->values.alloc + 1, false);-
343 dd = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
344 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
8
345 ((dd->sparse->freeList.int_32() != -1) ? static_cast<void>(0) : qt_assert("dd->sparse->freeList.int_32() != -1", __FILE__, 390));-
346 uint idx = static_cast<uint>(dd->sparse->freeList.int_32());-
347 dd->sparse->freeList = dd->values[idx];-
348 ((dd->sparse->freeList.isInteger()) ? static_cast<void>(0) : qt_assert("dd->sparse->freeList.isInteger()", __FILE__, 393));-
349 if (dd->attrs
dd->attrsDescription
TRUEevaluated 604 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 232 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
)
232-604
350 dd->attrs[idx] = Attr_Data;
executed 604 times by 1 test: dd->attrs[idx] = Attr_Data;
Executed by:
  • tst_ecmascripttests
604
351 return
executed 836 times by 2 tests: return idx;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
idx;
executed 836 times by 2 tests: return idx;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
836
352 }-
353}-
354-
355ReturnedValue SparseArrayData::get(const Heap::ArrayData *d, uint index)-
356{-
357 const Heap::SparseArrayData *s = static_cast<const Heap::SparseArrayData *>(d);-
358 index = s->mappedIndex(index);-
359 if (index ==
index == (0x7f...fff * 2U + 1U)Description
TRUEevaluated 94 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 295 times by 1 test
Evaluated by:
  • tst_ecmascripttests
94-295
360 (0x7fffffff * 2U + 1U)
index == (0x7f...fff * 2U + 1U)Description
TRUEevaluated 94 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 295 times by 1 test
Evaluated by:
  • tst_ecmascripttests
94-295
361 )-
362 return
executed 94 times by 1 test: return Primitive::emptyValue().asReturnedValue();
Executed by:
  • tst_ecmascripttests
Primitive::emptyValue().asReturnedValue();
executed 94 times by 1 test: return Primitive::emptyValue().asReturnedValue();
Executed by:
  • tst_ecmascripttests
94
363 return
executed 296 times by 1 test: return s->values[index].asReturnedValue();
Executed by:
  • tst_ecmascripttests
s->values[index].asReturnedValue();
executed 296 times by 1 test: return s->values[index].asReturnedValue();
Executed by:
  • tst_ecmascripttests
296
364}-
365-
366bool SparseArrayData::put(Object *o, uint index, const Value &value)-
367{-
368 if (value.isEmpty()
value.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 334 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-334
369 return
never executed: return true;
true;
never executed: return true;
0
370-
371 Heap::SparseArrayData *s = o->d()->arrayData.cast<Heap::SparseArrayData>();-
372 SparseArrayNode *n = s->sparse->insert(index);-
373 ((n->value == -
374 (0x7fffffff * 2U + 1U) -
375 || !s->attrs || !s->attrs[n->value].isAccessor()) ? static_cast<void>(0) : qt_assert("n->value == UINT_MAX || !s->attrs || !s->attrs[n->value].isAccessor()", __FILE__, 416));-
376 if (n->value ==
n->value == (0...fff * 2U + 1U)Description
TRUEevaluated 334 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
0-334
377 (0x7fffffff * 2U + 1U)
n->value == (0...fff * 2U + 1U)Description
TRUEevaluated 334 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
0-334
378 )-
379 n->value = allocate(o);
executed 334 times by 1 test: n->value = allocate(o);
Executed by:
  • tst_ecmascripttests
334
380 s = o->d()->arrayData.cast<Heap::SparseArrayData>();-
381 s->setArrayData(o->engine(), n->value, value);-
382 if (s->attrs
s->attrsDescription
TRUEevaluated 334 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
)
0-334
383 s->attrs[n->value] = Attr_Data;
executed 334 times by 1 test: s->attrs[n->value] = Attr_Data;
Executed by:
  • tst_ecmascripttests
334
384 return
executed 334 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
true;
executed 334 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
334
385}-
386-
387bool SparseArrayData::del(Object *o, uint index)-
388{-
389 Heap::SparseArrayData *dd = o->d()->arrayData.cast<Heap::SparseArrayData>();-
390-
391 SparseArrayNode *n = dd->sparse->findNode(index);-
392 if (!n
!nDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 764 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
)
4-764
393 return
executed 4 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
true;
executed 4 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
4
394-
395 uint pidx = n->value;-
396 ((!dd->values[pidx].isEmpty()) ? static_cast<void>(0) : qt_assert("!dd->values[pidx].isEmpty()", __FILE__, 435));-
397-
398 bool isAccessor = false;-
399 if (dd->attrs
dd->attrsDescription
TRUEevaluated 759 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
) {
4-759
400 if (!dd->attrs[pidx].isConfigurable()
!dd->attrs[pid...Configurable()Description
TRUEevaluated 362 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 400 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
362-400
401 return
executed 359 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
false;
executed 359 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
359
402-
403 isAccessor = dd->attrs[pidx].isAccessor();-
404 dd->attrs[pidx] = Attr_Data;-
405 }
executed 403 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
403
406-
407 if (isAccessor
isAccessorDescription
TRUEevaluated 253 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 154 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
) {
154-253
408-
409 dd->values.values[pidx + 1] = dd->sparse->freeList;-
410 dd->values.values[pidx] = Encode(pidx + 1);-
411 }
executed 252 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
else {
252
412 ((dd->type == Heap::ArrayData::Sparse) ? static_cast<void>(0) : qt_assert("dd->type == Heap::ArrayData::Sparse", __FILE__, 451));-
413 dd->values.values[pidx] = dd->sparse->freeList;-
414 }
executed 154 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
154
415-
416 dd->sparse->freeList = Encode(pidx);-
417 dd->sparse->erase(n);-
418 return
executed 405 times by 2 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
true;
executed 405 times by 2 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
405
419}-
420-
421void SparseArrayData::setAttribute(Object *o, uint index, PropertyAttributes attrs)-
422{-
423 Heap::SparseArrayData *d = o->d()->arrayData.cast<Heap::SparseArrayData>();-
424 SparseArrayNode *n = d->sparse->insert(index);-
425 if (n->value ==
n->value == (0...fff * 2U + 1U)Description
TRUEevaluated 3034 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2037 times by 1 test
Evaluated by:
  • tst_ecmascripttests
2037-3034
426 (0x7fffffff * 2U + 1U)
n->value == (0...fff * 2U + 1U)Description
TRUEevaluated 3034 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2037 times by 1 test
Evaluated by:
  • tst_ecmascripttests
2037-3034
427 ) {-
428 n->value = allocate(o, attrs.isAccessor());-
429 d = o->d()->arrayData.cast<Heap::SparseArrayData>();-
430 }
executed 3038 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
3038
431 else if (attrs.isAccessor() != d->attrs[n->value].isAccessor()
attrs.isAccess...].isAccessor()Description
TRUEevaluated 699 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1332 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
699-1332
432-
433 free(o->arrayData(), n->value);-
434 n->value = allocate(o, attrs.isAccessor());-
435 d = o->d()->arrayData.cast<Heap::SparseArrayData>();-
436 }
executed 700 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
700
437 d->attrs[n->value] = attrs;-
438}
executed 5071 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
5071
439-
440void SparseArrayData::push_front(Object *o, const Value *values, uint n)-
441{-
442 Heap::SparseArrayData *d = o->d()->arrayData.cast<Heap::SparseArrayData>();-
443 ((!d->attrs) ? static_cast<void>(0) : qt_assert("!d->attrs", __FILE__, 480));-
444 for (int i = static_cast<int>(n) - 1; i >= 0
i >= 0Description
TRUEnever evaluated
FALSEnever evaluated
; --i) {
0
445 uint idx = allocate(o);-
446 d = o->d()->arrayData.cast<Heap::SparseArrayData>();-
447 d->setArrayData(o->engine(), idx, values[i]);-
448 d->sparse->push_front(idx);-
449 }
never executed: end of block
0
450}
never executed: end of block
0
451-
452ReturnedValue SparseArrayData::pop_front(Object *o)-
453{-
454 Heap::SparseArrayData *d = o->d()->arrayData.cast<Heap::SparseArrayData>();-
455 ((!d->attrs) ? static_cast<void>(0) : qt_assert("!d->attrs", __FILE__, 492));-
456 uint idx = d->sparse->pop_front();-
457 ReturnedValue v;-
458 if (idx !=
idx != (0x7fffffff * 2U + 1U)Description
TRUEnever evaluated
FALSEnever evaluated
0
459 (0x7fffffff * 2U + 1U)
idx != (0x7fffffff * 2U + 1U)Description
TRUEnever evaluated
FALSEnever evaluated
0
460 ) {-
461 v = d->values[idx].asReturnedValue();-
462 free(o->arrayData(), idx);-
463 }
never executed: end of block
else {
0
464 v = Encode::undefined();-
465 }
never executed: end of block
0
466 return
never executed: return v;
v;
never executed: return v;
0
467}-
468-
469uint SparseArrayData::truncate(Object *o, uint newLen)-
470{-
471 Heap::SparseArrayData *d = o->d()->arrayData.cast<Heap::SparseArrayData>();-
472 SparseArrayNode *begin = d->sparse->lowerBound(newLen);-
473 if (begin != d->sparse->end()
begin != d->sparse->end()Description
TRUEevaluated 158 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
) {
0-158
474 SparseArrayNode *it = d->sparse->end()->previousNode();-
475 while (1) {-
476 if (d->attrs
d->attrsDescription
TRUEevaluated 232 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
8-232
477 if (!d->attrs[it->value].isConfigurable()
!d->attrs[it->...Configurable()Description
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 186 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
46-186
478 newLen = it->key() + 1;-
479 break;
executed 46 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
46
480 }-
481 }
executed 186 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
186
482 free(o->arrayData(), it->value);-
483 bool brk = (it == begin);-
484 SparseArrayNode *prev = it->previousNode();-
485 d->sparse->erase(it);-
486 if (brk
brkDescription
TRUEevaluated 112 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 82 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
82-112
487 break;
executed 112 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
112
488 it = prev;-
489 }
executed 82 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
82
490 }
executed 158 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
158
491 return
executed 158 times by 1 test: return newLen;
Executed by:
  • tst_ecmascripttests
newLen;
executed 158 times by 1 test: return newLen;
Executed by:
  • tst_ecmascripttests
158
492}-
493-
494uint SparseArrayData::length(const Heap::ArrayData *d)-
495{-
496 const Heap::SparseArrayData *dd = static_cast<const Heap::SparseArrayData *>(d);-
497 if (!dd->sparse
!dd->sparseDescription
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-10
498 return
never executed: return 0;
0;
never executed: return 0;
0
499 SparseArrayNode *n = dd->sparse->end();-
500 n = n->previousNode();-
501 return
executed 10 times by 1 test: return n ? n->key() + 1 : 0;
Executed by:
  • tst_ecmascripttests
n ? n->key() + 1 : 0;
executed 10 times by 1 test: return n ? n->key() + 1 : 0;
Executed by:
  • tst_ecmascripttests
10
502}-
503-
504bool SparseArrayData::putArray(Object *o, uint index, const Value *values, uint n)-
505{-
506 for (uint i = 0; i < n
i < nDescription
TRUEevaluated 334 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 450 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; ++i)
334-450
507 put(o, index + i, values[i]);
executed 334 times by 1 test: put(o, index + i, values[i]);
Executed by:
  • tst_ecmascripttests
334
508 return
executed 450 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
true;
executed 450 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
450
509}-
510-
511-
512uint ArrayData::append(Object *obj, ArrayObject *otherObj, uint n)-
513{-
514 ((!obj->d()->arrayData || !obj->d()->arrayData->attrs) ? static_cast<void>(0) : qt_assert("!obj->d()->arrayData || !obj->d()->arrayData->attrs", __FILE__, 549));-
515-
516 if (!n
!nDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
)
8-58
517 return
executed 8 times by 1 test: return obj->getLength();
Executed by:
  • tst_ecmascripttests
obj->getLength();
executed 8 times by 1 test: return obj->getLength();
Executed by:
  • tst_ecmascripttests
8
518-
519 Scope scope(obj->engine());-
520 Scoped<ArrayData> other(scope, otherObj->arrayData());-
521-
522 if (other && other->isSparse()
other->isSparse()Description
TRUEnever evaluated
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
)
0-58
523 obj->initSparseArray();
never executed: obj->initSparseArray();
0
524 else-
525 obj->arrayCreate();
executed 58 times by 2 tests: obj->arrayCreate();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
58
526-
527 uint oldSize = obj->getLength();-
528-
529 if (!other
!otherDescription
TRUEnever evaluated
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
|| ArgumentsObject::isNonStrictArgumentsObject(otherObj)
ArgumentsObjec...ject(otherObj)Description
TRUEnever evaluated
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
) {
0-58
530 ScopedValue v(scope);-
531 for (uint i = 0; i < n
i < nDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
532 obj->arraySet(oldSize + i, (v = otherObj->get(i)));
never executed: obj->arraySet(oldSize + i, (v = otherObj->get(i)));
0
533 }
never executed: end of block
else if (other && other->isSparse()
other->isSparse()Description
TRUEnever evaluated
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
) {
0-58
534 Heap::SparseArrayData *os = static_cast<Heap::SparseArrayData *>(other->d());-
535 if (other->hasAttributes()
other->hasAttributes()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
536 ScopedValue v(scope);-
537 for (const SparseArrayNode *it = os->sparse->begin();-
538 it != os->sparse->end()
it != os->sparse->end()Description
TRUEnever evaluated
FALSEnever evaluated
; it = it->nextNode()) {
0
539 v = otherObj->getValue(os->values[it->value], other->d()->attrs[it->value]);-
540 obj->arraySet(oldSize + it->key(), v);-
541 }
never executed: end of block
0
542 }
never executed: end of block
else {
0
543 for (const SparseArrayNode *it = other->d()->sparse->begin();-
544 it != os->sparse->end()
it != os->sparse->end()Description
TRUEnever evaluated
FALSEnever evaluated
; it = it->nextNode())
0
545 obj->arraySet(oldSize + it->key(), os->values[it->value]);
never executed: obj->arraySet(oldSize + it->key(), os->values[it->value]);
0
546 }
never executed: end of block
0
547 } else {-
548 Heap::SimpleArrayData *os = static_cast<Heap::SimpleArrayData *>(other->d());-
549 uint toCopy = n;-
550 uint chunk = toCopy;-
551 if (chunk > os->values.alloc - os->offset
chunk > os->va...c - os->offsetDescription
TRUEnever evaluated
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
)
0-58
552 chunk = os->values.alloc - os->offset;
never executed: chunk = os->values.alloc - os->offset;
0
553 obj->arrayPut(oldSize, os->values.data() + os->offset, chunk);-
554 toCopy -= chunk;-
555 if (toCopy
toCopyDescription
TRUEnever evaluated
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
)
0-58
556 obj->arrayPut(oldSize + chunk, os->values.data(), toCopy);
never executed: obj->arrayPut(oldSize + chunk, os->values.data(), toCopy);
0
557 }
executed 58 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
58
558-
559 return
executed 58 times by 2 tests: return oldSize + n;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
oldSize + n;
executed 58 times by 2 tests: return oldSize + n;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
58
560}-
561-
562void ArrayData::insert(Object *o, uint index, const Value *v, bool isAccessor)-
563{-
564 if (!isAccessor
!isAccessorDescription
TRUEevaluated 49578 times by 31 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • ...
FALSEevaluated 2988 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& o->d()->arrayData->type != Heap::ArrayData::Sparse
o->d()->arrayD...ayData::SparseDescription
TRUEevaluated 49280 times by 31 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • ...
FALSEevaluated 348 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
) {
348-49578
565 Heap::SimpleArrayData *d = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
566 if (index < 0x1000
index < 0x1000Description
TRUEevaluated 49283 times by 31 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • ...
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| index < d->values.size + (d->values.size >> 2)
index < d->val...ues.size >> 2)Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
0-49283
567 if (index >= d->values.alloc
index >= d->values.allocDescription
TRUEevaluated 794 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qv4debugger
FALSEevaluated 48445 times by 31 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • ...
) {
794-48445
568 o->arrayReserve(index + 1);-
569 d = o->d()->arrayData.cast<Heap::SimpleArrayData>();-
570 }
executed 790 times by 7 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qv4debugger
790
571 if (index >= d->values.size
index >= d->values.sizeDescription
TRUEevaluated 49088 times by 31 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • ...
FALSEevaluated 148 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
) {
148-49088
572-
573 for (uint i = d->values.size; i < index
i < indexDescription
TRUEevaluated 68222 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
FALSEevaluated 49132 times by 31 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • ...
; ++i)
49132-68222
574 d->setData(o->engine(), i, Primitive::emptyValue());
executed 68216 times by 6 tests: d->setData(o->engine(), i, Primitive::emptyValue());
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
68216
575 d->values.size = index + 1;-
576 }
executed 49106 times by 31 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • ...
49106
577 d->setData(o->engine(), index, *v);-
578 return;
executed 49260 times by 31 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • ...
49260
579 }-
580 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
8
581-
582 o->initSparseArray();-
583 Heap::SparseArrayData *s = o->d()->arrayData.cast<Heap::SparseArrayData>();-
584 SparseArrayNode *n = s->sparse->insert(index);-
585 if (n->value ==
n->value == (0...fff * 2U + 1U)Description
TRUEevaluated 308 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
FALSEevaluated 3047 times by 1 test
Evaluated by:
  • tst_ecmascripttests
308-3047
586 (0x7fffffff * 2U + 1U)
n->value == (0...fff * 2U + 1U)Description
TRUEevaluated 308 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
FALSEevaluated 3047 times by 1 test
Evaluated by:
  • tst_ecmascripttests
308-3047
587 )-
588 n->value = SparseArrayData::allocate(o, isAccessor);
executed 308 times by 2 tests: n->value = SparseArrayData::allocate(o, isAccessor);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
308
589 s = o->d()->arrayData.cast<Heap::SparseArrayData>();-
590 s->setArrayData(o->engine(), n->value, *v);-
591 if (isAccessor
isAccessorDescription
TRUEevaluated 3003 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 356 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
)
356-3003
592 s->setArrayData(o->engine(), n->value + Object::SetterOffset, v[Object::SetterOffset]);
executed 2992 times by 1 test: s->setArrayData(o->engine(), n->value + Object::SetterOffset, v[Object::SetterOffset]);
Executed by:
  • tst_ecmascripttests
2992
593}
executed 3347 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
3347
594-
595-
596class ArrayElementLessThan-
597{-
598public:-
599 inline ArrayElementLessThan(ExecutionEngine *engine, const Value &comparefn)-
600 : m_engine(engine), m_comparefn(comparefn) {}
executed 176 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
176
601-
602 bool operator()(Value v1, Value v2) const;-
603-
604private:-
605 ExecutionEngine *m_engine;-
606 const Value &m_comparefn;-
607};-
608-
609-
610bool ArrayElementLessThan::operator()(Value v1, Value v2) const-
611{-
612 Scope scope(m_engine);-
613-
614 if (v1.isUndefined()
v1.isUndefined()Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 9020 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
|| v1.isEmpty()
v1.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 9020 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
)
0-9020
615 return
executed 64 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
false;
executed 64 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
64
616 if (v2.isUndefined()
v2.isUndefined()Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 8972 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
|| v2.isEmpty()
v2.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 8972 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
)
0-8972
617 return
executed 48 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
true;
executed 48 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
48
618 ScopedFunctionObject o(scope, m_comparefn);-
619 if (o
oDescription
TRUEevaluated 5724 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
FALSEevaluated 3248 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
) {
3248-5724
620 Scope scope(o->engine());-
621 ScopedValue result(scope);-
622 JSCallData jsCallData(scope, 2);-
623 jsCallData->args[0] = v1;-
624 jsCallData->args[1] = v2;-
625 result = o->call(jsCallData);-
626-
627 return
executed 5724 times by 3 tests: return result->toNumber() < 0;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
result->toNumber() < 0;
executed 5724 times by 3 tests: return result->toNumber() < 0;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
5724
628 }-
629 ScopedString p1s(scope, v1.toString(scope.engine));-
630 ScopedString p2s(scope, v2.toString(scope.engine));-
631 return
executed 3248 times by 4 tests: return p1s->toQString() < p2s->toQString();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
p1s->toQString() < p2s->toQString();
executed 3248 times by 4 tests: return p1s->toQString() < p2s->toQString();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
3248
632}-
633-
634template <typename RandomAccessIterator, typename T, typename LessThan>-
635void sortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan)-
636{-
637top:-
638 int span = int(end - start);-
639 if (span < 2
span < 2Description
TRUEevaluated 254 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
FALSEevaluated 990 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
)
254-990
640 return;
executed 254 times by 5 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
254
641-
642 --end;-
643 RandomAccessIterator low = start, high = end - 1;-
644 RandomAccessIterator pivot = start + span / 2;-
645-
646 if (lessThan(*end, *start)
lessThan(*end, *start)Description
TRUEevaluated 424 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
FALSEevaluated 566 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
)
424-566
647 qSwap(*end, *start);
executed 424 times by 5 tests: qSwap(*end, *start);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
424
648 if (span == 2
span == 2Description
TRUEevaluated 274 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
FALSEevaluated 716 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
)
274-716
649 return;
executed 274 times by 3 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
274
650-
651 if (lessThan(*pivot, *start)
lessThan(*pivot, *start)Description
TRUEevaluated 254 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
FALSEevaluated 462 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
)
254-462
652 qSwap(*pivot, *start);
executed 254 times by 5 tests: qSwap(*pivot, *start);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
254
653 if (lessThan(*end, *pivot)
lessThan(*end, *pivot)Description
TRUEevaluated 196 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
FALSEevaluated 520 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
)
196-520
654 qSwap(*end, *pivot);
executed 196 times by 4 tests: qSwap(*end, *pivot);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
196
655 if (span == 3
span == 3Description
TRUEevaluated 182 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
FALSEevaluated 534 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
)
182-534
656 return;
executed 182 times by 5 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_testfiltering
182
657-
658 qSwap(*pivot, *end);-
659-
660 while (low < high
low < highDescription
TRUEevaluated 1072 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
FALSEevaluated 146 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
) {
146-1072
661 while (low < high
low < highDescription
TRUEevaluated 4636 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
FALSEevaluated 154 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
&& lessThan(*low, *end)
lessThan(*low, *end)Description
TRUEevaluated 3718 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
FALSEevaluated 918 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
)
154-4636
662 ++
executed 3718 times by 4 tests: ++low;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
low;
executed 3718 times by 4 tests: ++low;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
3718
663-
664 while (high > low
high > lowDescription
TRUEevaluated 1492 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
FALSEevaluated 388 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
&& lessThan(*end, *high)
lessThan(*end, *high)Description
TRUEevaluated 808 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
FALSEevaluated 684 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
)
388-1492
665 --
executed 808 times by 3 tests: --high;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
high;
executed 808 times by 3 tests: --high;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
808
666-
667 if (low < high
low < highDescription
TRUEevaluated 684 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
FALSEevaluated 388 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
) {
388-684
668 qSwap(*low, *high);-
669 ++low;-
670 --high;-
671 }
executed 684 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
else {
684
672 break;
executed 388 times by 4 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
388
673 }-
674 }-
675-
676 if (lessThan(*low, *end)
lessThan(*low, *end)Description
TRUEevaluated 114 times by 2 tests
Evaluated by:
  • tst_qjsengine
  • tst_qqmlecmascript
FALSEevaluated 420 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquicklayouts
)
114-420
677 ++
executed 114 times by 2 tests: ++low;
Executed by:
  • tst_qjsengine
  • tst_qqmlecmascript
low;
executed 114 times by 2 tests: ++low;
Executed by:
  • tst_qjsengine
  • tst_qqmlecmascript
114
678-
679 qSwap(*end, *low);-
680 sortHelper(start, low, t, lessThan);-
681-
682 start = low + 1;-
683 ++end;-
684 goto
executed 534 times by 4 tests: goto top;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
top;
executed 534 times by 4 tests: goto top;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
534
685}-
686-
687-
688void ArrayData::sort(ExecutionEngine *engine, Object *thisObject, const Value &comparefn, uint len)-
689{-
690 if (!len
!lenDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_quicktestmainwithsetup
FALSEevaluated 184 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
)
10-184
691 return;
executed 10 times by 2 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_quicktestmainwithsetup
10
692-
693 Scope scope(engine);-
694 Scoped<ArrayData> arrayData(scope, thisObject->arrayData());-
695-
696 if (!arrayData
!arrayDataDescription
TRUEnever evaluated
FALSEevaluated 184 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
|| !arrayData->length()
!arrayData->length()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 180 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
)
0-184
697 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
4
698-
699 if (!comparefn.isUndefined()
!comparefn.isUndefined()Description
TRUEevaluated 68 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
FALSEevaluated 112 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
&& !comparefn.isFunctionObject()
!comparefn.isFunctionObject()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 64 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
) {
4-112
700 engine->throwTypeError();-
701 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
4
702 }-
703-
704-
705-
706-
707 if (arrayData->type() == Heap::ArrayData::Sparse
arrayData->typ...ayData::SparseDescription
TRUEnever evaluated
FALSEevaluated 176 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
) {
0-176
708-
709-
710 Scoped<SparseArrayData> sparse(scope, static_cast<Heap::SparseArrayData *>(arrayData->d()));-
711-
712 if (!sparse->sparse()->nEntries()
!sparse->sparse()->nEntries()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
713 return;
never executed: return;
0
714-
715 thisObject->setArrayData(nullptr);-
716 ArrayData::realloc(thisObject, Heap::ArrayData::Simple, sparse->sparse()->nEntries(), sparse->attrs() ? true : false);-
717 Heap::SimpleArrayData *d = thisObject->d()->arrayData.cast<Heap::SimpleArrayData>();-
718-
719 SparseArrayNode *n = sparse->sparse()->begin();-
720 uint i = 0;-
721 if (sparse->attrs()
sparse->attrs()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
722 while (n != sparse->sparse()->end()
n != sparse->sparse()->end()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
723 if (n->value >= len
n->value >= lenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
724 break;
never executed: break;
0
725-
726 PropertyAttributes a = sparse->attrs()
sparse->attrs()Description
TRUEnever evaluated
FALSEnever evaluated
? sparse->attrs()[n->value] : Attr_Data;
0
727 d->setData(engine, i, Value::fromReturnedValue(thisObject->getValue(sparse->arrayData()[n->value], a)));-
728 d->attrs[i] = a.isAccessor()
a.isAccessor()Description
TRUEnever evaluated
FALSEnever evaluated
? Attr_Data : a;
0
729-
730 n = n->nextNode();-
731 ++i;-
732 }
never executed: end of block
0
733 }
never executed: end of block
else {
0
734 while (n != sparse->sparse()->end()
n != sparse->sparse()->end()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
735 if (n->value >= len
n->value >= lenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
736 break;
never executed: break;
0
737 d->setData(engine, i, sparse->arrayData()[n->value]);-
738 n = n->nextNode();-
739 ++i;-
740 }
never executed: end of block
0
741 }
never executed: end of block
0
742 d->values.size = i;-
743 if (len > i
len > iDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
744 len = i;
never executed: len = i;
0
745 if (n != sparse->sparse()->end()
n != sparse->sparse()->end()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
746-
747 thisObject->initSparseArray();-
748 while (n != sparse->sparse()->end()
n != sparse->sparse()->end()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
749 PropertyAttributes a = sparse->attrs()
sparse->attrs()Description
TRUEnever evaluated
FALSEnever evaluated
? sparse->attrs()[n->value] : Attr_Data;
0
750 thisObject->arraySet(n->value, reinterpret_cast<const Property *>(sparse->arrayData() + n->value), a);-
751-
752 n = n->nextNode();-
753 }
never executed: end of block
0
754-
755 }
never executed: end of block
0
756 }
never executed: end of block
else {
0
757 Heap::SimpleArrayData *d = thisObject->d()->arrayData.cast<Heap::SimpleArrayData>();-
758 if (len > d->values.size
len > d->values.sizeDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 168 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
)
8-168
759 len = d->values.size;
executed 8 times by 1 test: len = d->values.size;
Executed by:
  • tst_ecmascripttests
8
760-
761-
762 for (uint i = 0; i < len
i < lenDescription
TRUEevaluated 1784 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
FALSEevaluated 176 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
; i++) {
176-1784
763 if (d->data(i).isEmpty()
d->data(i).isEmpty()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1772 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
) {
12-1772
764 while (--
--len > iDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
len > i
--len > iDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
)
0-12
765 if (!d->data(len).isEmpty()
!d->data(len).isEmpty()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
)
0-12
766 break;
executed 12 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
12
767 ((!d->attrs || !d->attrs[len].isAccessor()) ? static_cast<void>(0) : qt_assert("!d->attrs || !d->attrs[len].isAccessor()", __FILE__, 800));-
768 d->setData(engine, i, d->data(len));-
769 d->setData(engine, len, Primitive::emptyValue());-
770 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
12
771 }
executed 1784 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
1784
772-
773 if (!len
!lenDescription
TRUEnever evaluated
FALSEevaluated 176 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
)
0-176
774 return;
never executed: return;
0
775 }
executed 176 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
176
776-
777-
778 ArrayElementLessThan lessThan(engine, static_cast<const FunctionObject &>(comparefn));-
779-
780 Value *begin = thisObject->arrayData()->values.values;-
781 sortHelper(begin, begin + len, *begin, lessThan);-
782-
783-
784-
785-
786-
787}
executed 176 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
176
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0