OpenCoverage

qv4typedarray.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4typedarray.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5using namespace QV4;-
6-
7const QV4::VTable IntrinsicTypedArrayCtor::static_vtbl = { (std::is_same<IntrinsicTypedArrayCtor::SuperClass, Object>::value) ? nullptr : &IntrinsicTypedArrayCtor::SuperClass::static_vtbl, (sizeof(IntrinsicTypedArrayCtor::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(IntrinsicTypedArrayCtor::Data) + (IntrinsicTypedArrayCtor::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(IntrinsicTypedArrayCtor::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), IntrinsicTypedArrayCtor::IsExecutionContext, IntrinsicTypedArrayCtor::IsString, IntrinsicTypedArrayCtor::IsObject, IntrinsicTypedArrayCtor::IsFunctionObject, IntrinsicTypedArrayCtor::IsErrorObject, IntrinsicTypedArrayCtor::IsArrayData, IntrinsicTypedArrayCtor::IsStringOrSymbol, IntrinsicTypedArrayCtor::MyType, { 0, 0, 0, 0 }, "IntrinsicTypedArrayCtor", IntrinsicTypedArrayCtor::virtualDestroy, IntrinsicTypedArrayCtor::Data::markObjects, IntrinsicTypedArrayCtor::virtualIsEqualTo, IntrinsicTypedArrayCtor::virtualGet, IntrinsicTypedArrayCtor::virtualPut, IntrinsicTypedArrayCtor::virtualDeleteProperty, IntrinsicTypedArrayCtor::virtualHasProperty, IntrinsicTypedArrayCtor::virtualGetOwnProperty, IntrinsicTypedArrayCtor::virtualDefineOwnProperty, IntrinsicTypedArrayCtor::virtualIsExtensible, IntrinsicTypedArrayCtor::virtualPreventExtensions, IntrinsicTypedArrayCtor::virtualGetPrototypeOf, IntrinsicTypedArrayCtor::virtualSetPrototypeOf, IntrinsicTypedArrayCtor::virtualGetLength, IntrinsicTypedArrayCtor::virtualAdvanceIterator, IntrinsicTypedArrayCtor::virtualInstanceOf, IntrinsicTypedArrayCtor::virtualCall, IntrinsicTypedArrayCtor::virtualCallAsConstructor, };-
8const QV4::VTable IntrinsicTypedArrayPrototype::static_vtbl = { (std::is_same<IntrinsicTypedArrayPrototype::SuperClass, Object>::value) ? nullptr : &IntrinsicTypedArrayPrototype::SuperClass::static_vtbl, (sizeof(IntrinsicTypedArrayPrototype::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(IntrinsicTypedArrayPrototype::Data) + (IntrinsicTypedArrayPrototype::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(IntrinsicTypedArrayPrototype::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), IntrinsicTypedArrayPrototype::IsExecutionContext, IntrinsicTypedArrayPrototype::IsString, IntrinsicTypedArrayPrototype::IsObject, IntrinsicTypedArrayPrototype::IsFunctionObject, IntrinsicTypedArrayPrototype::IsErrorObject, IntrinsicTypedArrayPrototype::IsArrayData, IntrinsicTypedArrayPrototype::IsStringOrSymbol, IntrinsicTypedArrayPrototype::MyType, { 0, 0, 0, 0 }, "IntrinsicTypedArrayPrototype", IntrinsicTypedArrayPrototype::virtualDestroy, IntrinsicTypedArrayPrototype::Data::markObjects, IntrinsicTypedArrayPrototype::virtualIsEqualTo, IntrinsicTypedArrayPrototype::virtualGet, IntrinsicTypedArrayPrototype::virtualPut, IntrinsicTypedArrayPrototype::virtualDeleteProperty, IntrinsicTypedArrayPrototype::virtualHasProperty, IntrinsicTypedArrayPrototype::virtualGetOwnProperty, IntrinsicTypedArrayPrototype::virtualDefineOwnProperty, IntrinsicTypedArrayPrototype::virtualIsExtensible, IntrinsicTypedArrayPrototype::virtualPreventExtensions, IntrinsicTypedArrayPrototype::virtualGetPrototypeOf, IntrinsicTypedArrayPrototype::virtualSetPrototypeOf, IntrinsicTypedArrayPrototype::virtualGetLength, IntrinsicTypedArrayPrototype::virtualAdvanceIterator, IntrinsicTypedArrayPrototype::virtualInstanceOf, IntrinsicTypedArrayPrototype::virtualCall, IntrinsicTypedArrayPrototype::virtualCallAsConstructor, };-
9const QV4::VTable TypedArrayCtor::static_vtbl = { (std::is_same<TypedArrayCtor::SuperClass, Object>::value) ? nullptr : &TypedArrayCtor::SuperClass::static_vtbl, (sizeof(TypedArrayCtor::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(TypedArrayCtor::Data) + (TypedArrayCtor::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(TypedArrayCtor::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), TypedArrayCtor::IsExecutionContext, TypedArrayCtor::IsString, TypedArrayCtor::IsObject, TypedArrayCtor::IsFunctionObject, TypedArrayCtor::IsErrorObject, TypedArrayCtor::IsArrayData, TypedArrayCtor::IsStringOrSymbol, TypedArrayCtor::MyType, { 0, 0, 0, 0 }, "TypedArrayCtor", TypedArrayCtor::virtualDestroy, TypedArrayCtor::Data::markObjects, TypedArrayCtor::virtualIsEqualTo, TypedArrayCtor::virtualGet, TypedArrayCtor::virtualPut, TypedArrayCtor::virtualDeleteProperty, TypedArrayCtor::virtualHasProperty, TypedArrayCtor::virtualGetOwnProperty, TypedArrayCtor::virtualDefineOwnProperty, TypedArrayCtor::virtualIsExtensible, TypedArrayCtor::virtualPreventExtensions, TypedArrayCtor::virtualGetPrototypeOf, TypedArrayCtor::virtualSetPrototypeOf, TypedArrayCtor::virtualGetLength, TypedArrayCtor::virtualAdvanceIterator, TypedArrayCtor::virtualInstanceOf, TypedArrayCtor::virtualCall, TypedArrayCtor::virtualCallAsConstructor, };-
10const QV4::VTable TypedArrayPrototype::static_vtbl = { (std::is_same<TypedArrayPrototype::SuperClass, Object>::value) ? nullptr : &TypedArrayPrototype::SuperClass::static_vtbl, (sizeof(TypedArrayPrototype::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(TypedArrayPrototype::Data) + (TypedArrayPrototype::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(TypedArrayPrototype::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), TypedArrayPrototype::IsExecutionContext, TypedArrayPrototype::IsString, TypedArrayPrototype::IsObject, TypedArrayPrototype::IsFunctionObject, TypedArrayPrototype::IsErrorObject, TypedArrayPrototype::IsArrayData, TypedArrayPrototype::IsStringOrSymbol, TypedArrayPrototype::MyType, { 0, 0, 0, 0 }, "TypedArrayPrototype", TypedArrayPrototype::virtualDestroy, TypedArrayPrototype::Data::markObjects, TypedArrayPrototype::virtualIsEqualTo, TypedArrayPrototype::virtualGet, TypedArrayPrototype::virtualPut, TypedArrayPrototype::virtualDeleteProperty, TypedArrayPrototype::virtualHasProperty, TypedArrayPrototype::virtualGetOwnProperty, TypedArrayPrototype::virtualDefineOwnProperty, TypedArrayPrototype::virtualIsExtensible, TypedArrayPrototype::virtualPreventExtensions, TypedArrayPrototype::virtualGetPrototypeOf, TypedArrayPrototype::virtualSetPrototypeOf, TypedArrayPrototype::virtualGetLength, TypedArrayPrototype::virtualAdvanceIterator, TypedArrayPrototype::virtualInstanceOf, TypedArrayPrototype::virtualCall, TypedArrayPrototype::virtualCallAsConstructor, };-
11const QV4::VTable TypedArray::static_vtbl = { (std::is_same<TypedArray::SuperClass, Object>::value) ? nullptr : &TypedArray::SuperClass::static_vtbl, (sizeof(TypedArray::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(TypedArray::Data) + (TypedArray::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(TypedArray::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), TypedArray::IsExecutionContext, TypedArray::IsString, TypedArray::IsObject, TypedArray::IsFunctionObject, TypedArray::IsErrorObject, TypedArray::IsArrayData, TypedArray::IsStringOrSymbol, TypedArray::MyType, { 0, 0, 0, 0 }, "TypedArray", TypedArray::virtualDestroy, TypedArray::Data::markObjects, TypedArray::virtualIsEqualTo, TypedArray::virtualGet, TypedArray::virtualPut, TypedArray::virtualDeleteProperty, TypedArray::virtualHasProperty, TypedArray::virtualGetOwnProperty, TypedArray::virtualDefineOwnProperty, TypedArray::virtualIsExtensible, TypedArray::virtualPreventExtensions, TypedArray::virtualGetPrototypeOf, TypedArray::virtualSetPrototypeOf, TypedArray::virtualGetLength, TypedArray::virtualAdvanceIterator, TypedArray::virtualInstanceOf, TypedArray::virtualCall, TypedArray::virtualCallAsConstructor, };-
12-
13static_assert(bool((int)ExecutionEngine::NTypedArrayTypes == (int)Heap::TypedArray::NTypes), "(int)ExecutionEngine::NTypedArrayTypes == (int)Heap::TypedArray::NTypes");-
14-
15ReturnedValue Int8ArrayRead(const char *data, int index)-
16{-
17 return
executed 2866 times by 1 test: return Encode((int)(signed char)data[index]);
Executed by:
  • tst_ecmascripttests
Encode((int)(signed char)data[index]);
executed 2866 times by 1 test: return Encode((int)(signed char)data[index]);
Executed by:
  • tst_ecmascripttests
2866
18}-
19-
20void Int8ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)-
21{-
22 signed char v = (signed char)value.toUInt32();-
23 if (e->hasException
e->hasExceptionDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2890 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
46-2890
24 return;
executed 46 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
46
25 data[index] = v;-
26}
executed 2890 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
2890
27-
28ReturnedValue UInt8ArrayRead(const char *data, int index)-
29{-
30 return
executed 8704 times by 1 test: return Encode((int)(unsigned char)data[index]);
Executed by:
  • tst_ecmascripttests
Encode((int)(unsigned char)data[index]);
executed 8704 times by 1 test: return Encode((int)(unsigned char)data[index]);
Executed by:
  • tst_ecmascripttests
8704
31}-
32-
33void UInt8ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)-
34{-
35 unsigned char v = (unsigned char)value.toUInt32();-
36 if (e->hasException
e->hasExceptionDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 34972 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
)
46-34972
37 return;
executed 46 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
46
38 data[index] = v;-
39}
executed 34971 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
34971
40-
41void UInt8ClampedArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)-
42{-
43 if (value.isInteger()
value.isInteger()Description
TRUEevaluated 2289 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 570 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
570-2289
44 data[index] = (char)(unsigned char)qBound(0, value.integerValue(), 255);-
45 return;
executed 2289 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
2289
46 }-
47 double d = value.toNumber();-
48 if (e->hasException
e->hasExceptionDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 524 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
46-524
49 return;
executed 46 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
46
50-
51 if (d <= 0
d <= 0Description
TRUEevaluated 176 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 348 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| std::isnan(d)
std::isnan(d)Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 284 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
64-348
52 data[index] = 0;-
53 return;
executed 240 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
240
54 }-
55 if (d >= 255
d >= 255Description
TRUEevaluated 124 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 160 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
124-160
56 data[index] = (char)(255);-
57 return;
executed 124 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
124
58 }-
59 double f = std::floor(d);-
60 if (f + 0.5 < d
f + 0.5 < dDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 112 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
48-112
61 data[index] = (unsigned char)(f + 1);-
62 return;
executed 48 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
48
63 }-
64 if (d < f + 0.5
d < f + 0.5Description
TRUEevaluated 96 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
16-96
65 data[index] = (unsigned char)(f);-
66 return;
executed 96 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
96
67 }-
68 if (int(f) % 2
int(f) % 2Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
0-16
69-
70 data[index] = (unsigned char)(f + 1);-
71 return;
never executed: return;
0
72 }-
73 data[index] = (unsigned char)(f);-
74}
executed 16 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
16
75-
76ReturnedValue Int16ArrayRead(const char *data, int index)-
77{-
78 return
executed 2232 times by 1 test: return Encode((int)*(const short *)(data + index));
Executed by:
  • tst_ecmascripttests
Encode((int)*(const short *)(data + index));
executed 2232 times by 1 test: return Encode((int)*(const short *)(data + index));
Executed by:
  • tst_ecmascripttests
2232
79}-
80-
81void Int16ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)-
82{-
83 short v = (short)value.toInt32();-
84 if (e->hasException
e->hasExceptionDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2912 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
46-2912
85 return;
executed 46 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
46
86 *(short *)(data + index) = v;-
87}
executed 2912 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
2912
88-
89ReturnedValue UInt16ArrayRead(const char *data, int index)-
90{-
91 return
executed 2201 times by 1 test: return Encode((int)*(const unsigned short *)(data + index));
Executed by:
  • tst_ecmascripttests
Encode((int)*(const unsigned short *)(data + index));
executed 2201 times by 1 test: return Encode((int)*(const unsigned short *)(data + index));
Executed by:
  • tst_ecmascripttests
2201
92}-
93-
94void UInt16ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)-
95{-
96 unsigned short v = (unsigned short)value.toInt32();-
97 if (e->hasException
e->hasExceptionDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2916 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
46-2916
98 return;
executed 46 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
46
99 *(unsigned short *)(data + index) = v;-
100}
executed 2916 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
2916
101-
102ReturnedValue Int32ArrayRead(const char *data, int index)-
103{-
104 return
executed 2203 times by 1 test: return Encode(*(const int *)(data + index));
Executed by:
  • tst_ecmascripttests
Encode(*(const int *)(data + index));
executed 2203 times by 1 test: return Encode(*(const int *)(data + index));
Executed by:
  • tst_ecmascripttests
2203
105}-
106-
107void Int32ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)-
108{-
109 int v = (int)value.toInt32();-
110 if (e->hasException
e->hasExceptionDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2912 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
46-2912
111 return;
executed 46 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
46
112 *(int *)(data + index) = v;-
113}
executed 2912 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
2912
114-
115ReturnedValue UInt32ArrayRead(const char *data, int index)-
116{-
117 return
executed 2204 times by 1 test: return Encode(*(const unsigned int *)(data + index));
Executed by:
  • tst_ecmascripttests
Encode(*(const unsigned int *)(data + index));
executed 2204 times by 1 test: return Encode(*(const unsigned int *)(data + index));
Executed by:
  • tst_ecmascripttests
2204
118}-
119-
120void UInt32ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)-
121{-
122 unsigned int v = (unsigned int)value.toUInt32();-
123 if (e->hasException
e->hasExceptionDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2911 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
46-2911
124 return;
executed 46 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
46
125 *(unsigned int *)(data + index) = v;-
126}
executed 2910 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
2910
127-
128ReturnedValue Float32ArrayRead(const char *data, int index)-
129{-
130 return
executed 2460 times by 1 test: return Encode(*(const float *)(data + index));
Executed by:
  • tst_ecmascripttests
Encode(*(const float *)(data + index));
executed 2460 times by 1 test: return Encode(*(const float *)(data + index));
Executed by:
  • tst_ecmascripttests
2460
131}-
132-
133void Float32ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)-
134{-
135 float v = value.toNumber();-
136 if (e->hasException
e->hasExceptionDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3186 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
46-3186
137 return;
executed 46 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
46
138 *(float *)(data + index) = v;-
139}
executed 3186 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
3186
140-
141ReturnedValue Float64ArrayRead(const char *data, int index)-
142{-
143 return
executed 3456 times by 1 test: return Encode(*(const double *)(data + index));
Executed by:
  • tst_ecmascripttests
Encode(*(const double *)(data + index));
executed 3456 times by 1 test: return Encode(*(const double *)(data + index));
Executed by:
  • tst_ecmascripttests
3456
144}-
145-
146void Float64ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)-
147{-
148 double v = value.toNumber();-
149 if (e->hasException
e->hasExceptionDescription
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 6460 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
60-6460
150 return;
executed 60 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
60
151 *(double *)(data + index) = v;-
152}
executed 6460 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
6460
153-
154const TypedArrayOperations operations[Heap::TypedArray::NTypes] = {-
155 { 1, "Int8Array", Int8ArrayRead, Int8ArrayWrite },-
156 { 1, "Uint8Array", UInt8ArrayRead, UInt8ArrayWrite },-
157 { 1, "Uint8ClampedArray", UInt8ArrayRead, UInt8ClampedArrayWrite },-
158 { 2, "Int16Array", Int16ArrayRead, Int16ArrayWrite },-
159 { 2, "Uint16Array", UInt16ArrayRead, UInt16ArrayWrite },-
160 { 4, "Int32Array", Int32ArrayRead, Int32ArrayWrite },-
161 { 4, "Uint32Array", UInt32ArrayRead, UInt32ArrayWrite },-
162 { 4, "Float32Array", Float32ArrayRead, Float32ArrayWrite },-
163 { 8, "Float64Array", Float64ArrayRead, Float64ArrayWrite },-
164};-
165-
166-
167void Heap::TypedArrayCtor::init(QV4::ExecutionContext *scope, TypedArray::Type t)-
168{-
169 Heap::FunctionObject::init(scope, QLatin1String(operations[t].name));-
170 type = t;-
171}
executed 892477 times by 153 tests: end of block
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
  • ...
892477
172-
173ReturnedValue TypedArrayCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *)-
174{-
175 Scope scope(f->engine());-
176 const TypedArrayCtor *that = static_cast<const TypedArrayCtor *>(f);-
177-
178 if (!argc
!argcDescription
TRUEevaluated 2359 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 23119 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
|| !argv[0].isObject()
!argv[0].isObject()Description
TRUEevaluated 3622 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 19504 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
) {
2359-23119
179-
180 qint64 l = argc
argcDescription
TRUEevaluated 3621 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2359 times by 1 test
Evaluated by:
  • tst_ecmascripttests
? argv[0].toIndex() : 0;
2359-3621
181 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5939 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
36-5939
182 return
executed 36 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 36 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
36
183-
184 if (l < 0
l < 0Description
TRUEevaluated 108 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5831 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| l >
l > (0x7fffffff * 2U + 1U)Description
TRUEnever evaluated
FALSEevaluated 5834 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-5834
185 (0x7fffffff * 2U + 1U)
l > (0x7fffffff * 2U + 1U)Description
TRUEnever evaluated
FALSEevaluated 5834 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-5834
186 )-
187 return
executed 108 times by 1 test: return scope.engine->throwRangeError(QLatin1String("Index out of range."));
Executed by:
  • tst_ecmascripttests
scope.engine->throwRangeError(QLatin1String("Index out of range."));
executed 108 times by 1 test: return scope.engine->throwRangeError(QLatin1String("Index out of range."));
Executed by:
  • tst_ecmascripttests
108
188 uint len = (uint)l;-
189 if (l != len
l != lenDescription
TRUEnever evaluated
FALSEevaluated 5836 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-5836
190 scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Non integer length for typed array.")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Non integer length for typed array." }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
never executed: scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Non integer length for typed array.")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Non integer length for typed array." }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
0
191 uint byteLength = len * operations[that->d()->type].bytesPerElement;-
192 Scoped<ArrayBuffer> buffer(scope, scope.engine->newArrayBuffer(byteLength));-
193 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 5831 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-5831
194 return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
0
195-
196 Scoped<TypedArray> array(scope, TypedArray::create(scope.engine, that->d()->type));-
197 array->d()->buffer.set(scope.engine, buffer->d());-
198 array->d()->byteLength = byteLength;-
199 array->d()->byteOffset = 0;-
200-
201 return
executed 5828 times by 1 test: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
array.asReturnedValue();
executed 5828 times by 1 test: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
5828
202 }-
203 Scoped<TypedArray> typedArray(scope, argc ? argv[0] : Primitive::undefinedValue());-
204 if (!!typedArray
!!typedArrayDescription
TRUEevaluated 568 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 18937 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
) {
568-18937
205-
206 Scoped<ArrayBuffer> buffer(scope, typedArray->d()->buffer);-
207 uint srcElementSize = typedArray->d()->type->bytesPerElement;-
208 uint destElementSize = operations[that->d()->type].bytesPerElement;-
209 uint byteLength = typedArray->d()->byteLength;-
210 uint destByteLength = byteLength*destElementSize/srcElementSize;-
211-
212 Scoped<ArrayBuffer> newBuffer(scope, scope.engine->newArrayBuffer(destByteLength));-
213 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 568 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-568
214 return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
0
215-
216 Scoped<TypedArray> array(scope, TypedArray::create(scope.engine, that->d()->type));-
217 array->d()->buffer.set(scope.engine, newBuffer->d());-
218 array->d()->byteLength = destByteLength;-
219 array->d()->byteOffset = 0;-
220-
221 const char *src = buffer->d()->data->data() + typedArray->d()->byteOffset;-
222 char *dest = newBuffer->d()->data->data();-
223-
224-
225 if (srcElementSize == destElementSize
srcElementSize...estElementSizeDescription
TRUEevaluated 316 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 252 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
252-316
226 memcpy(dest, src, byteLength);-
227 }
executed 316 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
else {
316
228-
229 uint l = typedArray->length();-
230 TypedArrayRead read = typedArray->d()->type->read;-
231 TypedArrayWrite write =array->d()->type->write;-
232 for (uint i = 0; i < l
i < lDescription
TRUEevaluated 660 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 252 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; ++i) {
252-660
233 Primitive val;-
234 val.setRawValue(read(src, i*srcElementSize));-
235 write(scope.engine, dest, i*destElementSize, val);-
236 }
executed 660 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
660
237 }
executed 252 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
252
238-
239 return
executed 568 times by 1 test: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
array.asReturnedValue();
executed 568 times by 1 test: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
568
240 }-
241 Scoped<ArrayBuffer> buffer(scope, argc ? argv[0] : Primitive::undefinedValue());-
242 if (!!buffer
!!bufferDescription
TRUEevaluated 6061 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
FALSEevaluated 12865 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
) {
6061-12865
243-
244-
245 double dbyteOffset = argc > 1
argc > 1Description
TRUEevaluated 5607 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 454 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
? argv[1].toInteger() : 0;
454-5607
246 uint byteOffset = (uint)dbyteOffset;-
247 uint elementSize = operations[that->d()->type].bytesPerElement;-
248 if (dbyteOffset < 0
dbyteOffset < 0Description
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5989 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
|| (
(byteOffset % elementSize)Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5943 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
byteOffset % elementSize)
(byteOffset % elementSize)Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5943 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
|| dbyteOffset > buffer->byteLength()
dbyteOffset > ...->byteLength()Description
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5869 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
)
48-5989
249 return
executed 192 times by 1 test: return scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "new TypedArray: invalid byteOffset")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "new TypedArray: invalid byteOffset" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
Executed by:
  • tst_ecmascripttests
scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "new TypedArray: invalid byteOffset")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "new TypedArray: invalid byteOffset" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 192 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
qstring_literal_temp;
executed 192 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
}()));
executed 192 times by 1 test: return scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "new TypedArray: invalid byteOffset")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "new TypedArray: invalid byteOffset" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
Executed by:
  • tst_ecmascripttests
192
250-
251 uint byteLength;-
252 if (argc < 3
argc < 3Description
TRUEevaluated 1322 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
FALSEevaluated 4550 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| argv[2].isUndefined()
argv[2].isUndefined()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4527 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
24-4550
253 byteLength = buffer->byteLength() - byteOffset;-
254 if (buffer->byteLength() < byteOffset
buffer->byteLe...) < byteOffsetDescription
TRUEnever evaluated
FALSEevaluated 1346 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
|| byteLength % elementSize
byteLength % elementSizeDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1298 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
)
0-1346
255 return
executed 48 times by 1 test: return scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "new TypedArray: invalid length")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "new TypedArray: invalid length" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
Executed by:
  • tst_ecmascripttests
scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "new TypedArray: invalid length")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "new TypedArray: invalid length" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 48 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
qstring_literal_temp;
executed 48 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
}()));
executed 48 times by 1 test: return scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "new TypedArray: invalid length")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "new TypedArray: invalid length" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
Executed by:
  • tst_ecmascripttests
48
256 }
executed 1298 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
else {
1298
257 double l = qBound(0., argv[2].toInteger(), (double)-
258 (0x7fffffff * 2U + 1U)-
259 );-
260 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4451 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
76-4451
261 return
executed 76 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 76 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
76
262 l *= elementSize;-
263 if (buffer->byteLength() - byteOffset < l
buffer->byteLe...byteOffset < lDescription
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4415 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
36-4415
264 return
executed 36 times by 1 test: return scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "new TypedArray: invalid length")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "new TypedArray: invalid length" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
Executed by:
  • tst_ecmascripttests
scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "new TypedArray: invalid length")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "new TypedArray: invalid length" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 36 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
qstring_literal_temp;
executed 36 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
}()));
executed 36 times by 1 test: return scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "new TypedArray: invalid length")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "new TypedArray: invalid length" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
Executed by:
  • tst_ecmascripttests
