diff options
author | Lars Knoll <lars.knoll@qt.io> | 2019-04-07 19:50:51 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-12-02 12:54:53 +0100 |
commit | 7cf80e6de060cb5d90179ef61745363ff3381941 (patch) | |
tree | f8a785a6270fdb52e7096196f18d8e5db235a666 /src/qml/jsruntime | |
parent | 7163d6b2a4b9c74ea0378067814b6bd8523b27f5 (diff) |
Remove the property cache from QQmlValueTypeWrapper
Instead operate directly on the meta object.
We could maybe have an optimization, where we have a global map
from id to QQmlPropertyData for each value type.
Task-number: QTBUG-88765
Change-Id: I259a06ba116a536b56380c2636737c6c016665d9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r-- | src/qml/jsruntime/qv4executablecompilationunit.cpp | 5 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4lookup_p.h | 8 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/src/qml/jsruntime/qv4executablecompilationunit.cpp b/src/qml/jsruntime/qv4executablecompilationunit.cpp index 7059c14212..5aaec63a05 100644 --- a/src/qml/jsruntime/qv4executablecompilationunit.cpp +++ b/src/qml/jsruntime/qv4executablecompilationunit.cpp @@ -322,12 +322,7 @@ void ExecutableCompilationUnit::unlink() || l.getter == QQmlTypeWrapper::lookupSingletonProperty) { if (QQmlPropertyCache *pc = l.qobjectLookup.propertyCache) pc->release(); - } else if (l.getter == QQmlValueTypeWrapper::lookupGetter - || l.getter == QQmlTypeWrapper::lookupSingletonProperty) { - if (QQmlPropertyCache *pc = l.qgadgetLookup.propertyCache) - pc->release(); } - if (l.qmlContextPropertyGetter == QQmlContextWrapper::lookupScopeObjectProperty || l.qmlContextPropertyGetter == QQmlContextWrapper::lookupContextObjectProperty) { if (QQmlPropertyCache *pc = l.qobjectLookup.propertyCache) diff --git a/src/qml/jsruntime/qv4lookup_p.h b/src/qml/jsruntime/qv4lookup_p.h index 31c90b31f6..6232d78a57 100644 --- a/src/qml/jsruntime/qv4lookup_p.h +++ b/src/qml/jsruntime/qv4lookup_p.h @@ -126,9 +126,11 @@ struct Q_QML_PRIVATE_EXPORT Lookup { } qobjectLookup; struct { Heap::InternalClass *ic; - quintptr unused; - QQmlPropertyCache *propertyCache; - QQmlPropertyData *propertyData; + quintptr metaObject; // a (const QMetaObject* & 1) or nullptr + const QtPrivate::QMetaTypeInterface *metaType; // cannot use QMetaType; class must be trivial + quint16 coreIndex; + bool isFunction; + bool isEnum; } qgadgetLookup; struct { quintptr unused1; diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 5d5165e7f9..2e6df06c36 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -2032,7 +2032,7 @@ void Heap::QObjectMethod::init(QV4::ExecutionContext *scope) const QMetaObject *Heap::QObjectMethod::metaObject() { if (valueTypeWrapper) - return valueTypeWrapper->propertyCache()->createMetaObject(); + return valueTypeWrapper->metaObject(); return object()->metaObject(); } |