aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlprivate.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-03-17 10:03:47 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-03-23 06:51:57 +0100
commit4333dded89ce2e49f9ef3ef50ff474ec04e284dd (patch)
tree4f0f4f9214a0e0be147141de0992d4453644807e /src/qml/qml/qqmlprivate.h
parentf8f31dd0e1f9425ba272691c79e719ebc4bcfb94 (diff)
Expose lookups to AOT compiled functions
This is based on QJSValue for now, but can be extended to operate on QMetaType/void* later. Change-Id: Ic63d4c9081090998afcca63ff3253963ff5096a2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlprivate.h')
-rw-r--r--src/qml/qml/qqmlprivate.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlprivate.h b/src/qml/qml/qqmlprivate.h
index fb2d80b3df..8c47c71305 100644
--- a/src/qml/qml/qqmlprivate.h
+++ b/src/qml/qml/qqmlprivate.h
@@ -83,9 +83,9 @@ using QQmlAttachedPropertiesFunc = A *(*)(QObject *);
namespace QV4 {
struct ExecutionEngine;
+class ExecutableCompilationUnit;
namespace CompiledData {
struct Unit;
-struct CompilationUnit;
}
}
namespace QmlIR {
@@ -606,10 +606,19 @@ namespace QQmlPrivate
QQmlContext *qmlContext;
QObject *qmlScopeObject;
QJSEngine *engine;
- QV4::CompiledData::CompilationUnit *compilationUnit;
+ QV4::ExecutableCompilationUnit *compilationUnit;
QJSValue jsMetaType(int index) const;
void setInstructionPointer(int offset) const;
+
+ QJSValue loadQmlContextPropertyLookup(uint index) const;
+ QJSValue callQmlContextPropertyLookup(uint index, const QJSValueList &args) const;
+ QJSValue getLookup(uint index, const QJSValue &object) const;
+ void setLookup(uint index, const QJSValue &object, const QJSValue &value) const;
+ QJSValue callPropertyLookup(uint index, const QJSValue &object,
+ const QJSValueList &args) const;
+ QJSValue callGlobalLookup(uint index, const QJSValueList &args) const;
+ QJSValue loadGlobalLookup(uint index) const;
};
struct AOTCompiledFunction {