summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4executablecompilationunit.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2020-04-15 09:17:02 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2020-04-22 09:54:02 +0200
commitca1098ec1ef83589a78178eee3d28faa7d067017 (patch)
treebb541620259b76e39f9d2c3fa5cfaacb86d8bb5c /src/qml/jsruntime/qv4executablecompilationunit.cpp
parent28a31148ca02dbb530fd92dfafbcf71c64af4b70 (diff)
downloadqtdeclarative-ca1098ec1ef83589a78178eee3d28faa7d067017.tar.gz
Add support for binding ahead-of-time compiled bindings to QProperties
When the ahead-of-time built binding returns the same type as the QProperty, then we can connect them directly with a small shim and pass through the context and scope objects. Change-Id: I9cb49d1fa35490a4ccb06965397674d5534c067d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4executablecompilationunit.cpp')
-rw-r--r--src/qml/jsruntime/qv4executablecompilationunit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4executablecompilationunit.cpp b/src/qml/jsruntime/qv4executablecompilationunit.cpp
index 94fa3e0fbf..4b0fe0f5f6 100644
--- a/src/qml/jsruntime/qv4executablecompilationunit.cpp
+++ b/src/qml/jsruntime/qv4executablecompilationunit.cpp
@@ -38,7 +38,9 @@
****************************************************************************/
#include "qml/qqmlprivate.h"
+#include "qv4engine_p.h"
#include "qv4executablecompilationunit_p.h"
+#include "qv4stackframe_p.h"
#include <private/qv4engine_p.h>
#include <private/qv4regexp_p.h>
@@ -212,13 +214,11 @@ QV4::Function *ExecutableCompilationUnit::linkToEngine(ExecutionEngine *engine)
const QQmlPrivate::AOTCompiledFunction *aotFunction = aotCompiledFunctions;
for (int i = 0 ;i < runtimeFunctions.size(); ++i) {
const QV4::CompiledData::Function *compiledFunction = data->functionAt(i);
- runtimeFunctions[i] = QV4::Function::create(engine, this, compiledFunction);
+ runtimeFunctions[i] = QV4::Function::create(engine, this, compiledFunction, aotFunction);
if (aotFunction) {
if (aotFunction->functionPtr) {
- if (aotFunction->index == i) {
- runtimeFunctions[i]->jittedCode = aotFunction->functionPtr;
+ if (aotFunction->index == i)
++aotFunction;
- }
} else {
aotFunction = nullptr;
}