diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-20 10:41:00 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-30 19:46:42 +0000 |
commit | d08f437e3fb0bc6a2c9c1b63f955c223851ff6d8 (patch) | |
tree | 01702502ec0fcd144f2e970be9893590bc042100 /src/qml/compiler/qv4compileddata_p.h | |
parent | e31706d1ad50f3ce5f2fd100df3b2dccccb0b14c (diff) |
Reduce the size of CompiledData::Object
Saves about ~1.6k on examples/quickcontrols/extras/flat/Content.qml and
~11K RAM on the gallery.
Task-number: QTBUG-69588
Change-Id: I272c204873e7e78675b4712ae44800450e9ee345
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index fd01401a4f..6a1014399b 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -628,17 +628,17 @@ struct Object qint32_le_bitfield<16, 16> id; }; qint32_le indexOfDefaultPropertyOrAlias; // -1 means no default property declared in this object - quint32_le nFunctions; + quint16_le nFunctions; + quint16_le nProperties; quint32_le offsetToFunctions; - quint32_le nProperties; quint32_le offsetToProperties; - quint32_le nAliases; quint32_le offsetToAliases; - quint32_le nEnums; + quint16_le nAliases; + quint16_le nEnums; quint32_le offsetToEnums; // which in turn will be a table with offsets to variable-sized Enum objects - quint32_le nSignals; quint32_le offsetToSignals; // which in turn will be a table with offsets to variable-sized Signal objects - quint32_le nBindings; + quint16_le nSignals; + quint16_le nBindings; quint32_le offsetToBindings; quint32_le nNamedObjectsInComponent; quint32_le offsetToNamedObjectsInComponent; @@ -729,7 +729,7 @@ struct Object int namedObjectsInComponentCount() const { return nNamedObjectsInComponent; } // --- }; -static_assert(sizeof(Object) == 80, "Object structure needs to have the expected size to be binary compatible on disk when generated by host compiler and loaded by target"); +static_assert(sizeof(Object) == 68, "Object structure needs to have the expected size to be binary compatible on disk when generated by host compiler and loaded by target"); struct Import { |