36
265 byteLength = (uint)l;-
266 }
executed 4414 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
4414
267-
268 Scoped<TypedArray> array(scope, TypedArray::create(scope.engine, that->d()->type));-
269 array->d()->buffer.set(scope.engine, buffer->d());-
270 array->d()->byteLength = byteLength;-
271 array->d()->byteOffset = byteOffset;-
272 return
executed 5713 times by 2 tests: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
array.asReturnedValue();
executed 5713 times by 2 tests: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
5713
273 }-
274-
275-
276-
277 ScopedObject o(scope, argc ? argv[0] : Primitive::undefinedValue());-
278 uint l = (uint) qBound(0., ScopedValue(scope, o->get(scope.engine->id_length()))->toInteger(), (double)-
279 (0x7fffffff * 2U + 1U)-
280 );-
281 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 12805 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
)
72-12805
282 return
executed 72 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
scope.engine->throwTypeError();
executed 72 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
72
283-
284 uint elementSize = operations[that->d()->type].bytesPerElement;-
285 size_t bufferSize;-
286 if (mul_overflow(size_t(l), size_t(elementSize), &bufferSize)
mul_overflow(s..., &bufferSize)Description
TRUEnever evaluated
FALSEevaluated 12805 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
)
0-12805
287 return
never executed: return scope.engine->throwRangeError(QLatin1String("new TypedArray: invalid length"));
scope.engine->throwRangeError(QLatin1String("new TypedArray: invalid length"));
never executed: return scope.engine->throwRangeError(QLatin1String("new TypedArray: invalid length"));
0
288 Scoped<ArrayBuffer> newBuffer(scope, scope.engine->newArrayBuffer(bufferSize));-
289 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 12765 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
)
36-12765
290 return
executed 36 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 36 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
36
291-
292 Scoped<TypedArray> array(scope, TypedArray::create(scope.engine, that->d()->type));-
293 array->d()->buffer.set(scope.engine, newBuffer->d());-
294 array->d()->byteLength = l * elementSize;-
295 array->d()->byteOffset = 0;-
296-
297 uint idx = 0;-
298 char *b = newBuffer->d()->data->data();-
299 ScopedValue val(scope);-
300 while (idx < l
idx < lDescription
TRUEevaluated 38153 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
FALSEevaluated 12486 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
) {
12486-38153
301 val = o->get(idx);-
302 array->d()->type->write(scope.engine, b, 0, val);-
303 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEevaluated 288 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 37869 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
)
288-37869
304 return
executed 288 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 288 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
288
305 ++idx;-
306 b += elementSize;-
307 }
executed 37870 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
37870
308-
309-
310 return
executed 12487 times by 2 tests: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
array.asReturnedValue();
executed 12487 times by 2 tests: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
12487
311}-
312-
313ReturnedValue TypedArrayCtor::virtualCall(const FunctionObject *f, const Value *, const Value *, int)-
314{-
315 return
executed 252 times by 1 test: return f->engine()->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "calling a TypedArray constructor without new is invalid")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "calling a TypedArray constructor without new is invalid" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
Executed by:
  • tst_ecmascripttests
