Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4stringobject_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | namespace QV4 { | - | ||||||
5 | - | |||||||
6 | namespace Heap { | - | ||||||
7 | - | |||||||
8 | - | |||||||
9 | - | |||||||
10 | - | |||||||
11 | struct StringObjectOffsetStruct { Pointer<String *, 0> string; }; struct StringObjectSizeStruct : Object, StringObjectOffsetStruct {}; struct StringObjectData { typedef Object SuperClass; static constexpr size_t baseOffset = sizeof(StringObjectSizeStruct) - sizeof(StringObjectOffsetStruct); Pointer<String *, | - | ||||||
12 | __builtin_offsetof ( | - | ||||||
13 | StringObjectOffsetStruct | - | ||||||
14 | , | - | ||||||
15 | string | - | ||||||
16 | ) | - | ||||||
17 | + baseOffset> string; }; static_assert(bool(sizeof(StringObjectSizeStruct) == sizeof(StringObjectData) + StringObjectData::baseOffset), "sizeof(StringObjectSizeStruct) == sizeof(StringObjectData) + StringObjectData::baseOffset"); struct StringObject : Object, StringObjectData { | - | ||||||
18 | static void markObjects(Heap::Base *b, MarkStack *stack) { StringObject *o = static_cast<StringObject *>(b); StringObjectData::SuperClass::markObjects(o, stack); if (o->string
executed 8854 times by 26 tests: }o->string.heapObject()->mark(stack); Executed by:
executed 8854 times by 26 tests: ;end of block Executed by:
| 0-8854 | ||||||
19 | - | |||||||
20 | enum { | - | ||||||
21 | LengthPropertyIndex = 0 | - | ||||||
22 | }; | - | ||||||
23 | - | |||||||
24 | void init(bool ) | - | ||||||
25 | { Object::init(); } executed 98976 times by 153 tests: end of block Executed by:
| 98976 | ||||||
26 | void init(); | - | ||||||
27 | void init(const QV4::String *string); | - | ||||||
28 | - | |||||||
29 | Heap::String *getIndex(uint index) const; | - | ||||||
30 | uint length() const; | - | ||||||
31 | }; | - | ||||||
32 | - | |||||||
33 | struct StringCtor : FunctionObject { | - | ||||||
34 | void init(QV4::ExecutionContext *scope); | - | ||||||
35 | }; | - | ||||||
36 | - | |||||||
37 | } | - | ||||||
38 | - | |||||||
39 | struct StringObject: Object { | - | ||||||
40 | private: StringObject() = delete; StringObject(const StringObject &) = delete; StringObject &operator=(const StringObject &) = 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 8099 times by 4 tests: typedef QV4::Heap::StringObject Data; typedef Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { returnend of block Executed by:
executed 549091 times by 153 tests: &static_vtbl;return &static_vtbl; Executed by:
executed 549091 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::StringObject *d_unchecked() const { returnend of block executed 301361 times by 153 tests: static_cast<QV4::Heap::StringObject *>(m());return static_cast<QV4::Heap::StringObject *>(m()); Executed by:
executed 301361 times by 153 tests: } QV4::Heap::StringObject *d() const { QV4::Heap::StringObject *dptr = d_unchecked(); dptr->_checkIsInitialized(); returnreturn static_cast<QV4::Heap::StringObject *>(m()); Executed by:
executed 253627 times by 153 tests: dptr;return dptr; Executed by:
executed 253627 times by 153 tests: } static_assert(bool(std::is_trivial< QV4::Heap::StringObject >::value), "std::is_trivial< QV4::Heap::StringObject >::value");return dptr; Executed by:
| 0-549091 | ||||||
41 | public: enum { MyType = Type_StringObject }; | - | ||||||
42 | static Heap::InternalClass *defaultInternalClass(QV4::EngineBase *e) { return executed 48300 times by 14 tests: e->internalClasses(QV4::EngineBase::Class_StringObject);return e->internalClasses(QV4::EngineBase::Class_StringObject); Executed by:
executed 48300 times by 14 tests: }return e->internalClasses(QV4::EngineBase::Class_StringObject); Executed by:
| 48300 | ||||||
43 | static QV4::Object *defaultPrototype(QV4::ExecutionEngine *e) { return executed 48310 times by 14 tests: e->stringPrototype();return e->stringPrototype(); Executed by:
executed 48310 times by 14 tests: }return e->stringPrototype(); Executed by:
| 48310 | ||||||
44 | - | |||||||
45 | Heap::String *getIndex(uint index) const { | - | ||||||
46 | return executed 1104 times by 4 tests: d()->getIndex(index);return d()->getIndex(index); Executed by:
executed 1104 times by 4 tests: return d()->getIndex(index); Executed by:
| 1104 | ||||||
47 | } | - | ||||||
48 | uint length() const { | - | ||||||
49 | return executed 612 times by 4 tests: d()->length();return d()->length(); Executed by:
executed 612 times by 4 tests: return d()->length(); Executed by:
| 612 | ||||||
50 | } | - | ||||||
51 | - | |||||||
52 | using Object::getOwnProperty; | - | ||||||
53 | protected: | - | ||||||
54 | static bool virtualDeleteProperty(Managed *m, PropertyKey id); | - | ||||||
55 | static void virtualAdvanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attrs); | - | ||||||
56 | static PropertyAttributes virtualGetOwnProperty(Managed *m, PropertyKey id, Property *p); | - | ||||||
57 | }; | - | ||||||
58 | - | |||||||
59 | struct StringCtor: FunctionObject | - | ||||||
60 | { | - | ||||||
61 | private: StringCtor() = delete; StringCtor(const StringCtor &) = delete; StringCtor &operator=(const StringCtor &) = 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::StringCtor Data; typedef FunctionObject SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { returnend of block executed 296980 times by 153 tests: &static_vtbl;return &static_vtbl; Executed by:
executed 296980 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::StringCtor *d_unchecked() const { returnend of block executed 198127 times by 153 tests: static_cast<QV4::Heap::StringCtor *>(m());return static_cast<QV4::Heap::StringCtor *>(m()); Executed by:
executed 198127 times by 153 tests: } QV4::Heap::StringCtor *d() const { QV4::Heap::StringCtor *dptr = d_unchecked(); dptr->_checkIsInitialized(); returnreturn static_cast<QV4::Heap::StringCtor *>(m()); Executed by:
executed 99138 times by 153 tests: dptr;return dptr; Executed by:
executed 99138 times by 153 tests: } static_assert(bool(std::is_trivial< QV4::Heap::StringCtor >::value), "std::is_trivial< QV4::Heap::StringCtor >::value");return dptr; Executed by:
| 0-296980 | ||||||
62 | - | |||||||
63 | static ReturnedValue virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *); | - | ||||||
64 | static ReturnedValue virtualCall(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
65 | - | |||||||
66 | static ReturnedValue method_fromCharCode(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
67 | static ReturnedValue method_fromCodePoint(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
68 | }; | - | ||||||
69 | - | |||||||
70 | struct StringPrototype: StringObject | - | ||||||
71 | { | - | ||||||
72 | static QV4::Object *defaultPrototype(QV4::ExecutionEngine *e) { return never executed: e->objectPrototype();return e->objectPrototype(); never executed: }return e->objectPrototype(); | 0 | ||||||
73 | void init(ExecutionEngine *engine, Object *ctor); | - | ||||||
74 | - | |||||||
75 | static ReturnedValue method_toString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
76 | static ReturnedValue method_charAt(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
77 | static ReturnedValue method_charCodeAt(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
78 | static ReturnedValue method_codePointAt(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
79 | static ReturnedValue method_concat(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
80 | static ReturnedValue method_endsWith(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
81 | static ReturnedValue method_indexOf(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
82 | static ReturnedValue method_includes(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
83 | static ReturnedValue method_lastIndexOf(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
84 | static ReturnedValue method_localeCompare(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
85 | static ReturnedValue method_match(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
86 | static ReturnedValue method_normalize(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
87 | static ReturnedValue method_padEnd(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc); | - | ||||||
88 | static ReturnedValue method_padStart(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc); | - | ||||||
89 | static ReturnedValue method_repeat(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
90 | static ReturnedValue method_replace(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
91 | static ReturnedValue method_search(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
92 | static ReturnedValue method_slice(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
93 | static ReturnedValue method_split(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
94 | static ReturnedValue method_startsWith(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
95 | static ReturnedValue method_substr(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
96 | static ReturnedValue method_substring(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
97 | static ReturnedValue method_toLowerCase(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
98 | static ReturnedValue method_toLocaleLowerCase(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
99 | static ReturnedValue method_toUpperCase(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
100 | static ReturnedValue method_toLocaleUpperCase(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
101 | static ReturnedValue method_trim(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
102 | static ReturnedValue method_iterator(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); | - | ||||||
103 | }; | - | ||||||
104 | - | |||||||
105 | } | - | ||||||
106 | - | |||||||
107 | - | |||||||
Switch to Source code | Preprocessed file |