aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4function.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/qv4function.cpp
parent28a31148ca02dbb530fd92dfafbcf71c64af4b70 (diff)
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/qv4function.cpp')
-rw-r--r--src/qml/jsruntime/qv4function.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp
index aeb4835c40..76eda5dcde 100644
--- a/src/qml/jsruntime/qv4function.cpp
+++ b/src/qml/jsruntime/qv4function.cpp
@@ -37,6 +37,7 @@
**
****************************************************************************/
+#include "qml/qqmlprivate.h"
#include "qv4function_p.h"
#include "qv4functionobject_p.h"
#include "qv4managed_p.h"
@@ -74,9 +75,10 @@ ReturnedValue Function::call(const Value *thisObject, const Value *argv, int arg
}
Function *Function::create(ExecutionEngine *engine, ExecutableCompilationUnit *unit,
- const CompiledData::Function *function)
+ const CompiledData::Function *function,
+ const QQmlPrivate::AOTCompiledFunction *aotFunction)
{
- return new Function(engine, unit, function);
+ return new Function(engine, unit, function, aotFunction);
}
void Function::destroy()
@@ -85,12 +87,14 @@ void Function::destroy()
}
Function::Function(ExecutionEngine *engine, ExecutableCompilationUnit *unit,
- const CompiledData::Function *function)
+ const CompiledData::Function *function,
+ const QQmlPrivate::AOTCompiledFunction *aotFunction)
: FunctionData(unit)
, compiledFunction(function)
, codeData(function->code())
, jittedCode(nullptr)
, codeRef(nullptr)
+ , aotFunction(aotFunction)
{
Scope scope(engine);
Scoped<InternalClass> ic(scope, engine->internalClasses(EngineBase::Class_CallContext));