diff options
author | Simon Hausmann <[email protected]> | 2014-03-27 19:18:55 +0100 |
---|---|---|
committer | The Qt Project <[email protected]> | 2014-03-28 16:25:16 +0100 |
commit | 1526771ebf473af8a65bce77cfd16be67b6eb944 (patch) | |
tree | b4167f7f93703db93da1a5f5b486da1ada4d007e /src/qml/compiler/qv4compileddata_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 <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index d6d2419d74..afcf2c6a24 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -228,10 +228,10 @@ struct Unit return reinterpret_cast<const JSClassMember*>(ptr + sizeof(JSClass)); } - static int calculateSize(uint headerSize, uint nStrings, uint nFunctions, uint nRegExps, uint nConstants, + static int calculateSize(uint headerSize, uint nFunctions, uint nRegExps, uint nConstants, uint nLookups, uint nClasses) { return (headerSize - + (nStrings + nFunctions + nClasses) * sizeof(uint) + + (nFunctions + nClasses) * sizeof(uint) + nRegExps * RegExp::calculateSize() + nConstants * sizeof(QV4::ReturnedValue) + nLookups * Lookup::calculateSize() |