diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-03-27 19:18:55 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-28 16:25:16 +0100 |
commit | 1526771ebf473af8a65bce77cfd16be67b6eb944 (patch) | |
tree | b4167f7f93703db93da1a5f5b486da1ada4d007e /src/qml/compiler/qv4compiler_p.h | |
parent | 0ed744c1ef955cdb94cbd89c58283663da490d7d (diff) |
V4 string table cleanups
Move the string table (index and data) to the end of the compilation unit.
That makes it easier to extend the string table later with new strings - for
example when transitioning from JS data to an entire QML unit - because all the
other offsets within the JS data remain the same.
Change-Id: Ib28caf943ee2ec74b7acc19c2980de0853bb8086
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compiler_p.h b/src/qml/compiler/qv4compiler_p.h index 756e7cfd52..e04f13aaf3 100644 --- a/src/qml/compiler/qv4compiler_p.h +++ b/src/qml/compiler/qv4compiler_p.h @@ -66,7 +66,8 @@ struct Q_QML_EXPORT StringTableGenerator { int getStringId(const QString &string) const; QString stringForIndex(int index) const { return strings.at(index); } uint stringCount() const { return strings.size(); } - uint dataSize() const { return stringDataSize; } + + uint sizeOfTableAndData() const { return stringDataSize + strings.count() * sizeof(uint); } void clear(); |