aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2025-12-12 15:06:59 +0100
committerUlf Hermann <ulf.hermann@qt.io>2025-12-15 09:39:13 +0100
commitc8ef71697e8604aa46ffde12bf0d946bf1f4fe41 (patch)
tree043d5e09dd29ac3781df7e3d39d98513683d5331 /src
parentd6eb00f537fc8924f7844c98426fbd0c8882621b (diff)
QtQml: Re-order QQmlTypeData::TypeReference and ScriptReference
This drops the size from 72 bytes to 48 byes on x86_64. We have a lot of type references. ScriptReference stays the same size, but the padding moves to the end. Pick-to: 6.11 Change-Id: Iab377ea1e5cec983a32c9c2d80369f624e3c8fa9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/qqmltypedata_p.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/qml/qml/qqmltypedata_p.h b/src/qml/qml/qqmltypedata_p.h
index f480d26742..d8b471a940 100644
--- a/src/qml/qml/qqmltypedata_p.h
+++ b/src/qml/qml/qqmltypedata_p.h
@@ -31,23 +31,22 @@ public:
struct TypeReference
{
- TypeReference() : version(QTypeRevision::zero()), needsCreation(true) {}
-
- QV4::CompiledData::Location location;
+ QString prefix; // used by CompositeSingleton types
QQmlType type;
- QTypeRevision version;
QQmlRefPointer<QQmlTypeData> typeData;
+ QV4::CompiledData::Location location;
+ QTypeRevision version = QTypeRevision::zero();
bool selfReference = false;
- QString prefix; // used by CompositeSingleton types
+ bool needsCreation = true;
+
QString qualifiedName() const;
- bool needsCreation;
};
struct ScriptReference
{
- QV4::CompiledData::Location location;
QString qualifier;
QQmlRefPointer<QQmlScriptBlob> script;
+ QV4::CompiledData::Location location;
};
private: