diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2020-04-09 10:47:32 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2020-04-22 06:35:26 +0200 |
commit | 505863e7004c60fa2fc9aafc41516e2ee8a8efaa (patch) | |
tree | 8a4200b35c8add4c2b5873a71982c7487025bbee /src/qml/jsruntime/qv4script.cpp | |
parent | 5728f48834b9225a36d3e1dae44ced7579cde358 (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/jsruntime/qv4script.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4script.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index 56a81578b6..7fa3544e5a 100644 --- a/src/qml/jsruntime/qv4script.cpp +++ b/src/qml/jsruntime/qv4script.cpp @@ -230,7 +230,7 @@ Script *Script::createFromFileOrCache(ExecutionEngine *engine, QmlContext *qmlCo if (const QQmlPrivate::CachedQmlUnit *cachedUnit = QQmlMetaType::findCachedCompilationUnit(originalUrl, &cacheError)) { QQmlRefPointer<QV4::ExecutableCompilationUnit> jsUnit = QV4::ExecutableCompilationUnit::create( - QV4::CompiledData::CompilationUnit(cachedUnit->qmlData)); + QV4::CompiledData::CompilationUnit(cachedUnit->qmlData, cachedUnit->aotCompiledFunctions)); return new QV4::Script(engine, qmlContext, jsUnit); } |