OpenCoverage

qv4argumentsobject.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4argumentsobject.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2using namespace QV4;-
3-
4const QV4::VTable ArgumentsObject::static_vtbl = { (std::is_same<ArgumentsObject::SuperClass, Object>::value) ? nullptr : &ArgumentsObject::SuperClass::static_vtbl, (sizeof(ArgumentsObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(ArgumentsObject::Data) + (ArgumentsObject::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(ArgumentsObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), ArgumentsObject::IsExecutionContext, ArgumentsObject::IsString, ArgumentsObject::IsObject, ArgumentsObject::IsFunctionObject, ArgumentsObject::IsErrorObject, ArgumentsObject::IsArrayData, ArgumentsObject::IsStringOrSymbol, ArgumentsObject::MyType, { 0, 0, 0, 0 }, "ArgumentsObject", ArgumentsObject::virtualDestroy, ArgumentsObject::Data::markObjects, ArgumentsObject::virtualIsEqualTo, ArgumentsObject::virtualGet, ArgumentsObject::virtualPut, ArgumentsObject::virtualDeleteProperty, ArgumentsObject::virtualHasProperty, ArgumentsObject::virtualGetOwnProperty, ArgumentsObject::virtualDefineOwnProperty, ArgumentsObject::virtualIsExtensible, ArgumentsObject::virtualPreventExtensions, ArgumentsObject::virtualGetPrototypeOf, ArgumentsObject::virtualSetPrototypeOf, ArgumentsObject::virtualGetLength, ArgumentsObject::virtualAdvanceIterator, ArgumentsObject::virtualInstanceOf, ArgumentsObject::virtualCall, ArgumentsObject::virtualCallAsConstructor, };-
5const QV4::VTable StrictArgumentsObject::static_vtbl = { (std::is_same<StrictArgumentsObject::SuperClass, Object>::value) ? nullptr : &StrictArgumentsObject::SuperClass::static_vtbl, (sizeof(StrictArgumentsObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(StrictArgumentsObject::Data) + (StrictArgumentsObject::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(StrictArgumentsObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), StrictArgumentsObject::IsExecutionContext, StrictArgumentsObject::IsString, StrictArgumentsObject::IsObject, StrictArgumentsObject::IsFunctionObject, StrictArgumentsObject::IsErrorObject, StrictArgumentsObject::IsArrayData, StrictArgumentsObject::IsStringOrSymbol, StrictArgumentsObject::MyType, { 0, 0, 0, 0 }, "StrictArgumentsObject", StrictArgumentsObject::virtualDestroy, StrictArgumentsObject::Data::markObjects, StrictArgumentsObject::virtualIsEqualTo, StrictArgumentsObject::virtualGet, StrictArgumentsObject::virtualPut, StrictArgumentsObject::virtualDeleteProperty, StrictArgumentsObject::virtualHasProperty, StrictArgumentsObject::virtualGetOwnProperty, StrictArgumentsObject::virtualDefineOwnProperty, StrictArgumentsObject::virtualIsExtensible, StrictArgumentsObject::virtualPreventExtensions, StrictArgumentsObject::virtualGetPrototypeOf, StrictArgumentsObject::virtualSetPrototypeOf, StrictArgumentsObject::virtualGetLength, StrictArgumentsObject::virtualAdvanceIterator, StrictArgumentsObject::virtualInstanceOf, StrictArgumentsObject::virtualCall, StrictArgumentsObject::virtualCallAsConstructor, };-
6-
7void Heap::ArgumentsObject::init(QV4::CppStackFrame *frame)-
8{-
9 ExecutionEngine *v4 = internalClass->engine;-
10-
11 int nFormals = frame->v4Function->nFormals;-
12 QV4::CallContext *context = static_cast<QV4::CallContext *>(frame->context());-
13-
14 Object::init();-
15 fullyCreated = false;-
16 this->nFormals = nFormals;-
17 this->context.set(v4, context->d());-
18 ((vtable() == QV4::ArgumentsObject::staticVTable()) ? static_cast<void>(0) : qt_assert("vtable() == QV4::ArgumentsObject::staticVTable()", __FILE__, 64));-
19-
20 ((CalleePropertyIndex == internalClass->find(v4->id_callee()->propertyKey())) ? static_cast<void>(0) : qt_assert("CalleePropertyIndex == internalClass->find(v4->id_callee()->propertyKey())", __FILE__, 66));-
21 setProperty(v4, CalleePropertyIndex, context->d()->function);-
22 ((LengthPropertyIndex == internalClass->find(v4->id_length()->propertyKey())) ? static_cast<void>(0) : qt_assert("LengthPropertyIndex == internalClass->find(v4->id_length()->propertyKey())", __FILE__, 68));-
23 setProperty(v4, LengthPropertyIndex, Primitive::fromInt32(context->argc()));-
24 ((SymbolIteratorPropertyIndex == internalClass->find(v4->symbol_iterator()->propertyKey())) ? static_cast<void>(0) : qt_assert("SymbolIteratorPropertyIndex == internalClass->find(v4->symbol_iterator()->propertyKey())", __FILE__, 70));-
25 setProperty(v4, SymbolIteratorPropertyIndex, *v4->arrayProtoValues());-
26}
executed 4487 times by 11 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qquicklayouts
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
4487
27-
28void Heap::StrictArgumentsObject::init(QV4::CppStackFrame *frame)-
29{-
30 ((vtable() == QV4::StrictArgumentsObject::staticVTable()) ? static_cast<void>(0) : qt_assert("vtable() == QV4::StrictArgumentsObject::staticVTable()", __FILE__, 76));-
31 ExecutionEngine *v4 = internalClass->engine;-
32-
33 Object::init();-
34-
35 ((CalleePropertyIndex == internalClass->find(v4->id_callee()->propertyKey())) ? static_cast<void>(0) : qt_assert("CalleePropertyIndex == internalClass->find(v4->id_callee()->propertyKey())", __FILE__, 81));-
36 ((SymbolIteratorPropertyIndex == internalClass->find(v4->symbol_iterator()->propertyKey())) ? static_cast<void>(0) : qt_assert("SymbolIteratorPropertyIndex == internalClass->find(v4->symbol_iterator()->propertyKey())", __FILE__, 82));-
37 setProperty(v4, SymbolIteratorPropertyIndex, *v4->arrayProtoValues());-
38 setProperty(v4, CalleePropertyIndex + QV4::Object::GetterOffset, *v4->thrower());-
39 setProperty(v4, CalleePropertyIndex + QV4::Object::SetterOffset, *v4->thrower());-
40-
41 Scope scope(v4);-
42 Scoped<QV4::StrictArgumentsObject> args(scope, this);-
43 args->arrayReserve(frame->originalArgumentsCount);-
44 args->arrayPut(0, frame->originalArguments, frame->originalArgumentsCount);-
45-
46 ((LengthPropertyIndex == args->internalClass()->find(v4->id_length()->propertyKey())) ? static_cast<void>(0) : qt_assert("LengthPropertyIndex == args->internalClass()->find(v4->id_length()->propertyKey())", __FILE__, 92));-
47 setProperty(v4, LengthPropertyIndex, Primitive::fromInt32(frame->originalArgumentsCount));-
48}
executed 3836 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
3836
49-
50void ArgumentsObject::fullyCreate()-
51{-
52 if (fullyCreated()
fullyCreated()Description
TRUEevaluated 1101 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 446 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
446-1101
53 return;
executed 1101 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
1101
54-
55 Scope scope(engine());-
56-
57 int argCount = context()->argc();-
58 uint numAccessors = qMin(d()->nFormals, argCount);-
59 ArrayData::realloc(this, Heap::ArrayData::Sparse, argCount, true);-
60 scope.engine->requireArgumentsAccessors(numAccessors);-
61-
62 Scoped<MemberData> md(scope, d()->mappedArguments);-
63 if (numAccessors
numAccessorsDescription
TRUEevaluated 200 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 252 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
200-252
64 d()->mappedArguments.set(scope.engine, md->allocate(scope.engine, numAccessors));-
65 for (uint i = 0; i < numAccessors
i < numAccessorsDescription
TRUEevaluated 403 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 198 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; ++i) {
198-403
66 d()->mappedArguments->values.set(scope.engine, i, context()->args()[i]);-
67 arraySet(i, scope.engine->argumentsAccessors + i, Attr_Accessor);-
68 }
executed 403 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
403
69 }
executed 199 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
199
70 arrayPut(numAccessors, context()->args() + numAccessors, argCount - numAccessors);-
71 for (int i = int(numAccessors); i < argCount
i < argCountDescription
TRUEevaluated 334 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 451 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; ++i)
334-451
72 setArrayAttributes(i, Attr_Data);
executed 334 times by 1 test: setArrayAttributes(i, Attr_Data);
Executed by:
  • tst_ecmascripttests
334
73-
74 d()->fullyCreated = true;-
75}
executed 450 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
450
76-
77bool ArgumentsObject::virtualDefineOwnProperty(Managed *m, PropertyKey id, const Property *desc, PropertyAttributes attrs)-
78{-
79 if (!id.isArrayIndex()
!id.isArrayIndex()Description
TRUEevaluated 188 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 399 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
188-399
80 return
executed 188 times by 1 test: return Object::virtualDefineOwnProperty(m, id, desc, attrs);
Executed by:
  • tst_ecmascripttests
Object::virtualDefineOwnProperty(m, id, desc, attrs);
executed 188 times by 1 test: return Object::virtualDefineOwnProperty(m, id, desc, attrs);
Executed by:
  • tst_ecmascripttests
188
81-
82 ArgumentsObject *a = static_cast<ArgumentsObject *>(m);-
83 a->fullyCreate();-
84-
85 uint index = id.asArrayIndex();-
86 Scope scope(m);-
87 ScopedProperty map(scope);-
88 PropertyAttributes mapAttrs;-
89 uint numAccessors = qMin(a->d()->nFormals, a->context()->argc());-
90 bool isMapped = false;-
91 if (a->arrayData()
a->arrayData()Description
TRUEevaluated 401 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
&& index < numAccessors
index < numAccessorsDescription
TRUEevaluated 225 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 176 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&&
0-401
92 a->arrayData()->attributes(index).isAccessor()
a->arrayData()...).isAccessor()Description
TRUEevaluated 144 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 80 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&&
80-144
93 a->arrayData()->get(index) == scope.engine->argumentsAccessors[index].getter()->asReturnedValue()
a->arrayData()...eturnedValue()Description
TRUEevaluated 124 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
20-124
94 isMapped = true;
executed 124 times by 1 test: isMapped = true;
Executed by:
  • tst_ecmascripttests
124
95-
96 if (isMapped
isMappedDescription
TRUEevaluated 124 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 276 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
124-276
97 ((a->arrayData()) ? static_cast<void>(0) : qt_assert("a->arrayData()", __FILE__, 143));-
98 mapAttrs = a->arrayData()->attributes(index);-
99 a->arrayData()->getProperty(index, map, &mapAttrs);-
100 a->setArrayAttributes(index, Attr_Data);-
101 PropertyIndex arrayIndex{ a->arrayData(), a->arrayData()->values.values + a->arrayData()->mappedIndex(index) };-
102 arrayIndex.set(scope.engine, a->d()->mappedArguments->values[index]);-
103 }
executed 126 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
126
104-
105 bool result = Object::virtualDefineOwnProperty(m, id, desc, attrs);-
106 if (!result
!resultDescription
TRUEevaluated 88 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 312 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
88-312
107 return
executed 88 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
false;
executed 88 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
88
108-
109 if (isMapped
isMappedDescription
TRUEevaluated 125 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 188 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& attrs.isData()
attrs.isData()Description
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 74 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
52-188
110 ((a->arrayData()) ? static_cast<void>(0) : qt_assert("a->arrayData()", __FILE__, 156));-
111 ScopedFunctionObject setter(scope, map->setter());-
112 JSCallData jsCallData(scope, 1);-
113 *jsCallData->thisObject = a->asReturnedValue();-
114 jsCallData->args[0] = desc->value;-
115 setter->call(jsCallData);-
116-
117 if (attrs.isWritable()
attrs.isWritable()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 49 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
2-49
118 a->setArrayAttributes(index, mapAttrs);-
119 a->arrayData()->setProperty(m->engine(), index, map);-
120 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
2
121 }
executed 51 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
51
122-
123 return
executed 313 times by 1 test: return result;
Executed by:
  • tst_ecmascripttests
result;
executed 313 times by 1 test: return result;
Executed by:
  • tst_ecmascripttests
313
124}-
125-
126ReturnedValue ArgumentsObject::virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty)-
127{-
128 const ArgumentsObject *args = static_cast<const ArgumentsObject *>(m);-
129 if (id.isArrayIndex()
id.isArrayIndex()Description
TRUEevaluated 1601 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
FALSEevaluated 1291 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
&& !args->fullyCreated()
!args->fullyCreated()Description
TRUEevaluated 1075 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
FALSEevaluated 525 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
525-1601
130 uint index = id.asArrayIndex();-
131 if (index < static_cast<uint>(args->context()->argc())
index < static...ext()->argc())Description
TRUEevaluated 1047 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
) {
28-1047
132 if (hasProperty
hasPropertyDescription
TRUEevaluated 222 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 825 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
)
222-825
133 *
executed 222 times by 1 test: *hasProperty = true;
Executed by:
  • tst_ecmascripttests
hasProperty = true;
executed 222 times by 1 test: *hasProperty = true;
Executed by:
  • tst_ecmascripttests
222
134 return
executed 1046 times by 4 tests: return args->context()->args()[index].asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
args->context()->args()[index].asReturnedValue();
executed 1046 times by 4 tests: return args->context()->args()[index].asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
1046
135 }-
136 }
executed 28 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsvalue
28
137 return
executed 1844 times by 6 tests: return Object::virtualGet(m, id, receiver, hasProperty);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
Object::virtualGet(m, id, receiver, hasProperty);
executed 1844 times by 6 tests: return Object::virtualGet(m, id, receiver, hasProperty);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
1844
138}-
139-
140bool ArgumentsObject::virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver)-
141{-
142 ArgumentsObject *args = static_cast<ArgumentsObject *>(m);-
143 if (id.isArrayIndex()
id.isArrayIndex()Description
TRUEevaluated 237 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 327 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
237-327
144 uint index = id.asArrayIndex();-
145 if (!args->fullyCreated()
!args->fullyCreated()Description
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 191 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& index >= static_cast<uint>(args->context()->argc())
index >= stati...ext()->argc())Description
TRUEevaluated 30 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
16-191
146 args->fullyCreate();
executed 30 times by 1 test: args->fullyCreate();
Executed by:
  • tst_ecmascripttests
30
147-
148 if (!args->fullyCreated()
!args->fullyCreated()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 221 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
16-221
149 args->context()->setArg(index, value);-
150 return
executed 16 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
true;
executed 16 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
16
151 }-
152 }
executed 221 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
221
153 return
executed 549 times by 1 test: return Object::virtualPut(m, id, value, receiver);
Executed by:
  • tst_ecmascripttests
Object::virtualPut(m, id, value, receiver);
executed 549 times by 1 test: return Object::virtualPut(m, id, value, receiver);
Executed by:
  • tst_ecmascripttests
549
154}-
155-
156bool ArgumentsObject::virtualDeleteProperty(Managed *m, PropertyKey id)-
157{-
158 ArgumentsObject *args = static_cast<ArgumentsObject *>(m);-
159 if (!args->fullyCreated()
!args->fullyCreated()Description
TRUEevaluated 54 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 287 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
54-287
160 args->fullyCreate();
executed 53 times by 1 test: args->fullyCreate();
Executed by:
  • tst_ecmascripttests
53
161 return
executed 342 times by 1 test: return Object::virtualDeleteProperty(m, id);
Executed by:
  • tst_ecmascripttests
Object::virtualDeleteProperty(m, id);
executed 342 times by 1 test: return Object::virtualDeleteProperty(m, id);
Executed by:
  • tst_ecmascripttests
342
162}-
163-
164PropertyAttributes ArgumentsObject::virtualGetOwnProperty(Managed *m, PropertyKey id, Property *p)-
165{-
166 const ArgumentsObject *args = static_cast<const ArgumentsObject *>(m);-
167 if (!id.isArrayIndex()
!id.isArrayIndex()Description
TRUEevaluated 801 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 974 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| args->fullyCreated()
args->fullyCreated()Description
TRUEevaluated 978 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
2-978
168 return
executed 1778 times by 1 test: return Object::virtualGetOwnProperty(m, id, p);
Executed by:
  • tst_ecmascripttests
Object::virtualGetOwnProperty(m, id, p);
executed 1778 times by 1 test: return Object::virtualGetOwnProperty(m, id, p);
Executed by:
  • tst_ecmascripttests
1778
169-
170 uint index = id.asArrayIndex();-
171 uint argCount = args->context()->argc();-
172 if (index >= argCount
index >= argCountDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
)
0-2
173 return
executed 2 times by 1 test: return PropertyAttributes();
Executed by:
  • tst_ecmascripttests
PropertyAttributes();
executed 2 times by 1 test: return PropertyAttributes();
Executed by:
  • tst_ecmascripttests
2
174 if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
175 p->value = args->context()->args()[index];
never executed: p->value = args->context()->args()[index];
0
176 return
never executed: return Attr_Data;
Attr_Data;
never executed: return Attr_Data;
0
177}-
178-
179const QV4::VTable ArgumentsGetterFunction::static_vtbl = { (std::is_same<ArgumentsGetterFunction::SuperClass, Object>::value) ? nullptr : &ArgumentsGetterFunction::SuperClass::static_vtbl, (sizeof(ArgumentsGetterFunction::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(ArgumentsGetterFunction::Data) + (ArgumentsGetterFunction::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(ArgumentsGetterFunction::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), ArgumentsGetterFunction::IsExecutionContext, ArgumentsGetterFunction::IsString, ArgumentsGetterFunction::IsObject, ArgumentsGetterFunction::IsFunctionObject, ArgumentsGetterFunction::IsErrorObject, ArgumentsGetterFunction::IsArrayData, ArgumentsGetterFunction::IsStringOrSymbol, ArgumentsGetterFunction::MyType, { 0, 0, 0, 0 }, "ArgumentsGetterFunction", ArgumentsGetterFunction::virtualDestroy, ArgumentsGetterFunction::Data::markObjects, ArgumentsGetterFunction::virtualIsEqualTo, ArgumentsGetterFunction::virtualGet, ArgumentsGetterFunction::virtualPut, ArgumentsGetterFunction::virtualDeleteProperty, ArgumentsGetterFunction::virtualHasProperty, ArgumentsGetterFunction::virtualGetOwnProperty, ArgumentsGetterFunction::virtualDefineOwnProperty, ArgumentsGetterFunction::virtualIsExtensible, ArgumentsGetterFunction::virtualPreventExtensions, ArgumentsGetterFunction::virtualGetPrototypeOf, ArgumentsGetterFunction::virtualSetPrototypeOf, ArgumentsGetterFunction::virtualGetLength, ArgumentsGetterFunction::virtualAdvanceIterator, ArgumentsGetterFunction::virtualInstanceOf, ArgumentsGetterFunction::virtualCall, ArgumentsGetterFunction::virtualCallAsConstructor, };-
180-
181ReturnedValue ArgumentsGetterFunction::virtualCall(const FunctionObject *getter, const Value *thisObject, const Value *, int)-
182{-
183 ExecutionEngine *v4 = getter->engine();-
184 Scope scope(v4);-
185 const ArgumentsGetterFunction *g = static_cast<const ArgumentsGetterFunction *>(getter);-
186 Scoped<ArgumentsObject> o(scope, thisObject->as<ArgumentsObject>());-
187 if (!o
!oDescription
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-48
188 return
never executed: return v4->throwTypeError();
v4->throwTypeError();
never executed: return v4->throwTypeError();
0
189-
190 ((g->index() < static_cast<unsigned>(o->context()->argc())) ? static_cast<void>(0) : qt_assert("g->index() < static_cast<unsigned>(o->context()->argc())", __FILE__, 236));-
191 return
executed 48 times by 1 test: return o->context()->args()[g->index()].asReturnedValue();
Executed by:
  • tst_ecmascripttests
o->context()->args()[g->index()].asReturnedValue();
executed 48 times by 1 test: return o->context()->args()[g->index()].asReturnedValue();
Executed by:
  • tst_ecmascripttests
48
192}-
193-
194const QV4::VTable ArgumentsSetterFunction::static_vtbl = { (std::is_same<ArgumentsSetterFunction::SuperClass, Object>::value) ? nullptr : &ArgumentsSetterFunction::SuperClass::static_vtbl, (sizeof(ArgumentsSetterFunction::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(ArgumentsSetterFunction::Data) + (ArgumentsSetterFunction::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(ArgumentsSetterFunction::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), ArgumentsSetterFunction::IsExecutionContext, ArgumentsSetterFunction::IsString, ArgumentsSetterFunction::IsObject, ArgumentsSetterFunction::IsFunctionObject, ArgumentsSetterFunction::IsErrorObject, ArgumentsSetterFunction::IsArrayData, ArgumentsSetterFunction::IsStringOrSymbol, ArgumentsSetterFunction::MyType, { 0, 0, 0, 0 }, "ArgumentsSetterFunction", ArgumentsSetterFunction::virtualDestroy, ArgumentsSetterFunction::Data::markObjects, ArgumentsSetterFunction::virtualIsEqualTo, ArgumentsSetterFunction::virtualGet, ArgumentsSetterFunction::virtualPut, ArgumentsSetterFunction::virtualDeleteProperty, ArgumentsSetterFunction::virtualHasProperty, ArgumentsSetterFunction::virtualGetOwnProperty, ArgumentsSetterFunction::virtualDefineOwnProperty, ArgumentsSetterFunction::virtualIsExtensible, ArgumentsSetterFunction::virtualPreventExtensions, ArgumentsSetterFunction::virtualGetPrototypeOf, ArgumentsSetterFunction::virtualSetPrototypeOf, ArgumentsSetterFunction::virtualGetLength, ArgumentsSetterFunction::virtualAdvanceIterator, ArgumentsSetterFunction::virtualInstanceOf, ArgumentsSetterFunction::virtualCall, ArgumentsSetterFunction::virtualCallAsConstructor, };-
195-
196ReturnedValue ArgumentsSetterFunction::virtualCall(const FunctionObject *setter, const Value *thisObject, const Value *argv, int argc)-
197{-
198 ExecutionEngine *v4 = setter->engine();-
199 Scope scope(v4);-
200 const ArgumentsSetterFunction *s = static_cast<const ArgumentsSetterFunction *>(setter);-
201 Scoped<ArgumentsObject> o(scope, thisObject->as<ArgumentsObject>());-
202 if (!o
!oDescription
TRUEnever evaluated
FALSEevaluated 51 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-51
203 return
never executed: return v4->throwTypeError();
v4->throwTypeError();
never executed: return v4->throwTypeError();
0
204-
205 ((s->index() < static_cast<unsigned>(o->context()->argc())) ? static_cast<void>(0) : qt_assert("s->index() < static_cast<unsigned>(o->context()->argc())", __FILE__, 251));-
206 o->context()->setArg(s->index(), argc ? argv[0] : Primitive::undefinedValue());-
207 return
executed 51 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 51 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
51
208}-
209-
210qint64 ArgumentsObject::virtualGetLength(const Managed *m)-
211{-
212 const ArgumentsObject *a = static_cast<const ArgumentsObject *>(m);-
213 return
executed 208 times by 1 test: return a->propertyData(Heap::ArgumentsObject::LengthPropertyIndex)->toLength();
Executed by:
  • tst_ecmascripttests
a->propertyData(Heap::ArgumentsObject::LengthPropertyIndex)->toLength();
executed 208 times by 1 test: return a->propertyData(Heap::ArgumentsObject::LengthPropertyIndex)->toLength();
Executed by:
  • tst_ecmascripttests
208
214}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0