OpenCoverage

qv4objectiterator_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4objectiterator_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3namespace QV4 {-
4-
5struct __attribute__((visibility("default"))) ObjectIteratorData-
6{-
7 enum Flags {-
8 NoFlags = 0,-
9 EnumerableOnly = 0x1,-
10 WithProtoChain = 0x2,-
11 };-
12-
13 ExecutionEngine *engine;-
14 Value *object;-
15 Value *current;-
16 SparseArrayNode *arrayNode;-
17 uint arrayIndex;-
18 uint memberIndex;-
19 uint flags;-
20};-
21static_assert(bool(std::is_trivial< ObjectIteratorData >::value), "std::is_trivial< ObjectIteratorData >::value");-
22-
23struct __attribute__((visibility("default"))) ObjectIterator: ObjectIteratorData-
24{-
25 ObjectIterator(ExecutionEngine *e, Value *scratch1, Value *scratch2, Object *o, uint flags)-
26 {-
27 engine = e;-
28 object = scratch1;-
29 current = scratch2;-
30 arrayNode = nullptr;-
31 arrayIndex = 0;-
32 memberIndex = 0;-
33 this->flags = flags;-
34 init(o);-
35 }
executed 9115 times by 14 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
9115
36-
37 ObjectIterator(Scope &scope, const Object *o, uint flags)-
38 {-
39 engine = scope.engine;-
40 object = scope.alloc();-
41 current = scope.alloc();-
42 arrayNode = nullptr;-
43 arrayIndex = 0;-
44 memberIndex = 0;-
45 this->flags = flags;-
46 init(o);-
47 }
executed 17129 times by 27 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickparticlegroup
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspritesequence
  • tst_qquickvisualdatamodel
  • ...
17129
48-
49 void next(Value *name, uint *index, Property *pd, PropertyAttributes *attributes = nullptr);-
50 ReturnedValue nextPropertyName(Value *value);-
51 ReturnedValue nextPropertyNameAsString(Value *value);-
52 ReturnedValue nextPropertyNameAsString();-
53-
54private:-
55 void init(const Object *o);-
56};-
57-
58namespace Heap {-
59struct ForInIteratorObject : Object {-
60 void init(QV4::Object *o);-
61 ObjectIterator &it() { return
executed 34157 times by 14 tests: return *reinterpret_cast<ObjectIterator*>(&itData);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
*reinterpret_cast<ObjectIterator*>(&itData);
executed 34157 times by 14 tests: return *reinterpret_cast<ObjectIterator*>(&itData);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
}
34157
62 Value workArea[2];-
63-
64 static void markObjects(Heap::Base *that, MarkStack *markStack);-
65private:-
66 ObjectIteratorData itData;-
67};-
68-
69}-
70-
71struct ForInIteratorPrototype : Object-
72{-
73 static QV4::Object *defaultPrototype(QV4::ExecutionEngine *e) { return
never executed: return e->iteratorPrototype();
e->iteratorPrototype();
never executed: return e->iteratorPrototype();
}
0
74 void init(ExecutionEngine *engine);-
75-
76 static ReturnedValue method_next(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc);-
77};-
78-
79struct ForInIteratorObject: Object {-
80 private: ForInIteratorObject() = delete; ForInIteratorObject(const ForInIteratorObject &) = delete; ForInIteratorObject &operator=(const ForInIteratorObject &) = delete; public: template <typename Type> inline void qt_check_for_QMANAGED_macro(const Type *_q_argument) const { int i = qYouForgotTheQ_MANAGED_Macro(this, _q_argument); i = i + 1; }
executed 24924 times by 14 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
typedef QV4::Heap::ForInIteratorObject Data; typedef Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { return
executed 52354 times by 14 tests: return &static_vtbl;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
&static_vtbl;
executed 52354 times by 14 tests: return &static_vtbl;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
} void __dataTest() { static_assert (sizeof(*this) == sizeof(Managed), "Classes derived from Managed can't have own data members."); }
never executed: end of block
QV4::Heap::ForInIteratorObject *d_unchecked() const { return
executed 43269 times by 14 tests: return static_cast<QV4::Heap::ForInIteratorObject *>(m());
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
static_cast<QV4::Heap::ForInIteratorObject *>(m());
executed 43269 times by 14 tests: return static_cast<QV4::Heap::ForInIteratorObject *>(m());
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
} QV4::Heap::ForInIteratorObject *d() const { QV4::Heap::ForInIteratorObject *dptr = d_unchecked(); dptr->_checkIsInitialized(); return
executed 34152 times by 14 tests: return dptr;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
dptr;
executed 34152 times by 14 tests: return dptr;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
} static_assert(bool(std::is_trivial< QV4::Heap::ForInIteratorObject >::value), "std::is_trivial< QV4::Heap::ForInIteratorObject >::value");
0-52354
81 public: enum { MyType = Type_ForInIterator };-
82 static QV4::Object *defaultPrototype(QV4::ExecutionEngine *e) { return
executed 9154 times by 14 tests: return e->forInIteratorPrototype();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
e->forInIteratorPrototype();
executed 9154 times by 14 tests: return e->forInIteratorPrototype();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
}
9154
83-
84 ReturnedValue nextPropertyName() const { return
executed 24707 times by 12 tests: return d()->it().nextPropertyNameAsString();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
d()->it().nextPropertyNameAsString();
executed 24707 times by 12 tests: return d()->it().nextPropertyNameAsString();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
}
24707
85};-
86-
87inline-
88void Heap::ForInIteratorObject::init(QV4::Object *o)-
89{-
90 Object::init();-
91 it() = ObjectIterator(internalClass->engine, workArea, workArea + 1, o,-
92 ObjectIterator::EnumerableOnly | ObjectIterator::WithProtoChain);-
93}
executed 9116 times by 14 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qtqmlmodules
  • tst_quicktestmainwithsetup
  • tst_qv4debugger
  • tst_testfiltering
9116
94-
95-
96}-
97-
98-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0