f->engine()->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "calling a TypedArray constructor without new is invalid")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "calling a TypedArray constructor without new is invalid" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 252 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
qstring_literal_temp;
executed 252 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
}()));
executed 252 times by 1 test: return f->engine()->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "calling a TypedArray constructor without new is invalid")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "calling a TypedArray constructor without new is invalid" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
Executed by:
  • tst_ecmascripttests
252
316}-
317-
318void Heap::TypedArray::init(Type t)-
319{-
320 Object::init();-
321 type = operations + t;-
322 arrayType = t;-
323}
executed 24870 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
24870
324-
325Heap::TypedArray *TypedArray::create(ExecutionEngine *e, Heap::TypedArray::Type t)-
326{-
327 Scope scope(e);-
328 Scoped<InternalClass> ic(scope, e->newInternalClass(staticVTable(), e->typedArrayPrototype + t));-
329 return
executed 24882 times by 2 tests: return e->memoryManager->allocObject<TypedArray>(ic->d(), t);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
e->memoryManager->allocObject<TypedArray>(ic->d(), t);
executed 24882 times by 2 tests: return e->memoryManager->allocObject<TypedArray>(ic->d(), t);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
24882
330}-
331-
332ReturnedValue TypedArray::virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty)-
333{-
334 if (!id.isArrayIndex()
!id.isArrayIndex()Description
TRUEevaluated 51879 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
FALSEevaluated 24199 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
24199-51879
335 return
executed 51876 times by 2 tests: return Object::virtualGet(m, id, receiver, hasProperty);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
Object::virtualGet(m, id, receiver, hasProperty);
executed 51876 times by 2 tests: return Object::virtualGet(m, id, receiver, hasProperty);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
51876
336-
337 uint index = id.asArrayIndex();-
338 Scope scope(static_cast<const Object *>(m)->engine());-
339 Scoped<TypedArray> a(scope, static_cast<const TypedArray *>(m));-
340-
341 uint bytesPerElement = a->d()->type->bytesPerElement;-
342 uint byteOffset = a->d()->byteOffset + index * bytesPerElement;-
343 if (byteOffset + bytesPerElement > (uint)a->d()->buffer->byteLength()
byteOffset + b...->byteLength()Description
TRUEevaluated 432 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 23757 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
432-23757
344 if (hasProperty
hasPropertyDescription
TRUEevaluated 108 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 324 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
108-324
345 *
executed 108 times by 1 test: *hasProperty = false;
Executed by:
  • tst_ecmascripttests
hasProperty = false;
executed 108 times by 1 test: *hasProperty = false;
Executed by:
  • tst_ecmascripttests
108
346 return
executed 432 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 432 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
432
347 }-
348 if (hasProperty
hasPropertyDescription
TRUEevaluated 108 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 23649 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
108-23649
349 *
executed 108 times by 1 test: *hasProperty = true;
Executed by:
  • tst_ecmascripttests
hasProperty = true;
executed 108 times by 1 test: *hasProperty = true;
Executed by:
  • tst_ecmascripttests
108
350 return
executed 23752 times by 1 test: return a->d()->type->read(a->d()->buffer->data->data(), byteOffset);
Executed by:
  • tst_ecmascripttests
a->d()->type->read(a->d()->buffer->data->data(), byteOffset);
executed 23752 times by 1 test: return a->d()->type->read(a->d()->buffer->data->data(), byteOffset);
Executed by:
  • tst_ecmascripttests
23752
351}-
352-
353bool TypedArray::virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver)-
354{-
355 if (!id.isArrayIndex()
!id.isArrayIndex()Description
TRUEevaluated 2759 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 18262 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
2759-18262
356 return
executed 2759 times by 1 test: return Object::virtualPut(m, id, value, receiver);
Executed by:
  • tst_ecmascripttests
Object::virtualPut(m, id, value, receiver);
executed 2759 times by 1 test: return Object::virtualPut(m, id, value, receiver);
Executed by:
  • tst_ecmascripttests
2759
357-
358 uint index = id.asArrayIndex();-
359 ExecutionEngine *v4 = static_cast<Object *>(m)->engine();-
360 if (v4->hasException
v4->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 18262 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-18262
361 return
never executed: return false;
false;
never executed: return false;
0
362-
363 Scope scope(v4);-
364 Scoped<TypedArray> a(scope, static_cast<TypedArray *>(m));-
365-
366 uint bytesPerElement = a->d()->type->bytesPerElement;-
367 uint byteOffset = a->d()->byteOffset + index * bytesPerElement;-
368 if (byteOffset + bytesPerElement > (uint)a->d()->buffer->byteLength()
byteOffset + b...->byteLength()Description
TRUEevaluated 38 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 18224 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
38-18224
369 return
executed 38 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
false;
executed 38 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
38
370-
371 a->d()->type->write(scope.engine, a->d()->buffer->data->data(), byteOffset, value);-
372 return
executed 18224 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
true;
executed 18224 times by 1 test: return true;
Executed by:
  • tst_ecmascripttests
18224
373}-
374-
375void TypedArrayPrototype::init(ExecutionEngine *engine, TypedArrayCtor *ctor)-
376{-
377 Scope scope(engine);-
378 ScopedObject o(scope);-
379-
380 ctor->defineReadonlyConfigurableProperty(engine->id_length(), Primitive::fromInt32(3));-
381 ctor->defineReadonlyProperty(engine->id_prototype(), *this);-
382 ctor->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "BYTES_PER_ELEMENT")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "BYTES_PER_ELEMENT" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 890617 times by 153 tests: return qstring_literal_temp;
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
  • ...
qstring_literal_temp;
executed 890617 times by 153 tests: return qstring_literal_temp;
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
  • ...
}()), Primitive::fromInt32(operations[ctor->d()->type].bytesPerElement));
890617
383 ctor->setPrototypeOf(engine->intrinsicTypedArrayCtor());-
384-
385 setPrototypeOf(engine->intrinsicTypedArrayPrototype());-
386 defineDefaultProperty(engine->id_constructor(), (o = ctor));-
387 defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "BYTES_PER_ELEMENT")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "BYTES_PER_ELEMENT" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 888809 times by 153 tests: return qstring_literal_temp;
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
  • ...
qstring_literal_temp;
executed 888809 times by 153 tests: return qstring_literal_temp;
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
  • ...
}()), Primitive::fromInt32(operations[ctor->d()->type].bytesPerElement));
888809
388}
executed 891567 times by 153 tests: end of block
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
  • ...
