aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4function_p.h
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_p.h
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_p.h')
-rw-r--r--src/qml/jsruntime/qv4function_p.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h
index 51960863c4..ce9151c225 100644
--- a/src/qml/jsruntime/qv4function_p.h
+++ b/src/qml/jsruntime/qv4function_p.h
@@ -50,6 +50,7 @@
// We mean it.
//
+#include <qqmlprivate.h>
#include "qv4global_p.h"
#include <private/qv4executablecompilationunit_p.h>
#include <private/qv4context_p.h>
@@ -82,7 +83,7 @@ Q_STATIC_ASSERT(std::is_standard_layout< FunctionData >::value);
struct Q_QML_EXPORT Function : public FunctionData {
private:
Function(ExecutionEngine *engine, ExecutableCompilationUnit *unit,
- const CompiledData::Function *function);
+ const CompiledData::Function *function, const QQmlPrivate::AOTCompiledFunction *aotFunction);
~Function();
public:
@@ -106,6 +107,7 @@ public:
typedef ReturnedValue (*JittedCode)(CppStackFrame *, ExecutionEngine *);
JittedCode jittedCode;
JSC::MacroAssemblerCodeRef *codeRef;
+ const QQmlPrivate::AOTCompiledFunction *aotFunction = nullptr;
// first nArguments names in internalClass are the actual arguments
Heap::InternalClass *internalClass;
@@ -114,7 +116,8 @@ public:
bool isEval = false;
static Function *create(ExecutionEngine *engine, ExecutableCompilationUnit *unit,
- const CompiledData::Function *function);
+ const CompiledData::Function *function,
+ const QQmlPrivate::AOTCompiledFunction *aotFunction);
void destroy();
// used when dynamically assigning signal handlers (QQmlConnection)