Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4arraybuffer_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | namespace QV4 { | - |
4 | - | |
5 | namespace Heap { | - |
6 | - | |
7 | struct ArrayBufferCtor : FunctionObject { | - |
8 | void init(QV4::ExecutionContext *scope); | - |
9 | }; | - |
10 | - | |
11 | struct __attribute__((visibility("default"))) ArrayBuffer : Object { | - |
12 | void init(size_t length); | - |
13 | void init(const QByteArray& array); | - |
14 | void destroy(); | - |
15 | QTypedArrayData<char> *data; | - |
16 | - | |
17 | uint byteLength() const { return executed 55507 times by 2 tests: data->size;return data->size; Executed by:
executed 55507 times by 2 tests: }return data->size; Executed by:
| 55507 |
18 | }; | - |
19 | - | |
20 | } | - |
21 | - | |
22 | struct ArrayBufferCtor: FunctionObject | - |
23 | { | - |
24 | private: ArrayBufferCtor() = delete; ArrayBufferCtor(const ArrayBufferCtor &) = delete; ArrayBufferCtor &operator=(const ArrayBufferCtor &) = delete; public: template <typename Type> inline void qt_check_for_QMANAGED_macro(const Type *_q_argument) const { int i = qYouForgotTheQ_MANAGED_Macro(this, _q_argument); i = i + 1; } never executed: typedef QV4::Heap::ArrayBufferCtor Data; typedef FunctionObject SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { returnend of block executed 296390 times by 153 tests: &static_vtbl;return &static_vtbl; Executed by:
executed 296390 times by 153 tests: } void __dataTest() { static_assert (sizeof(*this) == sizeof(Managed), "Classes derived from Managed can't have own data members."); }return &static_vtbl; Executed by:
never executed: QV4::Heap::ArrayBufferCtor *d_unchecked() const { returnend of block executed 197339 times by 153 tests: static_cast<QV4::Heap::ArrayBufferCtor *>(m());return static_cast<QV4::Heap::ArrayBufferCtor *>(m()); Executed by:
executed 197339 times by 153 tests: } QV4::Heap::ArrayBufferCtor *d() const { QV4::Heap::ArrayBufferCtor *dptr = d_unchecked(); dptr->_checkIsInitialized(); returnreturn static_cast<QV4::Heap::ArrayBufferCtor *>(m()); Executed by:
executed 98578 times by 153 tests: dptr;return dptr; Executed by:
executed 98578 times by 153 tests: } static_assert(bool(std::is_trivial< QV4::Heap::ArrayBufferCtor >::value), "std::is_trivial< QV4::Heap::ArrayBufferCtor >::value");return dptr; Executed by:
| 0-296390 |
25 | - | |
26 | static ReturnedValue virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *); | - |
27 | static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc); | - |
28 | - | |
29 | static ReturnedValue method_isView(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
30 | - | |
31 | }; | - |
32 | - | |
33 | struct __attribute__((visibility("default"))) ArrayBuffer : Object | - |
34 | { | - |
35 | private: ArrayBuffer() = delete; ArrayBuffer(const ArrayBuffer &) = delete; ArrayBuffer &operator=(const ArrayBuffer &) = delete; public: template <typename Type> inline void qt_check_for_QMANAGED_macro(const Type *_q_argument) const { int i = qYouForgotTheQ_MANAGED_Macro(this, _q_argument); i = i + 1; } executed 42081 times by 40 tests: typedef QV4::Heap::ArrayBuffer Data; typedef Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { returnend of block Executed by:
executed 107835 times by 40 tests: &static_vtbl;return &static_vtbl; Executed by:
executed 107835 times by 40 tests: } void __dataTest() { static_assert (sizeof(*this) == sizeof(Managed), "Classes derived from Managed can't have own data members."); }return &static_vtbl; Executed by:
never executed: QV4::Heap::ArrayBuffer *d_unchecked() const { returnend of block executed 109125 times by 4 tests: static_cast<QV4::Heap::ArrayBuffer *>(m());return static_cast<QV4::Heap::ArrayBuffer *>(m()); Executed by:
executed 109125 times by 4 tests: } QV4::Heap::ArrayBuffer *d() const { QV4::Heap::ArrayBuffer *dptr = d_unchecked(); dptr->_checkIsInitialized(); returnreturn static_cast<QV4::Heap::ArrayBuffer *>(m()); Executed by:
executed 87654 times by 4 tests: dptr;return dptr; Executed by:
executed 87654 times by 4 tests: } static_assert(bool(std::is_trivial< QV4::Heap::ArrayBuffer >::value), "std::is_trivial< QV4::Heap::ArrayBuffer >::value");return dptr; Executed by:
| 0-109125 |
36 | static void virtualDestroy(QV4::Heap::Base *b) { static_cast<Data *>(b)->destroy(); } executed 21526 times by 4 tests: end of block Executed by:
| 21526 |
37 | static QV4::Object *defaultPrototype(QV4::ExecutionEngine *e) { return executed 21505 times by 4 tests: e->arrayBufferPrototype();return e->arrayBufferPrototype(); Executed by:
executed 21505 times by 4 tests: }return e->arrayBufferPrototype(); Executed by:
| 21505 |
38 | - | |
39 | QByteArray asByteArray() const; | - |
40 | uint byteLength() const { return executed 13079 times by 2 tests: d()->byteLength();return d()->byteLength(); Executed by:
executed 13079 times by 2 tests: }return d()->byteLength(); Executed by:
| 13079 |
41 | char *data() { detach(); return never executed: d()->data ? d()->data->data() : nullptr;return d()->data ? d()->data->data() : nullptr; never executed: }return d()->data ? d()->data->data() : nullptr; | 0 |
42 | const char *constData() { detach(); return never executed: d()->data ? d()->data->data() : nullptr;return d()->data ? d()->data->data() : nullptr; never executed: }return d()->data ? d()->data->data() : nullptr; | 0 |
43 | - | |
44 | private: | - |
45 | void detach(); | - |
46 | }; | - |
47 | - | |
48 | struct ArrayBufferPrototype: Object | - |
49 | { | - |
50 | void init(ExecutionEngine *engine, Object *ctor); | - |
51 | - | |
52 | static ReturnedValue method_get_byteLength(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
53 | static ReturnedValue method_slice(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
54 | static ReturnedValue method_toString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - |
55 | }; | - |
56 | - | |
57 | - | |
58 | } | - |
59 | - | |
60 | - | |
Switch to Source code | Preprocessed file |