diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-09-24 12:27:21 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-09-24 14:56:40 +0200 |
commit | 37c52cf6453a91127bcf54f1506fe7eaffd563ad (patch) | |
tree | 0ed9849fc022d80c9df38cd0c41ac800111c02da /src/qml/compiler/qv4compiler_p.h | |
parent | ef8e2cd85d380ee9f19cb6642c11e9f7c9fc3a7d (diff) |
Cleanup: Simplify CompiledData::Unit structure to always include the string table at the end
Change-Id: Iae86b8f4dc0dc67c14974472f627e28d6795369f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4compiler_p.h')
-rw-r--r-- | src/qml/compiler/qv4compiler_p.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compiler_p.h b/src/qml/compiler/qv4compiler_p.h index 109998dc33..7b349caaf8 100644 --- a/src/qml/compiler/qv4compiler_p.h +++ b/src/qml/compiler/qv4compiler_p.h @@ -63,7 +63,7 @@ struct Q_QML_PRIVATE_EXPORT StringTableGenerator { void clear(); - void serialize(uint *stringTable, char *dataStart, char *stringData); + void serialize(CompiledData::Unit *unit); private: QHash<QString, int> stringToId; @@ -90,7 +90,12 @@ struct Q_QML_PRIVATE_EXPORT JSUnitGenerator { int registerJSClass(int count, IR::ExprList *args); - QV4::CompiledData::Unit *generateUnit(); + enum GeneratorOption { + GenerateWithStringTable, + GenerateWithoutStringTable + }; + + QV4::CompiledData::Unit *generateUnit(GeneratorOption option = GenerateWithStringTable); // Returns bytes written int writeFunction(char *f, int index, IR::Function *irFunction); |