diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-08-16 21:31:24 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2013-08-16 21:39:51 +0200 |
commit | 3bc7823fc86b4b2f8b7ef5c147c10568e5ed0296 (patch) | |
tree | 049b1687b85a5f5a3f0300c335ffb792a6a0d3f5 /src/qml/compiler/qv4isel_moth.cpp | |
parent | 33149123187fda2bc96bd0288502cca97016791d (diff) |
Merge Function::init with the constructor
Change-Id: I557f8a80aa2c74398b94e87ed0f29fe8d2297150
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_moth.cpp')
-rw-r--r-- | src/qml/compiler/qv4isel_moth.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp index 3622f2a4fe..c1d926c2e4 100644 --- a/src/qml/compiler/qv4isel_moth.cpp +++ b/src/qml/compiler/qv4isel_moth.cpp @@ -1088,14 +1088,15 @@ QV4::Function *CompilationUnit::linkBackendToEngine(QV4::ExecutionEngine *engine const QV4::CompiledData::Function *compiledRootFunction = data->functionAt(data->indexOfRootFunction); + runtimeFunctions.resize(data->functionTableSize); + for (int i = 0 ;i < runtimeFunctions.size(); ++i) { - QV4::Function *runtimeFunction = runtimeFunctions.at(i); const QV4::CompiledData::Function *compiledFunction = data->functionAt(i); - runtimeFunction->init(this, compiledFunction, - &VME::exec, /*size - doesn't matter for moth*/0); - + QV4::Function *runtimeFunction = new QV4::Function(engine, this, compiledFunction, + &VME::exec, /*size - doesn't matter for moth*/0); runtimeFunction->codeData = reinterpret_cast<const uchar *>(codeRefs.at(i).constData()); + runtimeFunctions[i] = runtimeFunction; if (QV4::Debugging::Debugger *debugger = engine->debugger) debugger->setPendingBreakpoints(runtimeFunction); |