| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4dateobject_p.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | - | |
| 2 | - | |
| 3 | - | |
| 4 | class QDateTime; | - |
| 5 | - | |
| 6 | namespace QV4 { | - |
| 7 | - | |
| 8 | namespace Heap { | - |
| 9 | - | |
| 10 | struct DateObject : Object { | - |
| 11 | void init() | - |
| 12 | { | - |
| 13 | Object::init(); | - |
| 14 | date = qt_qnan(); | - |
| 15 | } never executed: end of block | 0 |
| 16 | - | |
| 17 | void init(const Value &date) | - |
| 18 | { | - |
| 19 | Object::init(); | - |
| 20 | this->date = date.toNumber(); | - |
| 21 | } executed 38108 times by 9 tests: end of blockExecuted by:
| 38108 |
| 22 | void init(const QDateTime &date); | - |
| 23 | void init(const QTime &time); | - |
| 24 | - | |
| 25 | double date; | - |
| 26 | }; | - |
| 27 | - | |
| 28 | - | |
| 29 | struct DateCtor : FunctionObject { | - |
| 30 | void init(QV4::ExecutionContext *scope); | - |
| 31 | }; | - |
| 32 | - | |
| 33 | } | - |
| 34 | - | |
| 35 | struct DateObject: Object { | - |
| 36 | private: DateObject() = delete; DateObject(const DateObject &) = delete; DateObject &operator=(const DateObject &) = 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::DateObject Data; typedef Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { returnend of blockexecuted 260263 times by 11 tests: &static_vtbl;return &static_vtbl;Executed by:
executed 260263 times by 11 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::DateObject *d_unchecked() const { returnend of blockexecuted 221985 times by 11 tests: static_cast<QV4::Heap::DateObject *>(m());return static_cast<QV4::Heap::DateObject *>(m());Executed by:
executed 221985 times by 11 tests: } QV4::Heap::DateObject *d() const { QV4::Heap::DateObject *dptr = d_unchecked(); dptr->_checkIsInitialized(); returnreturn static_cast<QV4::Heap::DateObject *>(m());Executed by:
executed 135237 times by 11 tests: dptr;return dptr;Executed by:
executed 135237 times by 11 tests: } static_assert(bool(std::is_trivial< QV4::Heap::DateObject >::value), "std::is_trivial< QV4::Heap::DateObject >::value");return dptr;Executed by:
| 0-260263 |
| 37 | public: enum { MyType = Type_DateObject }; | - |
| 38 | static QV4::Object *defaultPrototype(QV4::ExecutionEngine *e) { return executed 86681 times by 11 tests: e->datePrototype();return e->datePrototype();Executed by:
executed 86681 times by 11 tests: }return e->datePrototype();Executed by:
| 86681 |
| 39 | - | |
| 40 | - | |
| 41 | double date() const { return executed 4 times by 1 test: d()->date;return d()->date;Executed by:
executed 4 times by 1 test: }return d()->date;Executed by:
| 4 |
| 42 | void setDate(double date) { d()->date = date; } never executed: end of block | 0 |
| 43 | - | |
| 44 | QDateTime toQDateTime() const; | - |
| 45 | }; | - |
| 46 | - | |
| 47 | template<> | - |
| 48 | inline const DateObject *Value::as() const { | - |
| 49 | return executed 25150 times by 39 tests: isManaged() && m()->internalClass->vtable->type == Managed::Type_DateObject ? static_cast<const DateObject *>(this) : nullptr;return isManaged() && m()->internalClass->vtable->type == Managed::Type_DateObject ? static_cast<const DateObject *>(this) : nullptr;Executed by:
executed 25150 times by 39 tests: return isManaged() && m()->internalClass->vtable->type == Managed::Type_DateObject ? static_cast<const DateObject *>(this) : nullptr;Executed by:
| 25150 |
| 50 | } | - |
| 51 | - | |
| 52 | struct DateCtor: FunctionObject | - |
| 53 | { | - |
| 54 | private: DateCtor() = delete; DateCtor(const DateCtor &) = delete; DateCtor &operator=(const DateCtor &) = 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::DateCtor Data; typedef FunctionObject SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { returnend of blockexecuted 297026 times by 153 tests: &static_vtbl;return &static_vtbl;Executed by:
executed 297026 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::DateCtor *d_unchecked() const { returnend of blockexecuted 198079 times by 153 tests: static_cast<QV4::Heap::DateCtor *>(m());return static_cast<QV4::Heap::DateCtor *>(m());Executed by:
executed 198079 times by 153 tests: } QV4::Heap::DateCtor *d() const { QV4::Heap::DateCtor *dptr = d_unchecked(); dptr->_checkIsInitialized(); returnreturn static_cast<QV4::Heap::DateCtor *>(m());Executed by:
executed 99089 times by 153 tests: dptr;return dptr;Executed by:
executed 99089 times by 153 tests: } static_assert(bool(std::is_trivial< QV4::Heap::DateCtor >::value), "std::is_trivial< QV4::Heap::DateCtor >::value");return dptr;Executed by:
| 0-297026 |
| 55 | - | |
| 56 | static ReturnedValue virtualCallAsConstructor(const FunctionObject *, const Value *argv, int argc, const Value *); | - |
| 57 | static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int); | - |
| 58 | }; | - |
| 59 | - | |
| 60 | struct DatePrototype: Object | - |
| 61 | { | - |
| 62 | static QV4::Object *defaultPrototype(QV4::ExecutionEngine *e) { return executed 98622 times by 153 tests: e->objectPrototype();return e->objectPrototype();Executed by:
executed 98622 times by 153 tests: }return e->objectPrototype();Executed by:
| 98622 |
| 63 | - | |
| 64 | void init(ExecutionEngine *engine, Object *ctor); | - |
| 65 | - | |
| 66 | static double getThisDate(ExecutionEngine *v4, const Value *thisObject); | - |
| 67 | - | |
| 68 | static ReturnedValue method_parse(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 69 | static ReturnedValue method_UTC(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 70 | static ReturnedValue method_now(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 71 | - | |
| 72 | static ReturnedValue method_toString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 73 | static ReturnedValue method_toDateString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 74 | static ReturnedValue method_toTimeString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 75 | static ReturnedValue method_toLocaleString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 76 | static ReturnedValue method_toLocaleDateString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 77 | static ReturnedValue method_toLocaleTimeString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 78 | static ReturnedValue method_valueOf(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 79 | static ReturnedValue method_getTime(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 80 | static ReturnedValue method_getYear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 81 | static ReturnedValue method_getFullYear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 82 | static ReturnedValue method_getUTCFullYear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 83 | static ReturnedValue method_getMonth(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 84 | static ReturnedValue method_getUTCMonth(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 85 | static ReturnedValue method_getDate(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 86 | static ReturnedValue method_getUTCDate(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 87 | static ReturnedValue method_getDay(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 88 | static ReturnedValue method_getUTCDay(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 89 | static ReturnedValue method_getHours(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 90 | static ReturnedValue method_getUTCHours(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 91 | static ReturnedValue method_getMinutes(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 92 | static ReturnedValue method_getUTCMinutes(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 93 | static ReturnedValue method_getSeconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 94 | static ReturnedValue method_getUTCSeconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 95 | static ReturnedValue method_getMilliseconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 96 | static ReturnedValue method_getUTCMilliseconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 97 | static ReturnedValue method_getTimezoneOffset(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 98 | static ReturnedValue method_setTime(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 99 | static ReturnedValue method_setMilliseconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 100 | static ReturnedValue method_setUTCMilliseconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 101 | static ReturnedValue method_setSeconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 102 | static ReturnedValue method_setUTCSeconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 103 | static ReturnedValue method_setMinutes(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 104 | static ReturnedValue method_setUTCMinutes(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 105 | static ReturnedValue method_setHours(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 106 | static ReturnedValue method_setUTCHours(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 107 | static ReturnedValue method_setDate(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 108 | static ReturnedValue method_setUTCDate(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 109 | static ReturnedValue method_setMonth(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 110 | static ReturnedValue method_setUTCMonth(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 111 | static ReturnedValue method_setYear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 112 | static ReturnedValue method_setFullYear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 113 | static ReturnedValue method_setUTCFullYear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 114 | static ReturnedValue method_toUTCString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 115 | static ReturnedValue method_toISOString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 116 | static ReturnedValue method_toJSON(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
| 117 | static ReturnedValue method_symbolToPrimitive(const FunctionObject *f, const Value *thisObject, const Value *, int); | - |
| 118 | - | |
| 119 | static void timezoneUpdated(ExecutionEngine *e); | - |
| 120 | }; | - |
| 121 | - | |
| 122 | } | - |
| 123 | - | |
| 124 | - | |
| Switch to Source code | Preprocessed file |