| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4objectiterator_p.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | - | |
| 2 | - | |
| 3 | namespace QV4 { | - |
| 4 | - | |
| 5 | struct __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 | }; | - |
| 21 | static_assert(bool(std::is_trivial< ObjectIteratorData >::value), "std::is_trivial< ObjectIteratorData >::value"); | - |
| 22 | - | |
| 23 | struct __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 blockExecuted by:
| 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 blockExecuted by:
| 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 | - | |
| 54 | private: | - |
| 55 | void init(const Object *o); | - |
| 56 | }; | - |
| 57 | - | |
| 58 | namespace Heap { | - |
| 59 | struct ForInIteratorObject : Object { | - |
| 60 | void init(QV4::Object *o); | - |
| 61 | ObjectIterator &it() { return executed 34157 times by 14 tests: *reinterpret_cast<ObjectIterator*>(&itData);return *reinterpret_cast<ObjectIterator*>(&itData);Executed by:
executed 34157 times by 14 tests: }return *reinterpret_cast<ObjectIterator*>(&itData);Executed by:
| 34157 |
| 62 | Value workArea[2]; | - |
| 63 | - | |
| 64 | static void markObjects(Heap::Base *that, MarkStack *markStack); | - |
| 65 | private: | - |
| 66 | ObjectIteratorData itData; | - |
| 67 | }; | - |
| 68 | - | |
| 69 | } | - |
| 70 | - | |
| 71 | struct ForInIteratorPrototype : Object | - |
| 72 | { | - |
| 73 | static QV4::Object *defaultPrototype(QV4::ExecutionEngine *e) { return never executed: e->iteratorPrototype();return 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 | - | |
| 79 | struct 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: typedef QV4::Heap::ForInIteratorObject Data; typedef Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { returnend of blockExecuted by:
executed 52354 times by 14 tests: &static_vtbl;return &static_vtbl;Executed by:
executed 52354 times by 14 tests: } void __dataTest() { static_assert (sizeof(*this) == sizeof(Managed), "Classes derived from Managed can't have own data members."); }return &static_vtbl;Executed by:
never executed: QV4::Heap::ForInIteratorObject *d_unchecked() const { returnend of blockexecuted 43269 times by 14 tests: static_cast<QV4::Heap::ForInIteratorObject *>(m());return static_cast<QV4::Heap::ForInIteratorObject *>(m());Executed by:
executed 43269 times by 14 tests: } QV4::Heap::ForInIteratorObject *d() const { QV4::Heap::ForInIteratorObject *dptr = d_unchecked(); dptr->_checkIsInitialized(); returnreturn static_cast<QV4::Heap::ForInIteratorObject *>(m());Executed by:
executed 34152 times by 14 tests: dptr;return dptr;Executed by:
executed 34152 times by 14 tests: } static_assert(bool(std::is_trivial< QV4::Heap::ForInIteratorObject >::value), "std::is_trivial< QV4::Heap::ForInIteratorObject >::value");return dptr;Executed by:
| 0-52354 |
| 81 | public: enum { MyType = Type_ForInIterator }; | - |
| 82 | static QV4::Object *defaultPrototype(QV4::ExecutionEngine *e) { return executed 9154 times by 14 tests: e->forInIteratorPrototype();return e->forInIteratorPrototype();Executed by:
executed 9154 times by 14 tests: }return e->forInIteratorPrototype();Executed by:
| 9154 |
| 83 | - | |
| 84 | ReturnedValue nextPropertyName() const { return executed 24707 times by 12 tests: d()->it().nextPropertyNameAsString();return d()->it().nextPropertyNameAsString();Executed by:
executed 24707 times by 12 tests: }return d()->it().nextPropertyNameAsString();Executed by:
| 24707 |
| 85 | }; | - |
| 86 | - | |
| 87 | inline | - |
| 88 | void 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 blockExecuted by:
| 9116 |
| 94 | - | |
| 95 | - | |
| 96 | } | - |
| 97 | - | |
| 98 | - | |
| Switch to Source code | Preprocessed file |