Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | namespace QV4 { | - |
7 | | - |
8 | struct CallData | - |
9 | { | - |
10 | enum Offsets { | - |
11 | Function = 0, | - |
12 | Context = 1, | - |
13 | Accumulator = 2, | - |
14 | This = 3, | - |
15 | NewTarget = 4, | - |
16 | Argc = 5 | - |
17 | }; | - |
18 | | - |
19 | Value function; | - |
20 | Value context; | - |
21 | Value accumulator; | - |
22 | Value thisObject; | - |
23 | Value newTarget; | - |
24 | Value _argc; | - |
25 | | - |
26 | int argc() const { | - |
27 | ((_argc.isInteger()) ? static_cast<void>(0) : qt_assert("_argc.isInteger()", __FILE__, 71)); | - |
28 | returnexecuted 2207750 times by 130 tests: return _argc.int_32(); 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_qqmlconsole
- tst_qqmlcontext
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllistreference
- ...
_argc.int_32();executed 2207750 times by 130 tests: return _argc.int_32(); 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_qqmlconsole
- tst_qqmlcontext
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllistreference
- ...
| 2207750 |
29 | } | - |
30 | | - |
31 | void setArgc(int argc) { | - |
32 | ((argc >= 0) ? static_cast<void>(0) : qt_assert("argc >= 0", __FILE__, 76)); | - |
33 | _argc.setInt_32(argc); | - |
34 | }executed 19862422 times by 135 tests: end of block Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
| 19862422 |
35 | | - |
36 | inline ReturnedValue argument(int i) const { | - |
37 | return never executed: return i < argc() ? args[i].asReturnedValue() : Primitive::undefinedValue().asReturnedValue(); i < argc() ? args[i].asReturnedValue() : Primitive::undefinedValue().asReturnedValue();never executed: return i < argc() ? args[i].asReturnedValue() : Primitive::undefinedValue().asReturnedValue(); | 0 |
38 | } | - |
39 | | - |
40 | Value args[1]; | - |
41 | | - |
42 | static constexpr int HeaderSize() { return | - |
43 | __builtin_offsetof ( | - |
44 | CallData | - |
45 | , | - |
46 | args | - |
47 | ) | - |
48 | / sizeof(QV4::Value); } | - |
49 | }; | - |
50 | | - |
51 | static_assert(bool(std::is_standard_layout<CallData>::value), "std::is_standard_layout<CallData>::value"); | - |
52 | static_assert(bool( | - |
53 | __builtin_offsetof ( | - |
54 | CallData | - |
55 | , | - |
56 | thisObject | - |
57 | ) | - |
58 | == CallData::This*sizeof(Value)), "offsetof(CallData, thisObject) == CallData::This*sizeof(Value)"); | - |
59 | static_assert(bool( | - |
60 | __builtin_offsetof ( | - |
61 | CallData | - |
62 | , | - |
63 | args | - |
64 | ) | - |
65 | == 6*sizeof(Value)), "offsetof(CallData, args) == 6*sizeof(Value)"); | - |
66 | | - |
67 | struct __attribute__((visibility("default"))) CppStackFrame { | - |
68 | EngineBase *engine; | - |
69 | Value *savedStackTop; | - |
70 | CppStackFrame *parent; | - |
71 | Function *v4Function; | - |
72 | CallData *jsFrame; | - |
73 | const Value *originalArguments; | - |
74 | int originalArgumentsCount; | - |
75 | int instructionPointer; | - |
76 | const char *yield; | - |
77 | const char *unwindHandler; | - |
78 | const char *unwindLabel; | - |
79 | int unwindLevel; | - |
80 | | - |
81 | void init(EngineBase *engine, Function *v4Function, const Value *argv, int argc) { | - |
82 | this->engine = engine; | - |
83 | | - |
84 | this->v4Function = v4Function; | - |
85 | originalArguments = argv; | - |
86 | originalArgumentsCount = argc; | - |
87 | instructionPointer = 0; | - |
88 | yield = nullptr; | - |
89 | unwindHandler = nullptr; | - |
90 | unwindLabel = nullptr; | - |
91 | unwindLevel = 0; | - |
92 | }executed 17775220 times by 135 tests: end of block Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
| 17775220 |
93 | | - |
94 | void push() { | - |
95 | parent = engine->currentStackFrame; | - |
96 | engine->currentStackFrame = this; | - |
97 | savedStackTop = engine->jsStackTop; | - |
98 | }executed 17779491 times by 135 tests: end of block Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
| 17779491 |
99 | | - |
100 | void pop() { | - |
101 | engine->currentStackFrame = parent; | - |
102 | engine->jsStackTop = savedStackTop; | - |
103 | }executed 17723791 times by 135 tests: end of block Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
| 17723791 |
104 | | - |
105 | | - |
106 | static uint requiredJSStackFrameSize(uint nRegisters) { | - |
107 | returnexecuted 360 times by 1 test: return CallData::HeaderSize() + nRegisters; CallData::HeaderSize() + nRegisters;executed 360 times by 1 test: return CallData::HeaderSize() + nRegisters; | 360 |
108 | } | - |
109 | static uint requiredJSStackFrameSize(Function *v4Function) { | - |
110 | returnexecuted 17794237 times by 135 tests: return CallData::HeaderSize() + v4Function->compiledFunction->nRegisters; Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
CallData::HeaderSize() + v4Function->compiledFunction->nRegisters;executed 17794237 times by 135 tests: return CallData::HeaderSize() + v4Function->compiledFunction->nRegisters; Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
| 17794237 |
111 | } | - |
112 | uint requiredJSStackFrameSize() const { | - |
113 | returnexecuted 17779960 times by 135 tests: return requiredJSStackFrameSize(v4Function); Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
requiredJSStackFrameSize(v4Function);executed 17779960 times by 135 tests: return requiredJSStackFrameSize(v4Function); Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
| 17779960 |
114 | } | - |
115 | void setupJSFrame(Value *stackSpace, const Value &function, const Heap::ExecutionContext *scope, | - |
116 | const Value &thisObject, const Value &newTarget = Primitive::undefinedValue()) { | - |
117 | setupJSFrame(stackSpace, function, scope, thisObject, newTarget, | - |
118 | v4Function->nFormals, v4Function->compiledFunction->nRegisters); | - |
119 | }executed 17766858 times by 135 tests: end of block Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
| 17766858 |
120 | void setupJSFrame(Value *stackSpace, const Value &function, const Heap::ExecutionContext *scope, | - |
121 | const Value &thisObject, const Value &newTarget, uint nFormals, uint nRegisters) | - |
122 | { | - |
123 | jsFrame = reinterpret_cast<CallData *>(stackSpace); | - |
124 | jsFrame->function = function; | - |
125 | jsFrame->context = scope->asReturnedValue(); | - |
126 | jsFrame->accumulator = Encode::undefined(); | - |
127 | jsFrame->thisObject = thisObject; | - |
128 | jsFrame->newTarget = newTarget; | - |
129 | | - |
130 | uint argc = uint(originalArgumentsCount); | - |
131 | if (argc > nFormalsTRUE | evaluated 16554 times by 12 testsEvaluated by:- tst_ecmascripttests
- tst_qjsengine
- tst_qjsvalue
- tst_qqmlecmascript
- tst_qqmlitemmodels
- tst_qqmlqt
- tst_qquickanimationcontroller
- tst_qquicklayouts
- tst_qquickworkerscript
- tst_quicktestmainwithsetup
- tst_qv4debugger
- tst_testfiltering
| FALSE | evaluated 17741876 times by 135 testsEvaluated by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
|
) | 16554-17741876 |
132 | argc = nFormals;executed 16554 times by 12 tests: argc = nFormals; Executed by:- tst_ecmascripttests
- tst_qjsengine
- tst_qjsvalue
- tst_qqmlecmascript
- tst_qqmlitemmodels
- tst_qqmlqt
- tst_qquickanimationcontroller
- tst_qquicklayouts
- tst_qquickworkerscript
- tst_quicktestmainwithsetup
- tst_qv4debugger
- tst_testfiltering
| 16554 |
133 | jsFrame->setArgc(argc); | - |
134 | | - |
135 | memcpy(jsFrame->args, originalArguments, argc*sizeof(Value)); | - |
136 | const Value *end = jsFrame->args + nRegisters; | - |
137 | for (Value *v = jsFrame->args + argc; v < endTRUE | evaluated 200097203 times by 135 testsEvaluated by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
| FALSE | evaluated 17772939 times by 135 testsEvaluated by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
|
; ++v) | 17772939-200097203 |
138 | *executed 200159901 times by 135 tests: *v = Encode::undefined(); Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
v = Encode::undefined();executed 200159901 times by 135 tests: *v = Encode::undefined(); Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
| 200159901 |
139 | }executed 17749088 times by 135 tests: end of block Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- ...
| 17749088 |
140 | | - |
141 | | - |
142 | QString source() const; | - |
143 | QString function() const; | - |
144 | inline QV4::ExecutionContext *context() const { | - |
145 | returnexecuted 8691557 times by 29 tests: return static_cast<ExecutionContext *>(&jsFrame->context); Executed by:- tst_ecmascripttests
- tst_examples
- tst_qjsengine
- tst_qjsvalue
- tst_qmlcachegen
- tst_qqmlapplicationengine
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmlmetatype
- tst_qqmlqt
- tst_qqmlsqldatabase
- tst_qqmlxmlhttprequest
- tst_qquickanimationcontroller
- tst_qquickapplication
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickpathview
- tst_qquickstates
- ...
static_cast<ExecutionContext *>(&jsFrame->context);executed 8691557 times by 29 tests: return static_cast<ExecutionContext *>(&jsFrame->context); Executed by:- tst_ecmascripttests
- tst_examples
- tst_qjsengine
- tst_qjsvalue
- tst_qmlcachegen
- tst_qqmlapplicationengine
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmlmetatype
- tst_qqmlqt
- tst_qqmlsqldatabase
- tst_qqmlxmlhttprequest
- tst_qquickanimationcontroller
- tst_qquickapplication
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklayouts
- tst_qquicklistview
- tst_qquickpathview
- tst_qquickstates
- ...
| 8691557 |
146 | } | - |
147 | int lineNumber() const; | - |
148 | | - |
149 | inline QV4::Heap::CallContext *callContext() const { | - |
150 | Heap::ExecutionContext *ctx = static_cast<ExecutionContext &>(jsFrame->context).d(); | - |
151 | while (ctx->type != Heap::ExecutionContext::Type_CallContextTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
152 | ctx = ctx->outer; never executed: ctx = ctx->outer; | 0 |
153 | return never executed: return static_cast<Heap::CallContext *>(ctx); static_cast<Heap::CallContext *>(ctx);never executed: return static_cast<Heap::CallContext *>(ctx); | 0 |
154 | } | - |
155 | ReturnedValue thisObject() const; | - |
156 | }; | - |
157 | | - |
158 | } | - |
159 | | - |
160 | | - |
| | |