Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4identifiertable_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | namespace QV4 { | - | ||||||
7 | - | |||||||
8 | struct IdentifierTable | - | ||||||
9 | { | - | ||||||
10 | ExecutionEngine *engine; | - | ||||||
11 | - | |||||||
12 | int alloc; | - | ||||||
13 | int size; | - | ||||||
14 | int numBits; | - | ||||||
15 | Heap::StringOrSymbol **entriesByHash; | - | ||||||
16 | Heap::StringOrSymbol **entriesById; | - | ||||||
17 | - | |||||||
18 | QSet<IdentifierHashData *> idHashes; | - | ||||||
19 | - | |||||||
20 | void addEntry(Heap::StringOrSymbol *str); | - | ||||||
21 | - | |||||||
22 | public: | - | ||||||
23 | - | |||||||
24 | IdentifierTable(ExecutionEngine *engine); | - | ||||||
25 | ~IdentifierTable(); | - | ||||||
26 | - | |||||||
27 | Heap::String *insertString(const QString &s); | - | ||||||
28 | Heap::Symbol *insertSymbol(const QString &s); | - | ||||||
29 | - | |||||||
30 | PropertyKey asPropertyKey(const Heap::String *str) { | - | ||||||
31 | if (str->identifier.isValid()
| 5137655-51489818 | ||||||
32 | return executed 5138001 times by 82 tests: str->identifier;return str->identifier; Executed by:
executed 5138001 times by 82 tests: return str->identifier; Executed by:
| 5138001 | ||||||
33 | return executed 51506278 times by 153 tests: asPropertyKeyImpl(str);return asPropertyKeyImpl(str); Executed by:
executed 51506278 times by 153 tests: return asPropertyKeyImpl(str); Executed by:
| 51506278 | ||||||
34 | } | - | ||||||
35 | PropertyKey asPropertyKey(const QV4::String *str) { | - | ||||||
36 | return executed 52403392 times by 153 tests: asPropertyKey(str->d());return asPropertyKey(str->d()); Executed by:
executed 52403392 times by 153 tests: return asPropertyKey(str->d()); Executed by:
| 52403392 | ||||||
37 | } | - | ||||||
38 | - | |||||||
39 | PropertyKey asPropertyKey(const QString &s); | - | ||||||
40 | PropertyKey asPropertyKey(const char *s, int len); | - | ||||||
41 | - | |||||||
42 | PropertyKey asPropertyKeyImpl(const Heap::String *str); | - | ||||||
43 | - | |||||||
44 | Heap::StringOrSymbol *resolveId(PropertyKey i) const; | - | ||||||
45 | __attribute__((visibility("default"))) Heap::String *stringForId(PropertyKey i) const; | - | ||||||
46 | __attribute__((visibility("default"))) Heap::Symbol *symbolForId(PropertyKey i) const; | - | ||||||
47 | - | |||||||
48 | void markObjects(MarkStack *markStack); | - | ||||||
49 | void sweep(); | - | ||||||
50 | - | |||||||
51 | void addIdentifierHash(IdentifierHashData *h) { | - | ||||||
52 | idHashes.insert(h); | - | ||||||
53 | } executed 133883 times by 84 tests: end of block Executed by:
| 133883 | ||||||
54 | void removeIdentifierHash(IdentifierHashData *h) { | - | ||||||
55 | idHashes.remove(h); | - | ||||||
56 | } executed 87753 times by 77 tests: end of block Executed by:
| 87753 | ||||||
57 | }; | - | ||||||
58 | - | |||||||
59 | } | - | ||||||
60 | - | |||||||
61 | - | |||||||
Switch to Source code | Preprocessed file |