Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/compiler/qv4compiler_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | - | |
4 | class QQmlPropertyData; | - |
5 | - | |
6 | namespace QV4 { | - |
7 | - | |
8 | namespace CompiledData { | - |
9 | struct Unit; | - |
10 | struct Lookup; | - |
11 | struct RegExp; | - |
12 | struct JSClassMember; | - |
13 | } | - |
14 | - | |
15 | namespace Compiler { | - |
16 | - | |
17 | struct Class; | - |
18 | - | |
19 | struct StringTableGenerator { | - |
20 | StringTableGenerator(); | - |
21 | - | |
22 | int registerString(const QString &str); | - |
23 | int getStringId(const QString &string) const; | - |
24 | QString stringForIndex(int index) const { return executed 905260 times by 143 tests: strings.at(index);return strings.at(index); Executed by:
executed 905260 times by 143 tests: }return strings.at(index); Executed by:
| 905260 |
25 | uint stringCount() const { return executed 2288967 times by 31 tests: strings.size();return strings.size(); Executed by:
executed 2288967 times by 31 tests: }return strings.size(); Executed by:
| 2288967 |
26 | - | |
27 | uint sizeOfTableAndData() const { return executed 2289500 times by 31 tests: stringDataSize + strings.count() * sizeof(uint);return stringDataSize + strings.count() * sizeof(uint); Executed by:
executed 2289500 times by 31 tests: }return stringDataSize + strings.count() * sizeof(uint); Executed by:
| 2289500 |
28 | - | |
29 | void clear(); | - |
30 | - | |
31 | void serialize(CompiledData::Unit *unit); | - |
32 | - | |
33 | private: | - |
34 | QHash<QString, int> stringToId; | - |
35 | QStringList strings; | - |
36 | uint stringDataSize; | - |
37 | }; | - |
38 | - | |
39 | struct JSUnitGenerator { | - |
40 | struct MemberInfo { | - |
41 | QString name; | - |
42 | bool isAccessor; | - |
43 | }; | - |
44 | - | |
45 | JSUnitGenerator(Module *module); | - |
46 | - | |
47 | int registerString(const QString &str) { return executed 25636598 times by 147 tests: stringTable.registerString(str);return stringTable.registerString(str); Executed by:
executed 25636598 times by 147 tests: }return stringTable.registerString(str); Executed by:
| 25636598 |
48 | int getStringId(const QString &string) const { return executed 10212533 times by 147 tests: stringTable.getStringId(string);return stringTable.getStringId(string); Executed by:
executed 10212533 times by 147 tests: }return stringTable.getStringId(string); Executed by:
| 10212533 |
49 | QString stringForIndex(int index) const { return executed 752926 times by 143 tests: stringTable.stringForIndex(index);return stringTable.stringForIndex(index); Executed by:
executed 752926 times by 143 tests: }return stringTable.stringForIndex(index); Executed by:
| 752926 |
50 | - | |
51 | int registerGetterLookup(const QString &name); | - |
52 | int registerGetterLookup(int nameIndex); | - |
53 | int registerSetterLookup(const QString &name); | - |
54 | int registerSetterLookup(int nameIndex); | - |
55 | int registerGlobalGetterLookup(const QString &name); | - |
56 | int registerGlobalGetterLookup(int nameIndex); | - |
57 | - | |
58 | int registerRegExp(QQmlJS::AST::RegExpLiteral *regexp); | - |
59 | - | |
60 | int registerConstant(ReturnedValue v); | - |
61 | ReturnedValue constant(int idx); | - |
62 | - | |
63 | int registerJSClass(const QStringList &members); | - |
64 | - | |
65 | enum GeneratorOption { | - |
66 | GenerateWithStringTable, | - |
67 | GenerateWithoutStringTable | - |
68 | }; | - |
69 | - | |
70 | QV4::CompiledData::Unit *generateUnit(GeneratorOption option = GenerateWithStringTable); | - |
71 | void writeFunction(char *f, Context *irFunction) const; | - |
72 | void writeClass(char *f, const Class &c); | - |
73 | void writeBlock(char *f, Context *irBlock) const; | - |
74 | - | |
75 | StringTableGenerator stringTable; | - |
76 | QString codeGeneratorName; | - |
77 | private: | - |
78 | CompiledData::Unit generateHeader(GeneratorOption option, quint32_le *functionOffsets, uint *jsClassDataOffset); | - |
79 | - | |
80 | Module *module; | - |
81 | - | |
82 | QList<CompiledData::Lookup> lookups; | - |
83 | QVector<CompiledData::RegExp> regexps; | - |
84 | QVector<ReturnedValue> constants; | - |
85 | QByteArray jsClassData; | - |
86 | QVector<int> jsClassOffsets; | - |
87 | }; | - |
88 | - | |
89 | } | - |
90 | - | |
91 | } | - |
92 | - | |
93 | - | |
Switch to Source code | Preprocessed file |