891567
389-
390ReturnedValue IntrinsicTypedArrayPrototype::method_get_buffer(const FunctionObject *b, const Value *thisObject, const Value *, int)-
391{-
392 ExecutionEngine *v4 = b->engine();-
393 const TypedArray *v = thisObject->as<TypedArray>();-
394 if (!v
!vDescription
TRUEevaluated 88 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1739 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
)
88-1739
395 return
executed 88 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
v4->throwTypeError();
executed 88 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
88
396-
397 return
executed 1739 times by 2 tests: return v->d()->buffer->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
v->d()->buffer->asReturnedValue();
executed 1739 times by 2 tests: return v->d()->buffer->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
1739
398}-
399-
400ReturnedValue IntrinsicTypedArrayPrototype::method_get_byteLength(const FunctionObject *b, const Value *thisObject, const Value *, int)-
401{-
402 ExecutionEngine *v4 = b->engine();-
403 const TypedArray *v = thisObject->as<TypedArray>();-
404 if (!v
!vDescription
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 78 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
)
52-78
405 return
executed 52 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
v4->throwTypeError();
executed 52 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
52
406-
407 return
executed 78 times by 2 tests: return Encode(v->d()->byteLength);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
Encode(v->d()->byteLength);
executed 78 times by 2 tests: return Encode(v->d()->byteLength);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
78
408}-
409-
410ReturnedValue IntrinsicTypedArrayPrototype::method_get_byteOffset(const FunctionObject *b, const Value *thisObject, const Value *, int)-
411{-
412 ExecutionEngine *v4 = b->engine();-
413 const TypedArray *v = thisObject->as<TypedArray>();-
414 if (!v
!vDescription
TRUEevaluated 51 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 732 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
51-732
415 return
executed 51 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
v4->throwTypeError();
executed 51 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
51
416-
417 return
executed 732 times by 1 test: return Encode(v->d()->byteOffset);
Executed by:
  • tst_ecmascripttests
Encode(v->d()->byteOffset);
executed 732 times by 1 test: return Encode(v->d()->byteOffset);
Executed by:
  • tst_ecmascripttests
732
418}-
419-
420ReturnedValue IntrinsicTypedArrayPrototype::method_get_length(const FunctionObject *b, const Value *thisObject, const Value *, int)-
421{-
422 ExecutionEngine *v4 = b->engine();-
423 const TypedArray *v = thisObject->as<TypedArray>();-
424 if (!v
!vDescription
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 24677 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
52-24677
425 return
executed 52 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
v4->throwTypeError();
executed 52 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
52
426-
427 return
executed 24679 times by 1 test: return Encode(v->d()->byteLength/v->d()->type->bytesPerElement);
Executed by:
  • tst_ecmascripttests
Encode(v->d()->byteLength/v->d()->type->bytesPerElement);
executed 24679 times by 1 test: return Encode(v->d()->byteLength/v->d()->type->bytesPerElement);
Executed by:
  • tst_ecmascripttests
24679
428}-
429-
430ReturnedValue IntrinsicTypedArrayPrototype::method_entries(const FunctionObject *b, const Value *thisObject, const Value *, int)-
431{-
432 Scope scope(b);-
433 Scoped<TypedArray> O(scope, thisObject);-
434 if (!O
!ODescription
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
52-72
435 return
executed 52 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
scope.engine->throwTypeError();
executed 52 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
52
436-
437 Scoped<ArrayIteratorObject> ao(scope, scope.engine->newArrayIteratorObject(O));-
438 ao->d()->iterationKind = IteratorKind::KeyValueIteratorKind;-
439 return
executed 72 times by 1 test: return ao->asReturnedValue();
Executed by:
  • tst_ecmascripttests
ao->asReturnedValue();
executed 72 times by 1 test: return ao->asReturnedValue();
Executed by:
  • tst_ecmascripttests
72
440}-
441-
442ReturnedValue IntrinsicTypedArrayPrototype::method_keys(const FunctionObject *b, const Value *thisObject, const Value *, int)-
443{-
444 Scope scope(b);-
445 Scoped<TypedArray> O(scope, thisObject);-
446 if (!O
!ODescription
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 76 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
52-76
447 return
executed 52 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
scope.engine->throwTypeError();
executed 52 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
52
448-
449 Scoped<ArrayIteratorObject> ao(scope, scope.engine->newArrayIteratorObject(O));-
450 ao->d()->iterationKind = IteratorKind::KeyIteratorKind;-
451 return
executed 76 times by 1 test: return ao->asReturnedValue();
Executed by:
  • tst_ecmascripttests
ao->asReturnedValue();
executed 76 times by 1 test: return ao->asReturnedValue();
Executed by:
  • tst_ecmascripttests
76
452}-
453-
454ReturnedValue IntrinsicTypedArrayPrototype::method_values(const FunctionObject *b, const Value *thisObject, const Value *, int)-
455{-
456 Scope scope(b);-
457 Scoped<TypedArray> O(scope, thisObject);-
458 if (!O
!ODescription
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 179 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
52-179
459 return
executed 52 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
scope.engine->throwTypeError();
executed 52 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
52
460-
461 Scoped<ArrayIteratorObject> ao(scope, scope.engine->newArrayIteratorObject(O));-
462 ao->d()->iterationKind = IteratorKind::ValueIteratorKind;-
463 return
executed 180 times by 1 test: return ao->asReturnedValue();
Executed by:
  • tst_ecmascripttests
ao->asReturnedValue();
executed 180 times by 1 test: return ao->asReturnedValue();
Executed by:
  • tst_ecmascripttests
180
464}-
465-
466ReturnedValue IntrinsicTypedArrayPrototype::method_set(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
467{-
468 Scope scope(b);-
469 Scoped<TypedArray> a(scope, *thisObject);-
470 if (!a
!aDescription
TRUEevaluated 96 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5979 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
96-5979
471 return
executed 96 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
scope.engine->throwTypeError();
executed 96 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
96
472 Scoped<ArrayBuffer> buffer(scope, a->d()->buffer);-
473 if (!buffer
!bufferDescription
TRUEnever evaluated
FALSEevaluated 5980 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-5980
474 scope.engine->throwTypeError();
never executed: scope.engine->throwTypeError();
0
475-
476 double doffset = argc >= 2
argc >= 2Description
TRUEevaluated 2461 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3519 times by 1 test
Evaluated by:
  • tst_ecmascripttests
? argv[1].toInteger() : 0;
2461-3519
477 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEevaluated 228 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5753 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
228-5753
478 return
executed 228 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 228 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
228
479-
480 if (doffset < 0
doffset < 0Description
TRUEevaluated 216 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5537 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| doffset >=
doffset >= (0x...fff * 2U + 1U)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5499 times by 1 test
Evaluated by:
  • tst_ecmascripttests
36-5537
481 (0x7fffffff * 2U + 1U)
doffset >= (0x...fff * 2U + 1U)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 5499 times by 1 test
Evaluated by:
  • tst_ecmascripttests
36-5499
482 )-
483 return
executed 252 times by 1 test: return QV4::Encode(scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "TypedArray.set: out of range")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "TypedArray.set: out of range" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
Executed by:
  • tst_ecmascripttests
QV4::Encode(scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "TypedArray.set: out of range")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "TypedArray.set: out of range" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 252 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
qstring_literal_temp;
executed 252 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
}())));
executed 252 times by 1 test: return QV4::Encode(scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "TypedArray.set: out of range")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "TypedArray.set: out of range" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
Executed by:
  • tst_ecmascripttests
252
484 uint offset = (uint)doffset;-
485 uint elementSize = a->d()->type->bytesPerElement;-
486-
487 Scoped<TypedArray> srcTypedArray(scope, argv[0]);-
488 if (!srcTypedArray
!srcTypedArrayDescription
TRUEevaluated 2780 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2720 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
2720-2780
489-
490 ScopedObject o(scope, argv[0].toObject(scope.engine));-
491 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2708 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| !o
!oDescription
TRUEnever evaluated
FALSEevaluated 2708 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-2708
492 return
executed 72 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
scope.engine->throwTypeError();
executed 72 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
72
493-
494 double len = ScopedValue(scope, o->get(scope.engine->id_length()))->toNumber();-
495 uint l = (uint)len;-
496 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEevaluated 144 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2563 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| l != len
l != lenDescription
TRUEnever evaluated
FALSEevaluated 2563 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-2563
497 return
executed 144 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
scope.engine->throwTypeError();
executed 144 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
144
498-
499 if (offset + l > a->length()
offset + l > a->length()Description
TRUEnever evaluated
FALSEevaluated 2564 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-2564
500 return
never executed: return QV4::Encode(scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "TypedArray.set: out of range")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "TypedArray.set: out of range" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
QV4::Encode(scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "TypedArray.set: out of range")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "TypedArray.set: out of range" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}())));
never executed: return QV4::Encode(scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "TypedArray.set: out of range")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "TypedArray.set: out of range" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
0
501-
502 uint idx = 0;-
503 char *b = buffer->d()->data->data() + a->d()->byteOffset + offset*elementSize;-
504 ScopedValue val(scope);-
505 while (idx < l
idx < lDescription
TRUEevaluated 3467 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2448 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
2448-3467
506 val = o->get(idx);-
507 a->d()->type->write(scope.engine, b, 0, val);-
508 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEevaluated 116 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3351 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
116-3351
509 return
executed 116 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 116 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
116
510 ++idx;-
511 b += elementSize;-
512 }
executed 3351 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
3351
513 return
executed 2448 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 2448 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
2448
514 }-
515-
516-
517 Scoped<ArrayBuffer> srcBuffer(scope, srcTypedArray->d()->buffer);-
518 if (!srcBuffer
!srcBufferDescription
TRUEnever evaluated
FALSEevaluated 2720 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-2720
519 return
never executed: return scope.engine->throwTypeError();
scope.engine->throwTypeError();
never executed: return scope.engine->throwTypeError();
0
520-
521 uint l = srcTypedArray->length();-
522 if (offset + l > a->length()
offset + l > a->length()Description
TRUEevaluated 108 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2615 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
108-2615
523 return
executed 108 times by 1 test: return QV4::Encode(scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "TypedArray.set: out of range")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "TypedArray.set: out of range" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
Executed by:
  • tst_ecmascripttests
QV4::Encode(scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "TypedArray.set: out of range")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "TypedArray.set: out of range" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 108 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
qstring_literal_temp;
executed 108 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
}())));
executed 108 times by 1 test: return QV4::Encode(scope.engine->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "TypedArray.set: out of range")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "TypedArray.set: out of range" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
Executed by:
  • tst_ecmascripttests
