OpenCoverage

qv4dateobject_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4dateobject_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4class QDateTime;-
5-
6namespace QV4 {-
7-
8namespace Heap {-
9-
10struct 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 block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qquickworkerscript
38108
22 void init(const QDateTime &date);-
23 void init(const QTime &time);-
24-
25 double date;-
26};-
27-
28-
29struct DateCtor : FunctionObject {-
30 void init(QV4::ExecutionContext *scope);-
31};-
32-
33}-
34-
35struct 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: end of block
typedef QV4::Heap::DateObject Data; typedef Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { return
executed 260263 times by 11 tests: return &static_vtbl;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickworkerscript
&static_vtbl;
executed 260263 times by 11 tests: return &static_vtbl;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickworkerscript
} 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::DateObject *d_unchecked() const { return
executed 221985 times by 11 tests: return static_cast<QV4::Heap::DateObject *>(m());
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickworkerscript
static_cast<QV4::Heap::DateObject *>(m());
executed 221985 times by 11 tests: return static_cast<QV4::Heap::DateObject *>(m());
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickworkerscript
} QV4::Heap::DateObject *d() const { QV4::Heap::DateObject *dptr = d_unchecked(); dptr->_checkIsInitialized(); return
executed 135237 times by 11 tests: return dptr;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickworkerscript
dptr;
executed 135237 times by 11 tests: return dptr;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickworkerscript
} static_assert(bool(std::is_trivial< QV4::Heap::DateObject >::value), "std::is_trivial< QV4::Heap::DateObject >::value");
0-260263
37 public: enum { MyType = Type_DateObject };-
38 static QV4::Object *defaultPrototype(QV4::ExecutionEngine *e) { return
executed 86681 times by 11 tests: return e->datePrototype();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickworkerscript
e->datePrototype();
executed 86681 times by 11 tests: return e->datePrototype();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickworkerscript
}
86681
39-
40-
41 double date() const { return
executed 4 times by 1 test: return d()->date;
Executed by:
  • tst_qquickworkerscript
d()->date;
executed 4 times by 1 test: return d()->date;
Executed by:
  • tst_qquickworkerscript
}
4
42 void setDate(double date) { d()->date = date; }
never executed: end of block
0
43-
44 QDateTime toQDateTime() const;-
45};-
46-
47template<>-
48inline const DateObject *Value::as() const {-
49 return
executed 25150 times by 39 tests: return isManaged() && m()->internalClass->vtable->type == Managed::Type_DateObject ? static_cast<const DateObject *>(this) : nullptr;
Executed by:
  • tst_examples
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem2
  • ...
isManaged() && m()->internalClass->vtable->type == Managed::Type_DateObject ? static_cast<const DateObject *>(this) : nullptr;
executed 25150 times by 39 tests: return isManaged() && m()->internalClass->vtable->type == Managed::Type_DateObject ? static_cast<const DateObject *>(this) : nullptr;
Executed by:
  • tst_examples
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem2
  • ...
25150
50}-
51-
52struct 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: end of block
typedef QV4::Heap::DateCtor Data; typedef FunctionObject SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { return
executed 297026 times by 153 tests: return &static_vtbl;
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
  • ...
&static_vtbl;
executed 297026 times by 153 tests: return &static_vtbl;
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
  • ...
} 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::DateCtor *d_unchecked() const { return
executed 198079 times by 153 tests: return static_cast<QV4::Heap::DateCtor *>(m());
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
  • ...
static_cast<QV4::Heap::DateCtor *>(m());
executed 198079 times by 153 tests: return static_cast<QV4::Heap::DateCtor *>(m());
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
  • ...
} QV4::Heap::DateCtor *d() const { QV4::Heap::DateCtor *dptr = d_unchecked(); dptr->_checkIsInitialized(); return
executed 99089 times by 153 tests: return dptr;
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
  • ...
dptr;
executed 99089 times by 153 tests: return dptr;
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
  • ...
} static_assert(bool(std::is_trivial< QV4::Heap::DateCtor >::value), "std::is_trivial< QV4::Heap::DateCtor >::value");
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-
60struct DatePrototype: Object-
61{-
62 static QV4::Object *defaultPrototype(QV4::ExecutionEngine *e) { return
executed 98622 times by 153 tests: return e->objectPrototype();
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
  • ...
e->objectPrototype();
executed 98622 times by 153 tests: return e->objectPrototype();
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
  • ...
}
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 codePreprocessed file

Generated by Squish Coco 4.2.0