From 9ee11d99fcfdb89adb7bf1829398caa235037b28 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 29 Aug 2017 13:22:59 +0200 Subject: Get rid of the specialized Moth::CompilationUnit It didn't do anything special anymore, so fold the last small bit of functionality back into the base class. Change-Id: Ic8f62e645b2742aa91f13f63adaf321353962bc5 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4compileddata.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/qml/compiler/qv4compileddata.cpp') diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index 3f6f9f12b6..58588e4ad5 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #include "qv4compilationunitmapper_p.h" #include #include @@ -393,6 +394,15 @@ bool CompilationUnit::loadFromDisk(const QUrl &url, const QDateTime &sourceTimeS return true; } +void CompilationUnit::linkBackendToEngine(ExecutionEngine *engine) +{ + runtimeFunctions.resize(data->functionTableSize); + for (int i = 0 ;i < runtimeFunctions.size(); ++i) { + const QV4::CompiledData::Function *compiledFunction = data->functionAt(i); + runtimeFunctions[i] = new QV4::Function(engine, this, compiledFunction, &Moth::VME::exec); + } +} + #endif // V4_BOOTSTRAP #if defined(V4_BOOTSTRAP) -- cgit v1.2.3