108
524-
525 char *dest = buffer->d()->data->data() + a->d()->byteOffset + offset*elementSize;-
526 const char *src = srcBuffer->d()->data->data() + srcTypedArray->d()->byteOffset;-
527 if (srcTypedArray->d()->type == a->d()->type
srcTypedArray-...= a->d()->typeDescription
TRUEevaluated 1016 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1598 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
1016-1598
528-
529 memmove(dest, src, srcTypedArray->d()->byteLength);-
530 return
executed 1016 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 1016 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
1016
531 }-
532-
533 char *srcCopy = nullptr;-
534 if (buffer->d() == srcBuffer->d()
buffer->d() == srcBuffer->d()Description
TRUEevaluated 108 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1491 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
108-1491
535-
536 srcCopy = new char[srcTypedArray->d()->byteLength];-
537 memcpy(srcCopy, src, srcTypedArray->d()->byteLength);-
538 src = srcCopy;-
539 }
executed 108 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
108
540-
541-
542 uint srcElementSize = srcTypedArray->d()->type->bytesPerElement;-
543 TypedArrayRead read = srcTypedArray->d()->type->read;-
544 TypedArrayWrite write = a->d()->type->write;-
545 for (uint i = 0; i < l
i < lDescription
TRUEevaluated 1887 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1600 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; ++i) {
1600-1887
546 Primitive val;-
547 val.setRawValue(read(src, i*srcElementSize));-
548 write(scope.engine, dest, i*elementSize, val);-
549 }
executed 1886 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
1886
550-
551 if (srcCopy
srcCopyDescription
TRUEevaluated 108 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1492 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
108-1492
552 delete [] srcCopy;
executed 108 times by 1 test: delete [] srcCopy;
Executed by:
  • tst_ecmascripttests
108
553-
554 return
executed 1600 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 1600 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
1600
555}-
556-
557ReturnedValue IntrinsicTypedArrayPrototype::method_subarray(const FunctionObject *builtin, const Value *thisObject, const Value *argv, int argc)-
558{-
559 Scope scope(builtin);-
560 Scoped<TypedArray> a(scope, *thisObject);-
561-
562 if (!a
!aDescription
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4202 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
52-4202
563 return
executed 52 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
scope.engine->throwTypeError();
executed 52 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
52
564-
565 Scoped<ArrayBuffer> buffer(scope, a->d()->buffer);-
566 if (!buffer
!bufferDescription
TRUEnever evaluated
FALSEevaluated 4203 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-4203
567 return
never executed: return scope.engine->throwTypeError();
scope.engine->throwTypeError();
never executed: return scope.engine->throwTypeError();
0
568-
569 int len = a->length();-
570 double b = argc > 0
argc > 0Description
TRUEevaluated 4207 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
? argv[0].toInteger() : 0;
0-4207
571 if (b < 0
b < 0Description
TRUEevaluated 972 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3233 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
972-3233
572 b = len + b;
executed 972 times by 1 test: b = len + b;
Executed by:
  • tst_ecmascripttests
972
573 uint begin = (uint)qBound(0., b, (double)len);-
574-
575 double e = argc < 2
argc < 2Description
TRUEevaluated 1719 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2486 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| argv[1].isUndefined()
argv[1].isUndefined()Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2452 times by 1 test
Evaluated by:
  • tst_ecmascripttests
? len : argv[1].toInteger();
36-2486
576 if (e < 0
e < 0Description
TRUEevaluated 828 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3379 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
828-3379
577 e = len + e;
executed 828 times by 1 test: e = len + e;
Executed by:
  • tst_ecmascripttests
828
578 uint end = (uint)qBound(0., e, (double)len);-
579 if (end < begin
end < beginDescription
TRUEevaluated 144 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4062 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
144-4062
580 end = begin;
executed 144 times by 1 test: end = begin;
Executed by:
  • tst_ecmascripttests
144
581-
582 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEevaluated 216 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3991 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
216-3991
583 return
executed 216 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 216 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
216
584-
585 int newLen = end - begin;-
586-
587 ScopedFunctionObject constructor(scope, a->get(scope.engine->id_constructor()));-
588 if (!constructor
!constructorDescription
TRUEevaluated 536 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3453 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
536-3453
589 return
executed 535 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
scope.engine->throwTypeError();
executed 535 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
535
590-
591 Value *arguments = scope.alloc(3);-
592 arguments[0] = buffer;-
593 arguments[1] = Encode(a->d()->byteOffset + begin*a->d()->type->bytesPerElement);-
594 arguments[2] = Encode(newLen);-
595 return
executed 3455 times by 1 test: return constructor->callAsConstructor(arguments, 3);
Executed by:
  • tst_ecmascripttests
constructor->callAsConstructor(arguments, 3);
executed 3455 times by 1 test: return constructor->callAsConstructor(arguments, 3);
Executed by:
  • tst_ecmascripttests
3455
596}-
597-
598ReturnedValue IntrinsicTypedArrayPrototype::method_get_toStringTag(const FunctionObject *, const Value *thisObject, const Value *, int)-
599{-
600 const TypedArray *a = thisObject->as<TypedArray>();-
601 if (!a
!aDescription
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1731 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
64-1731
602 return
executed 64 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 64 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
64
603-
604 return
executed 1731 times by 1 test: return a->engine()->newString(QString::fromLatin1(a->d()->type->name))->asReturnedValue();
Executed by:
  • tst_ecmascripttests
a->engine()->newString(QString::fromLatin1(a->d()->type->name))->asReturnedValue();
executed 1731 times by 1 test: return a->engine()->newString(QString::fromLatin1(a->d()->type->name))->asReturnedValue();
Executed by:
  • tst_ecmascripttests
1731
605}-
606-
607ReturnedValue IntrinsicTypedArrayCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *, int, const Value *)-
608{-
609 return
executed 24 times by 1 test: return f->engine()->throwTypeError();
Executed by:
  • tst_ecmascripttests
f->engine()->throwTypeError();
executed 24 times by 1 test: return f->engine()->throwTypeError();
Executed by:
  • tst_ecmascripttests
24
610}-
611-
612ReturnedValue IntrinsicTypedArrayCtor::virtualCall(const FunctionObject *f, const Value *, const Value *, int)-
613{-
614 return
executed 24 times by 1 test: return f->engine()->throwTypeError();
Executed by:
  • tst_ecmascripttests
f->engine()->throwTypeError();
executed 24 times by 1 test: return f->engine()->throwTypeError();
Executed by:
  • tst_ecmascripttests
24
615}-
616-
617void IntrinsicTypedArrayPrototype::init(ExecutionEngine *engine, IntrinsicTypedArrayCtor *ctor)-
618{-
619 ctor->defineReadonlyProperty(engine->id_prototype(), *this);-
620 ctor->defineReadonlyConfigurableProperty(engine->id_length(), Primitive::fromInt32(0));-
621 ctor->addSymbolSpecies();-
622-
623 defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "buffer")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "buffer" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98273 times by 153 tests: return qstring_literal_temp;
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
  • ...
qstring_literal_temp;
executed 98273 times by 153 tests: return qstring_literal_temp;
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
  • ...
}()), method_get_buffer, nullptr);
98273
624 defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "byteLength")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "byteLength" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98167 times by 153 tests: return qstring_literal_temp;
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
  • ...
qstring_literal_temp;
executed 98167 times by 153 tests: return qstring_literal_temp;
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
  • ...
}()), method_get_byteLength, nullptr);
98167
625 defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "byteOffset")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "byteOffset" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98915 times by 153 tests: return qstring_literal_temp;
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
  • ...
