Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4propertykey_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | class QString; | - | ||||||
5 | - | |||||||
6 | namespace QV4 { | - | ||||||
7 | - | |||||||
8 | struct PropertyKey | - | ||||||
9 | { | - | ||||||
10 | private: | - | ||||||
11 | quint64 val; | - | ||||||
12 | - | |||||||
13 | - | |||||||
14 | static const quint64 ArrayIndexMask = 0x3800000000000ull; | - | ||||||
15 | enum { | - | ||||||
16 | IsManagedOrUndefined_Shift = 64-15, | - | ||||||
17 | }; | - | ||||||
18 | inline bool isManaged() const { return executed 1248550206 times by 154 tests: (val >> IsManagedOrUndefined_Shift) == 0;return (val >> IsManagedOrUndefined_Shift) == 0; Executed by:
executed 1248550206 times by 154 tests: }return (val >> IsManagedOrUndefined_Shift) == 0; Executed by:
| 1248550206 | ||||||
19 | inline quint32 value() const { return never executed: val & quint64(~quint32(0));return val & quint64(~quint32(0)); never executed: }return val & quint64(~quint32(0)); | 0 | ||||||
20 | - | |||||||
21 | - | |||||||
22 | inline Heap::StringOrSymbol *m() const | - | ||||||
23 | { | - | ||||||
24 | Heap::StringOrSymbol *b; | - | ||||||
25 | memcpy(&b, &val, 8); | - | ||||||
26 | return executed 855780226 times by 154 tests: b;return b; Executed by:
executed 855780226 times by 154 tests: return b; Executed by:
| 855780226 | ||||||
27 | } | - | ||||||
28 | inline void setM(Heap::StringOrSymbol *b) | - | ||||||
29 | { | - | ||||||
30 | memcpy(&val, &b, 8); | - | ||||||
31 | } executed 39477573 times by 154 tests: end of block Executed by:
| 39477573 | ||||||
32 | public: | - | ||||||
33 | static PropertyKey invalid() { PropertyKey key; key.val = 0; return executed 50437646 times by 154 tests: key;return key; Executed by:
executed 50437646 times by 154 tests: }return key; Executed by:
| 50437646 | ||||||
34 | static PropertyKey fromArrayIndex(uint idx) { PropertyKey key; key.val = ArrayIndexMask | static_cast<quint64>(idx); return executed 302335 times by 45 tests: key;return key; Executed by:
executed 302335 times by 45 tests: }return key; Executed by:
| 302335 | ||||||
35 | bool isStringOrSymbol() const { return executed 298361688 times by 154 tests: isManaged() && val != 0;return isManaged() && val != 0; Executed by:
executed 298361688 times by 154 tests: }return isManaged() && val != 0; Executed by:
| 298361688 | ||||||
36 | uint asArrayIndex() const { return executed 28853600 times by 153 tests: (isManaged() || val == 0) ? std::numeric_limits<uint>::max() : static_cast<uint>(val & 0xffffffff);return (isManaged() || val == 0) ? std::numeric_limits<uint>::max() : static_cast<uint>(val & 0xffffffff); Executed by:
executed 28853600 times by 153 tests: }return (isManaged() || val == 0) ? std::numeric_limits<uint>::max() : static_cast<uint>(val & 0xffffffff); Executed by:
| 28853600 | ||||||
37 | uint isArrayIndex() const { return executed 67784102 times by 154 tests: !isManaged() && val != 0;return !isManaged() && val != 0; Executed by:
executed 67784102 times by 154 tests: }return !isManaged() && val != 0; Executed by:
| 67784102 | ||||||
38 | bool isValid() const { return executed 1114834823 times by 154 tests: val != 0;return val != 0; Executed by:
executed 1114834823 times by 154 tests: }return val != 0; Executed by:
| 1114834823 | ||||||
39 | static PropertyKey fromStringOrSymbol(Heap::StringOrSymbol *b) | - | ||||||
40 | { PropertyKey key; key.setM(b); return executed 39464339 times by 154 tests: key;return key; Executed by:
executed 39464339 times by 154 tests: }return key; Executed by:
| 39464339 | ||||||
41 | Heap::StringOrSymbol *asStringOrSymbol() const { | - | ||||||
42 | if (!isManaged()
| 10-855712302 | ||||||
43 | return executed 10 times by 1 test: nullptr;return nullptr; Executed by:
executed 10 times by 1 test: return nullptr; Executed by:
| 10 | ||||||
44 | return executed 855727583 times by 154 tests: m();return m(); Executed by:
executed 855727583 times by 154 tests: return m(); Executed by:
| 855727583 | ||||||
45 | } | - | ||||||
46 | - | |||||||
47 | bool isString() const; | - | ||||||
48 | bool isSymbol() const; | - | ||||||
49 | - | |||||||
50 | __attribute__((visibility("default"))) QString toQString() const; | - | ||||||
51 | Heap::StringOrSymbol *toStringOrSymbol(ExecutionEngine *e); | - | ||||||
52 | quint64 id() const { return executed 482529292 times by 154 tests: val;return val; Executed by:
executed 482529292 times by 154 tests: }return val; Executed by:
| 482529292 | ||||||
53 | - | |||||||
54 | bool operator ==(const PropertyKey &other) const { return executed 794026452 times by 154 tests: val == other.val;return val == other.val; Executed by:
executed 794026452 times by 154 tests: }return val == other.val; Executed by:
| 794026452 | ||||||
55 | bool operator !=(const PropertyKey &other) const { return executed 1188 times by 20 tests: val != other.val;return val != other.val; Executed by:
executed 1188 times by 20 tests: }return val != other.val; Executed by:
| 1188 | ||||||
56 | bool operator <(const PropertyKey &other) const { return executed 310282825 times by 154 tests: val < other.val;return val < other.val; Executed by:
executed 310282825 times by 154 tests: }return val < other.val; Executed by:
| 310282825 | ||||||
57 | }; | - | ||||||
58 | - | |||||||
59 | } | - | ||||||
60 | - | |||||||
61 | - | |||||||
Switch to Source code | Preprocessed file |