diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-08-29 13:22:59 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-08-31 12:06:36 +0000 |
commit | 9ee11d99fcfdb89adb7bf1829398caa235037b28 (patch) | |
tree | 49618271ac64ffa5456523b7a50cf660733f8455 /src/qml/compiler/qv4compileddata.cpp | |
parent | 260a24800dcdf3fa6ad4a8d0abaa0c8b23aae511 (diff) |
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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 <private/qqmlpropertycache_p.h> #include <private/qqmltypeloader_p.h> #include <private/qqmlengine_p.h> +#include <private/qv4vme_moth_p.h> #include "qv4compilationunitmapper_p.h" #include <QQmlPropertyMap> #include <QDateTime> @@ -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) |