qstring_literal_temp;
executed 98915 times by 153 tests: return qstring_literal_temp;
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
  • ...
}()), method_get_byteOffset, nullptr);
98915
626 defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "length")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "length" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98694 times by 153 tests: return qstring_literal_temp;
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
  • ...
qstring_literal_temp;
executed 98694 times by 153 tests: return qstring_literal_temp;
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
  • ...
}()), method_get_length, nullptr);
98694
627-
628 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "entries")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "entries" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98975 times by 153 tests: return qstring_literal_temp;
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
  • ...
qstring_literal_temp;
executed 98975 times by 153 tests: return qstring_literal_temp;
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
  • ...
}()), method_entries, 0);
98975
629 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "keys")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "keys" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98983 times by 153 tests: return qstring_literal_temp;
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
  • ...
qstring_literal_temp;
executed 98983 times by 153 tests: return qstring_literal_temp;
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
  • ...
}()), method_keys, 0);
98983
630 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "set")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "set" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98854 times by 153 tests: return qstring_literal_temp;
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
  • ...
qstring_literal_temp;
executed 98854 times by 153 tests: return qstring_literal_temp;
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
  • ...
}()), method_set, 1);
98854
631 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "subarray")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "subarray" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98900 times by 153 tests: return qstring_literal_temp;
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
  • ...
qstring_literal_temp;
executed 98900 times by 153 tests: return qstring_literal_temp;
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
  • ...
}()), method_subarray, 0);
98900
632-
633 Scope scope(engine);-
634 ScopedString valuesString(scope, engine->newIdentifier(([]() noexcept -> QString { enum { Size = sizeof(u"" "values")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "values" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98814 times by 153 tests: return qstring_literal_temp;
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
  • ...
qstring_literal_temp;
executed 98814 times by 153 tests: return qstring_literal_temp;
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
  • ...
}())));
98814
635 ScopedObject values(scope, FunctionObject::createBuiltinFunction(engine, valuesString, method_values, 0));-
636 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "values")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "values" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98409 times by 153 tests: return qstring_literal_temp;
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
  • ...
qstring_literal_temp;
executed 98409 times by 153 tests: return qstring_literal_temp;
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
  • ...
}()), values);
98409
637 defineDefaultProperty(engine->symbol_iterator(), values);-
638-
639 defineAccessorProperty(engine->symbol_toStringTag(), method_get_toStringTag, nullptr);-
640}
executed 98559 times by 153 tests: end of block
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
  • ...
98559
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0