Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4argumentsobject_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | namespace QV4 { | - | ||||||||||||
4 | - | |||||||||||||
5 | namespace Heap { | - | ||||||||||||
6 | - | |||||||||||||
7 | - | |||||||||||||
8 | - | |||||||||||||
9 | - | |||||||||||||
10 | struct ArgumentsGetterFunctionOffsetStruct { uint index; }; struct ArgumentsGetterFunctionSizeStruct : FunctionObject, ArgumentsGetterFunctionOffsetStruct {}; struct ArgumentsGetterFunctionData { typedef FunctionObject SuperClass; static constexpr size_t baseOffset = sizeof(ArgumentsGetterFunctionSizeStruct) - sizeof(ArgumentsGetterFunctionOffsetStruct); uint index; }; static_assert(bool(sizeof(ArgumentsGetterFunctionSizeStruct) == sizeof(ArgumentsGetterFunctionData) + ArgumentsGetterFunctionData::baseOffset), "sizeof(ArgumentsGetterFunctionSizeStruct) == sizeof(ArgumentsGetterFunctionData) + ArgumentsGetterFunctionData::baseOffset"); struct ArgumentsGetterFunction : FunctionObject, ArgumentsGetterFunctionData { | - | ||||||||||||
11 | static void markObjects(Heap::Base *b, MarkStack *stack) { ArgumentsGetterFunction *o = static_cast<ArgumentsGetterFunction *>(b); ArgumentsGetterFunctionData::SuperClass::markObjects(o, stack); } never executed: ;end of block | 0 | ||||||||||||
12 | inline void init(QV4::ExecutionContext *scope, uint index); | - | ||||||||||||
13 | }; | - | ||||||||||||
14 | - | |||||||||||||
15 | - | |||||||||||||
16 | - | |||||||||||||
17 | - | |||||||||||||
18 | struct ArgumentsSetterFunctionOffsetStruct { uint index; }; struct ArgumentsSetterFunctionSizeStruct : FunctionObject, ArgumentsSetterFunctionOffsetStruct {}; struct ArgumentsSetterFunctionData { typedef FunctionObject SuperClass; static constexpr size_t baseOffset = sizeof(ArgumentsSetterFunctionSizeStruct) - sizeof(ArgumentsSetterFunctionOffsetStruct); uint index; }; static_assert(bool(sizeof(ArgumentsSetterFunctionSizeStruct) == sizeof(ArgumentsSetterFunctionData) + ArgumentsSetterFunctionData::baseOffset), "sizeof(ArgumentsSetterFunctionSizeStruct) == sizeof(ArgumentsSetterFunctionData) + ArgumentsSetterFunctionData::baseOffset"); struct ArgumentsSetterFunction : FunctionObject, ArgumentsSetterFunctionData { | - | ||||||||||||
19 | static void markObjects(Heap::Base *b, MarkStack *stack) { ArgumentsSetterFunction *o = static_cast<ArgumentsSetterFunction *>(b); ArgumentsSetterFunctionData::SuperClass::markObjects(o, stack); } never executed: ;end of block | 0 | ||||||||||||
20 | inline void init(QV4::ExecutionContext *scope, uint index); | - | ||||||||||||
21 | }; | - | ||||||||||||
22 | - | |||||||||||||
23 | - | |||||||||||||
24 | - | |||||||||||||
25 | - | |||||||||||||
26 | - | |||||||||||||
27 | - | |||||||||||||
28 | - | |||||||||||||
29 | struct ArgumentsObjectOffsetStruct { Pointer<CallContext *, 0> context; Pointer<MemberData *, 0> mappedArguments; bool fullyCreated; int nFormals; }; struct ArgumentsObjectSizeStruct : Object, ArgumentsObjectOffsetStruct {}; struct ArgumentsObjectData { typedef Object SuperClass; static constexpr size_t baseOffset = sizeof(ArgumentsObjectSizeStruct) - sizeof(ArgumentsObjectOffsetStruct); Pointer<CallContext *, | - | ||||||||||||
30 | __builtin_offsetof ( | - | ||||||||||||
31 | ArgumentsObjectOffsetStruct | - | ||||||||||||
32 | , | - | ||||||||||||
33 | context | - | ||||||||||||
34 | ) | - | ||||||||||||
35 | + baseOffset> context; Pointer<MemberData *, | - | ||||||||||||
36 | __builtin_offsetof ( | - | ||||||||||||
37 | ArgumentsObjectOffsetStruct | - | ||||||||||||
38 | , | - | ||||||||||||
39 | mappedArguments | - | ||||||||||||
40 | ) | - | ||||||||||||
41 | + baseOffset> mappedArguments; bool fullyCreated; int nFormals; }; static_assert(bool(sizeof(ArgumentsObjectSizeStruct) == sizeof(ArgumentsObjectData) + ArgumentsObjectData::baseOffset), "sizeof(ArgumentsObjectSizeStruct) == sizeof(ArgumentsObjectData) + ArgumentsObjectData::baseOffset"); struct ArgumentsObject : Object, ArgumentsObjectData { | - | ||||||||||||
42 | static void markObjects(Heap::Base *b, MarkStack *stack) { ArgumentsObject *o = static_cast<ArgumentsObject *>(b); ArgumentsObjectData::SuperClass::markObjects(o, stack); if (o->context
executed 4 times by 1 test: if (o->mappedArgumentso->context.heapObject()->mark(stack); Executed by:
never executed: }o->mappedArguments.heapObject()->mark(stack); executed 4 times by 1 test: ;end of block Executed by:
| 0-4 | ||||||||||||
43 | enum { | - | ||||||||||||
44 | LengthPropertyIndex = 0, | - | ||||||||||||
45 | SymbolIteratorPropertyIndex = 1, | - | ||||||||||||
46 | CalleePropertyIndex = 2 | - | ||||||||||||
47 | }; | - | ||||||||||||
48 | void init(CppStackFrame *frame); | - | ||||||||||||
49 | }; | - | ||||||||||||
50 | - | |||||||||||||
51 | - | |||||||||||||
52 | - | |||||||||||||
53 | struct StrictArgumentsObjectOffsetStruct { }; struct StrictArgumentsObjectSizeStruct : Object, StrictArgumentsObjectOffsetStruct {}; struct StrictArgumentsObjectData { typedef Object SuperClass; static constexpr size_t baseOffset = sizeof(StrictArgumentsObjectSizeStruct) - sizeof(StrictArgumentsObjectOffsetStruct); }; static_assert(bool(sizeof(StrictArgumentsObjectSizeStruct) == sizeof(StrictArgumentsObjectData) + StrictArgumentsObjectData::baseOffset), "sizeof(StrictArgumentsObjectSizeStruct) == sizeof(StrictArgumentsObjectData) + StrictArgumentsObjectData::baseOffset"); struct StrictArgumentsObject : Object, StrictArgumentsObjectData { | - | ||||||||||||
54 | enum { | - | ||||||||||||
55 | LengthPropertyIndex = 0, | - | ||||||||||||
56 | SymbolIteratorPropertyIndex = 1, | - | ||||||||||||
57 | CalleePropertyIndex = 2 | - | ||||||||||||
58 | }; | - | ||||||||||||
59 | void init(CppStackFrame *frame); | - | ||||||||||||
60 | }; | - | ||||||||||||
61 | - | |||||||||||||
62 | } | - | ||||||||||||
63 | - | |||||||||||||
64 | struct ArgumentsGetterFunction: FunctionObject | - | ||||||||||||
65 | { | - | ||||||||||||
66 | private: ArgumentsGetterFunction() = delete; ArgumentsGetterFunction(const ArgumentsGetterFunction &) = delete; ArgumentsGetterFunction &operator=(const ArgumentsGetterFunction &) = 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; } never executed: typedef QV4::Heap::ArgumentsGetterFunction Data; typedef FunctionObject SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { returnend of block executed 4694 times by 1 test: &static_vtbl;return &static_vtbl; Executed by:
executed 4694 times by 1 test: } 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::ArgumentsGetterFunction *d_unchecked() const { returnend of block executed 3223 times by 1 test: static_cast<QV4::Heap::ArgumentsGetterFunction *>(m());return static_cast<QV4::Heap::ArgumentsGetterFunction *>(m()); Executed by:
executed 3223 times by 1 test: } QV4::Heap::ArgumentsGetterFunction *d() const { QV4::Heap::ArgumentsGetterFunction *dptr = d_unchecked(); dptr->_checkIsInitialized(); returnreturn static_cast<QV4::Heap::ArgumentsGetterFunction *>(m()); Executed by:
executed 1660 times by 1 test: dptr;return dptr; Executed by:
executed 1660 times by 1 test: } static_assert(bool(std::is_trivial< QV4::Heap::ArgumentsGetterFunction >::value), "std::is_trivial< QV4::Heap::ArgumentsGetterFunction >::value");return dptr; Executed by:
| 0-4694 | ||||||||||||
67 | - | |||||||||||||
68 | uint index() const { return executed 96 times by 1 test: d()->index;return d()->index; Executed by:
executed 96 times by 1 test: }return d()->index; Executed by:
| 96 | ||||||||||||
69 | static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc); | - | ||||||||||||
70 | }; | - | ||||||||||||
71 | - | |||||||||||||
72 | inline void | - | ||||||||||||
73 | Heap::ArgumentsGetterFunction::init(QV4::ExecutionContext *scope, uint index) | - | ||||||||||||
74 | { | - | ||||||||||||
75 | Heap::FunctionObject::init(scope); | - | ||||||||||||
76 | this->index = index; | - | ||||||||||||
77 | } executed 1565 times by 1 test: end of block Executed by:
| 1565 | ||||||||||||
78 | - | |||||||||||||
79 | struct ArgumentsSetterFunction: FunctionObject | - | ||||||||||||
80 | { | - | ||||||||||||
81 | private: ArgumentsSetterFunction() = delete; ArgumentsSetterFunction(const ArgumentsSetterFunction &) = delete; ArgumentsSetterFunction &operator=(const ArgumentsSetterFunction &) = 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; } never executed: typedef QV4::Heap::ArgumentsSetterFunction Data; typedef FunctionObject SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { returnend of block executed 4691 times by 1 test: &static_vtbl;return &static_vtbl; Executed by:
executed 4691 times by 1 test: } 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::ArgumentsSetterFunction *d_unchecked() const { returnend of block executed 3234 times by 1 test: static_cast<QV4::Heap::ArgumentsSetterFunction *>(m());return static_cast<QV4::Heap::ArgumentsSetterFunction *>(m()); Executed by:
executed 3234 times by 1 test: } QV4::Heap::ArgumentsSetterFunction *d() const { QV4::Heap::ArgumentsSetterFunction *dptr = d_unchecked(); dptr->_checkIsInitialized(); returnreturn static_cast<QV4::Heap::ArgumentsSetterFunction *>(m()); Executed by:
executed 1669 times by 1 test: dptr;return dptr; Executed by:
executed 1669 times by 1 test: } static_assert(bool(std::is_trivial< QV4::Heap::ArgumentsSetterFunction >::value), "std::is_trivial< QV4::Heap::ArgumentsSetterFunction >::value");return dptr; Executed by:
| 0-4691 | ||||||||||||
82 | - | |||||||||||||
83 | uint index() const { return executed 102 times by 1 test: d()->index;return d()->index; Executed by:
executed 102 times by 1 test: }return d()->index; Executed by:
| 102 | ||||||||||||
84 | static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc); | - | ||||||||||||
85 | }; | - | ||||||||||||
86 | - | |||||||||||||
87 | inline void | - | ||||||||||||
88 | Heap::ArgumentsSetterFunction::init(QV4::ExecutionContext *scope, uint index) | - | ||||||||||||
89 | { | - | ||||||||||||
90 | Heap::FunctionObject::init(scope); | - | ||||||||||||
91 | this->index = index; | - | ||||||||||||
92 | } executed 1567 times by 1 test: end of block Executed by:
| 1567 | ||||||||||||
93 | - | |||||||||||||
94 | - | |||||||||||||
95 | struct ArgumentsObject: Object { | - | ||||||||||||
96 | private: ArgumentsObject() = delete; ArgumentsObject(const ArgumentsObject &) = delete; ArgumentsObject &operator=(const ArgumentsObject &) = 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 30057 times by 36 tests: typedef QV4::Heap::ArgumentsObject Data; typedef Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { returnend of block Executed by:
executed 169827 times by 153 tests: &static_vtbl;return &static_vtbl; Executed by:
executed 169827 times by 153 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::ArgumentsObject *d_unchecked() const { returnend of block executed 11555 times by 4 tests: static_cast<QV4::Heap::ArgumentsObject *>(m());return static_cast<QV4::Heap::ArgumentsObject *>(m()); Executed by:
executed 11555 times by 4 tests: } QV4::Heap::ArgumentsObject *d() const { QV4::Heap::ArgumentsObject *dptr = d_unchecked(); dptr->_checkIsInitialized(); returnreturn static_cast<QV4::Heap::ArgumentsObject *>(m()); Executed by:
executed 11560 times by 4 tests: dptr;return dptr; Executed by:
executed 11560 times by 4 tests: } static_assert(bool(std::is_trivial< QV4::Heap::ArgumentsObject >::value), "std::is_trivial< QV4::Heap::ArgumentsObject >::value");return dptr; Executed by:
| 0-169827 | ||||||||||||
97 | public: enum { MyType = Type_ArgumentsObject }; | - | ||||||||||||
98 | - | |||||||||||||
99 | Heap::CallContext *context() const { return executed 4090 times by 4 tests: d()->context;return d()->context; Executed by:
executed 4090 times by 4 tests: }return d()->context; Executed by:
| 4090 | ||||||||||||
100 | bool fullyCreated() const { return executed 4952 times by 4 tests: d()->fullyCreated;return d()->fullyCreated; Executed by:
executed 4952 times by 4 tests: }return d()->fullyCreated; Executed by:
| 4952 | ||||||||||||
101 | - | |||||||||||||
102 | static bool isNonStrictArgumentsObject(Managed *m) { | - | ||||||||||||
103 | return executed 25667 times by 3 tests: m->vtable() == staticVTable();return m->vtable() == staticVTable(); Executed by:
executed 25667 times by 3 tests: return m->vtable() == staticVTable(); Executed by:
| 25667 | ||||||||||||
104 | } | - | ||||||||||||
105 | - | |||||||||||||
106 | static bool virtualDefineOwnProperty(Managed *m, PropertyKey id, const Property *desc, PropertyAttributes attrs); | - | ||||||||||||
107 | static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty); | - | ||||||||||||
108 | static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver); | - | ||||||||||||
109 | static bool virtualDeleteProperty(Managed *m, PropertyKey id); | - | ||||||||||||
110 | static PropertyAttributes virtualGetOwnProperty(Managed *m, PropertyKey id, Property *p); | - | ||||||||||||
111 | static qint64 virtualGetLength(const Managed *m); | - | ||||||||||||
112 | - | |||||||||||||
113 | void fullyCreate(); | - | ||||||||||||
114 | - | |||||||||||||
115 | }; | - | ||||||||||||
116 | - | |||||||||||||
117 | struct StrictArgumentsObject : Object { | - | ||||||||||||
118 | private: StrictArgumentsObject() = delete; StrictArgumentsObject(const StrictArgumentsObject &) = delete; StrictArgumentsObject &operator=(const StrictArgumentsObject &) = 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; } never executed: typedef QV4::Heap::StrictArgumentsObject Data; typedef Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { returnend of block executed 110509 times by 153 tests: &static_vtbl;return &static_vtbl; Executed by:
executed 110509 times by 153 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::StrictArgumentsObject *d_unchecked() const { returnend of block never executed: static_cast<QV4::Heap::StrictArgumentsObject *>(m());return static_cast<QV4::Heap::StrictArgumentsObject *>(m()); never executed: } QV4::Heap::StrictArgumentsObject *d() const { QV4::Heap::StrictArgumentsObject *dptr = d_unchecked(); dptr->_checkIsInitialized(); returnreturn static_cast<QV4::Heap::StrictArgumentsObject *>(m()); never executed: dptr;return dptr; never executed: } static_assert(bool(std::is_trivial< QV4::Heap::StrictArgumentsObject >::value), "std::is_trivial< QV4::Heap::StrictArgumentsObject >::value");return dptr; | 0-110509 | ||||||||||||
119 | public: enum { MyType = Type_ArgumentsObject }; | - | ||||||||||||
120 | }; | - | ||||||||||||
121 | - | |||||||||||||
122 | } | - | ||||||||||||
123 | - | |||||||||||||
124 | - | |||||||||||||
Switch to Source code | Preprocessed file |