diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2016-05-19 15:03:33 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2016-05-20 09:36:45 +0000 |
commit | 5e841b26ee90fa91fb8aea0ab17b738a0a49ce74 (patch) | |
tree | da08dc7639492c38019f24f8868eae620d3e2a5c /src/qml/qml/qqmlvmemetaobject_p.h | |
parent | 219873c65fed284310bfb6d32d8b7ddf8fc15da1 (diff) |
Minor optimization for VME meta objects
Instead of storing the methods of a qml object in an array of persistents,
let's just store them in the same member data array we also use for properties.
That reduces the amount of persistents and saves one pointer per instance.
Change-Id: I1ad1d9ec76b78fce01bc6ded7eaf536cb99dd245
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject_p.h')
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject_p.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index 20b8b99522..cbb79f2d0c 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -219,9 +219,8 @@ public: QQmlVMEMetaObjectEndpoint *aliasEndpoints; - QV4::WeakValue properties; - inline void allocateProperties(); - QV4::MemberData *propertiesAsMemberData(); + QV4::WeakValue propertyAndMethodStorage; + QV4::MemberData *propertyAndMethodStorageAsMemberData(); int readPropertyAsInt(int id); bool readPropertyAsBool(int id); @@ -254,7 +253,6 @@ public: void connectAlias(int aliasId); - QV4::PersistentValue *methods; QV4::ReturnedValue method(int); QV4::ReturnedValue readVarProperty(int); |