aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlprivate.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2020-04-09 10:47:32 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2020-04-22 06:35:26 +0200
commit505863e7004c60fa2fc9aafc41516e2ee8a8efaa (patch)
tree8a4200b35c8add4c2b5873a71982c7487025bbee /src/qml/qml/qqmlprivate.h
parent5728f48834b9225a36d3e1dae44ced7579cde358 (diff)
Add a hook that allows for ahead-of-time compiled functions
Use the unused field in the CachedUnit structure provided by qmlcachegen to allow for providing function pointers for functions and bindings that are compiled ahead of time. Provided is the pointer into an array that is terminated with a {index: 0, functionPtr: nullptr} entry. The array index field in each array entry allows for gaps. Change-Id: I7457f5eea5f14e5f94431b9cc6da042cb03517a0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlprivate.h')
-rw-r--r--src/qml/qml/qqmlprivate.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlprivate.h b/src/qml/qml/qqmlprivate.h
index 78d6d05291..cc1a14d24b 100644
--- a/src/qml/qml/qqmlprivate.h
+++ b/src/qml/qml/qqmlprivate.h
@@ -84,6 +84,7 @@ namespace CompiledData {
struct Unit;
struct CompilationUnit;
}
+struct CppStackFrame;
}
namespace QmlIR {
struct Document;
@@ -450,9 +451,14 @@ namespace QQmlPrivate
const char *typeName;
};
+ struct AOTCompiledFunction {
+ int index;
+ quint64 (*functionPtr)(QV4::CppStackFrame *, QV4::ExecutionEngine *);
+ };
+
struct CachedQmlUnit {
const QV4::CompiledData::Unit *qmlData;
- void *unused1;
+ const AOTCompiledFunction *aotCompiledFunctions;
void *unused2;
};