OpenCoverage

qv4setiterator.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4setiterator.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2using namespace QV4;-
3-
4const QV4::VTable SetIteratorObject::static_vtbl = { (std::is_same<SetIteratorObject::SuperClass, Object>::value) ? nullptr : &SetIteratorObject::SuperClass::static_vtbl, (sizeof(SetIteratorObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(SetIteratorObject::Data) + (SetIteratorObject::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(SetIteratorObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), SetIteratorObject::IsExecutionContext, SetIteratorObject::IsString, SetIteratorObject::IsObject, SetIteratorObject::IsFunctionObject, SetIteratorObject::IsErrorObject, SetIteratorObject::IsArrayData, SetIteratorObject::IsStringOrSymbol, SetIteratorObject::MyType, { 0, 0, 0, 0 }, "SetIteratorObject", SetIteratorObject::virtualDestroy, SetIteratorObject::Data::markObjects, SetIteratorObject::virtualIsEqualTo, SetIteratorObject::virtualGet, SetIteratorObject::virtualPut, SetIteratorObject::virtualDeleteProperty, SetIteratorObject::virtualHasProperty, SetIteratorObject::virtualGetOwnProperty, SetIteratorObject::virtualDefineOwnProperty, SetIteratorObject::virtualIsExtensible, SetIteratorObject::virtualPreventExtensions, SetIteratorObject::virtualGetPrototypeOf, SetIteratorObject::virtualSetPrototypeOf, SetIteratorObject::virtualGetLength, SetIteratorObject::virtualAdvanceIterator, SetIteratorObject::virtualInstanceOf, SetIteratorObject::virtualCall, SetIteratorObject::virtualCallAsConstructor, };-
5-
6void SetIteratorPrototype::init(ExecutionEngine *e)-
7{-
8 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "next")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "next" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98151 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98151 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_next, 0);
98151
9-
10 Scope scope(e);-
11 ScopedString val(scope, e->newString(QLatin1String("Set Iterator")));-
12 defineReadonlyConfigurableProperty(e->symbol_toStringTag(), val);-
13}
executed 99019 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
99019
14-
15ReturnedValue SetIteratorPrototype::method_next(const FunctionObject *b, const Value *that, const Value *, int)-
16{-
17 Scope scope(b);-
18 const SetIteratorObject *thisObject = that->as<SetIteratorObject>();-
19 if (!thisObject
!thisObjectDescription
TRUEevaluated 127 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 204 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
127-204
20 return
executed 127 times by 1 test: return scope.engine->throwTypeError(QLatin1String("Not a Set Iterator instance"));
Executed by:
  • tst_ecmascripttests
scope.engine->throwTypeError(QLatin1String("Not a Set Iterator instance"));
executed 127 times by 1 test: return scope.engine->throwTypeError(QLatin1String("Not a Set Iterator instance"));
Executed by:
  • tst_ecmascripttests
127
21-
22 Scoped<SetObject> s(scope, thisObject->d()->iteratedSet);-
23 uint index = thisObject->d()->setNextIndex;-
24 IteratorKind itemKind = thisObject->d()->iterationKind;-
25-
26 if (!s
!sDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 184 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
20-184
27 QV4::Value undefined = Primitive::undefinedValue();-
28 return
executed 20 times by 1 test: return IteratorPrototype::createIterResultObject(scope.engine, undefined, true);
Executed by:
  • tst_ecmascripttests
IteratorPrototype::createIterResultObject(scope.engine, undefined, true);
executed 20 times by 1 test: return IteratorPrototype::createIterResultObject(scope.engine, undefined, true);
Executed by:
  • tst_ecmascripttests
20
29 }-
30-
31 Value *arguments = scope.alloc(2);-
32-
33 while (index < s->d()->esTable->size()
index < s->d()...sTable->size()Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
48-134
34 s->d()->esTable->iterate(index, &arguments[0], &arguments[1]);-
35 thisObject->d()->setNextIndex = index + 1;-
36-
37 if (itemKind == KeyValueIteratorKind
itemKind == Ke...ueIteratorKindDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 124 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
12-124
38 ScopedArrayObject resultArray(scope, scope.engine->newArrayObject());-
39 resultArray->arrayReserve(2);-
40 resultArray->arrayPut(0, arguments[0]);-
41 resultArray->arrayPut(1, arguments[0]);-
42 resultArray->setArrayLengthUnchecked(2);-
43-
44 return
executed 12 times by 1 test: return IteratorPrototype::createIterResultObject(scope.engine, resultArray, false);
Executed by:
  • tst_ecmascripttests
IteratorPrototype::createIterResultObject(scope.engine, resultArray, false);
executed 12 times by 1 test: return IteratorPrototype::createIterResultObject(scope.engine, resultArray, false);
Executed by:
  • tst_ecmascripttests
12
45 }-
46-
47 return
executed 124 times by 1 test: return IteratorPrototype::createIterResultObject(scope.engine, arguments[0], false);
Executed by:
  • tst_ecmascripttests
IteratorPrototype::createIterResultObject(scope.engine, arguments[0], false);
executed 124 times by 1 test: return IteratorPrototype::createIterResultObject(scope.engine, arguments[0], false);
Executed by:
  • tst_ecmascripttests
124
48 }-
49-
50 thisObject->d()->iteratedSet.set(scope.engine, nullptr);-
51 QV4::Value undefined = Primitive::undefinedValue();-
52 return
executed 48 times by 1 test: return IteratorPrototype::createIterResultObject(scope.engine, undefined, true);
Executed by:
  • tst_ecmascripttests
IteratorPrototype::createIterResultObject(scope.engine, undefined, true);
executed 48 times by 1 test: return IteratorPrototype::createIterResultObject(scope.engine, undefined, true);
Executed by:
  • tst_ecmascripttests
48
53}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0