diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-04-30 17:54:21 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-05-03 10:17:18 +0200 |
commit | 614c7ac21d20f8ab64c95dc82411d40b55e18cfc (patch) | |
tree | fddd8bf6c0adb56f9617e6f0ad7142acb79168f1 /src/qml/qml/qqml.cpp | |
parent | 8c9d412379abb653d532e786595c6b04b7fd0203 (diff) |
Provide an AOT variant of StoreNameSloppy
Leverage the property cache for efficiency.
Change-Id: I99910d6851aa5c3d58b15094fbc092c157c74368
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqml.cpp')
-rw-r--r-- | src/qml/qml/qqml.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp index ab513803b0..f169474cb7 100644 --- a/src/qml/qml/qqml.cpp +++ b/src/qml/qml/qqml.cpp @@ -848,6 +848,19 @@ QMetaType AOTCompiledContext::lookupResultMetaType(uint index) const return QMetaType(); } +void AOTCompiledContext::storeNameSloppy(uint nameIndex, void *value) const +{ + // We don't really use any part of the lookup machinery here. + // The QV4::Lookup is created on the stack to conveniently get the property cache, and through + // the property cache we store a value into the property. + + QV4::Lookup l; + l.nameIndex = nameIndex; + initObjectLookup(this, &l, qmlScopeObject); + storeObjectProperty(&l, qmlScopeObject, value); + l.qobjectLookup.propertyCache->release(); +} + bool AOTCompiledContext::callQmlContextPropertyLookup( uint index, void **args, const QMetaType *types, int argc) const { |