| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | namespace QV4 { | - |
| 5 | | - |
| 6 | struct JSCallData { | - |
| 7 | JSCallData(const Scope &scope, int argc = 0, const Value *argv = nullptr, const Value *thisObject = nullptr) | - |
| 8 | : scope(scope), argc(argc) | - |
| 9 | { | - |
| 10 | if (thisObject| TRUE | evaluated 130768 times by 57 testsEvaluated by:- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_qjsengine
- tst_qmlcachegen
- tst_qqmlcomponent
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllocale
- tst_qqmlmetatype
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- tst_qqmlsqldatabase
- tst_qqmltimer
- tst_qqmltranslation
- tst_qqmltypeloader
- tst_qqmlvaluetypeproviders
- ...
| | FALSE | evaluated 2129716 times by 128 testsEvaluated by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qjsengine
- tst_qjsonbinding
- tst_qjsvalue
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- ...
|
) | 130768-2129716 |
| 11 | this->thisObject = const_cast<Value *>(thisObject);executed 130766 times by 57 tests: this->thisObject = const_cast<Value *>(thisObject);Executed by:- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_qjsengine
- tst_qmlcachegen
- tst_qqmlcomponent
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllocale
- tst_qqmlmetatype
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- tst_qqmlsqldatabase
- tst_qqmltimer
- tst_qqmltranslation
- tst_qqmltypeloader
- tst_qqmlvaluetypeproviders
- ...
| 130766 |
| 12 | else | - |
| 13 | this->thisObject = scope.alloc();executed 2129711 times by 128 tests: this->thisObject = scope.alloc();Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qjsengine
- tst_qjsonbinding
- tst_qjsvalue
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- ...
| 2129711 |
| 14 | if (argv| TRUE | evaluated 63958 times by 54 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qjsengine
- tst_qmlcachegen
- tst_qqmlcomponent
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllocale
- tst_qqmlmetatype
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- tst_qqmlsqldatabase
- tst_qqmltimer
- tst_qqmltranslation
- tst_qqmltypeloader
- tst_qqmlvaluetypeproviders
- tst_qqmlvaluetypes
- ...
| | FALSE | evaluated 2196506 times by 129 testsEvaluated by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qjsengine
- tst_qjsonbinding
- tst_qjsvalue
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- ...
|
) | 63958-2196506 |
| 15 | this->args = const_cast<Value *>(argv);executed 63958 times by 54 tests: this->args = const_cast<Value *>(argv);Executed by:- tst_examples
- tst_flickableinterop
- tst_qjsengine
- tst_qmlcachegen
- tst_qqmlcomponent
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllocale
- tst_qqmlmetatype
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- tst_qqmlsqldatabase
- tst_qqmltimer
- tst_qqmltranslation
- tst_qqmltypeloader
- tst_qqmlvaluetypeproviders
- tst_qqmlvaluetypes
- ...
| 63958 |
| 16 | else | - |
| 17 | this->args = scope.alloc(argc);executed 2196529 times by 129 tests: this->args = scope.alloc(argc);Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qjsengine
- tst_qjsonbinding
- tst_qjsvalue
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- ...
| 2196529 |
| 18 | } | - |
| 19 | | - |
| 20 | JSCallData *operator->() { | - |
| 21 | returnexecuted 146035 times by 50 tests: return this;Executed by:- tst_ecmascripttests
- tst_examples
- tst_qjsengine
- tst_qjsonbinding
- tst_qjsvalue
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlqt
- tst_qqmlsettings
- tst_qqmlsqldatabase
- tst_qqmlvaluetypes
- tst_qqmlxmlhttprequest
- tst_qquickanimationcontroller
- ...
this;executed 146035 times by 50 tests: return this;Executed by:- tst_ecmascripttests
- tst_examples
- tst_qjsengine
- tst_qjsonbinding
- tst_qjsvalue
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlqt
- tst_qqmlsettings
- tst_qqmlsqldatabase
- tst_qqmlvaluetypes
- tst_qqmlxmlhttprequest
- tst_qquickanimationcontroller
- ...
| 146035 |
| 22 | } | - |
| 23 | | - |
| 24 | CallData *callData(const FunctionObject *f = nullptr) const { | - |
| 25 | int size = int( | - |
| 26 | __builtin_offsetof ( | - |
| 27 | QV4::CallData | - |
| 28 | , | - |
| 29 | args | - |
| 30 | ) | - |
| 31 | /sizeof(QV4::Value)) + argc; | - |
| 32 | CallData *ptr = reinterpret_cast<CallData *>(scope.alloc<Scope::Uninitialized>(size)); | - |
| 33 | ptr->function = Encode::undefined(); | - |
| 34 | ptr->context = Encode::undefined(); | - |
| 35 | ptr->accumulator = Encode::undefined(); | - |
| 36 | ptr->thisObject = thisObject->asReturnedValue(); | - |
| 37 | ptr->setArgc(argc); | - |
| 38 | if (argc| TRUE | evaluated 56475 times by 43 testsEvaluated by:- tst_examples
- tst_qjsengine
- tst_qmlcachegen
- tst_qqmlcomponent
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllocale
- tst_qqmlproperty
- tst_qqmlqt
- tst_qqmlsqldatabase
- tst_qqmltranslation
- tst_qqmlvaluetypeproviders
- tst_qqmlvaluetypes
- tst_qqmlxmlhttprequest
- tst_qquickanimationcontroller
- tst_qquickbehaviors
- tst_qquickdrag
- tst_qquickdroparea
- ...
| | FALSE | evaluated 2029413 times by 124 testsEvaluated by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qjsengine
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlmetaobject
- ...
|
) | 56475-2029413 |
| 39 | memcpy(ptr->args, args, argc*sizeof(Value));executed 56475 times by 43 tests: memcpy(ptr->args, args, argc*sizeof(Value));Executed by:- tst_examples
- tst_qjsengine
- tst_qmlcachegen
- tst_qqmlcomponent
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllocale
- tst_qqmlproperty
- tst_qqmlqt
- tst_qqmlsqldatabase
- tst_qqmltranslation
- tst_qqmlvaluetypeproviders
- tst_qqmlvaluetypes
- tst_qqmlxmlhttprequest
- tst_qquickanimationcontroller
- tst_qquickbehaviors
- tst_qquickdrag
- tst_qquickdroparea
- ...
| 56475 |
| 40 | if (f| TRUE | never evaluated | | FALSE | evaluated 2085888 times by 124 testsEvaluated by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qjsengine
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlmetaobject
- ...
|
) | 0-2085888 |
| 41 | ptr->function = f->asReturnedValue(); never executed: ptr->function = f->asReturnedValue(); | 0 |
| 42 | returnexecuted 2085888 times by 124 tests: return ptr;Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qjsengine
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlmetaobject
- ...
ptr;executed 2085888 times by 124 tests: return ptr;Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qjsengine
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlmetaobject
- ...
| 2085888 |
| 43 | } | - |
| 44 | const Scope &scope; | - |
| 45 | int argc; | - |
| 46 | Value *args; | - |
| 47 | Value *thisObject; | - |
| 48 | }; | - |
| 49 | | - |
| 50 | inline | - |
| 51 | ReturnedValue FunctionObject::callAsConstructor(const JSCallData &data) const | - |
| 52 | { | - |
| 53 | if (!d()->jsConstruct| TRUE | never evaluated | | FALSE | evaluated 100 times by 1 test |
) | 0-100 |
| 54 | return never executed: return engine()->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Object is not a constructor.")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Object is not a constructor." }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())); engine()->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Object is not a constructor.")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Object is not a constructor." }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); returnnever executed: return qstring_literal_temp; qstring_literal_temp;never executed: return qstring_literal_temp; }()));never executed: return engine()->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Object is not a constructor.")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Object is not a constructor." }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())); | 0 |
| 55 | returnexecuted 100 times by 1 test: return d()->jsConstruct(this, data.args, data.argc, this); d()->jsConstruct(this, data.args, data.argc, this);executed 100 times by 1 test: return d()->jsConstruct(this, data.args, data.argc, this); | 100 |
| 56 | } | - |
| 57 | | - |
| 58 | inline | - |
| 59 | ReturnedValue FunctionObject::call(const JSCallData &data) const | - |
| 60 | { | - |
| 61 | returnexecuted 174482 times by 52 tests: return d()->jsCall(this, data.thisObject, data.args, data.argc);Executed by:- tst_ecmascripttests
- tst_examples
- tst_qjsengine
- tst_qjsonbinding
- tst_qjsvalue
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlqt
- tst_qqmlsettings
- tst_qqmlsqldatabase
- tst_qqmlvaluetypes
- tst_qqmlxmlhttprequest
- tst_qquickanimationcontroller
- ...
d()->jsCall(this, data.thisObject, data.args, data.argc);executed 174482 times by 52 tests: return d()->jsCall(this, data.thisObject, data.args, data.argc);Executed by:- tst_ecmascripttests
- tst_examples
- tst_qjsengine
- tst_qjsonbinding
- tst_qjsvalue
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlqt
- tst_qqmlsettings
- tst_qqmlsqldatabase
- tst_qqmlvaluetypes
- tst_qqmlxmlhttprequest
- tst_qquickanimationcontroller
- ...
| 174482 |
| 62 | } | - |
| 63 | | - |
| 64 | | - |
| 65 | struct ScopedStackFrame { | - |
| 66 | Scope &scope; | - |
| 67 | CppStackFrame frame; | - |
| 68 | | - |
| 69 | ScopedStackFrame(Scope &scope, Heap::ExecutionContext *context) | - |
| 70 | : scope(scope) | - |
| 71 | { | - |
| 72 | frame.parent = scope.engine->currentStackFrame; | - |
| 73 | if (!context| TRUE | never evaluated | | FALSE | evaluated 58 times by 8 testsEvaluated by:- tst_examples
- tst_qqmlcomponent
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qquicklayouts
- tst_qquickloader
- tst_qquickpathview
- tst_qquickpositioners
|
) | 0-58 |
| 74 | return; never executed: return; | 0 |
| 75 | frame.jsFrame = reinterpret_cast<CallData *>(scope.alloc(sizeof(CallData)/sizeof(Value))); | - |
| 76 | frame.jsFrame->context = context; | - |
| 77 | frame.v4Function = frame.parent| TRUE | evaluated 50 times by 8 testsEvaluated by:- tst_examples
- tst_qqmlcomponent
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qquicklayouts
- tst_qquickloader
- tst_qquickpathview
- tst_qquickpositioners
| | FALSE | evaluated 8 times by 2 testsEvaluated by:- tst_qqmlcomponent
- tst_qquickloader
|
? frame.parent->v4Function : nullptr; | 8-50 |
| 78 | scope.engine->currentStackFrame = &frame; | - |
| 79 | }executed 58 times by 8 tests: end of blockExecuted by:- tst_examples
- tst_qqmlcomponent
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qquicklayouts
- tst_qquickloader
- tst_qquickpathview
- tst_qquickpositioners
| 58 |
| 80 | ~ScopedStackFrame() { | - |
| 81 | scope.engine->currentStackFrame = frame.parent; | - |
| 82 | }executed 58 times by 8 tests: end of blockExecuted by:- tst_examples
- tst_qqmlcomponent
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qquicklayouts
- tst_qquickloader
- tst_qquickpathview
- tst_qquickpositioners
| 58 |
| 83 | }; | - |
| 84 | | - |
| 85 | } | - |
| 86 | | - |
| 87 | | - |
| | |