aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 45fdde98f7..2ca4584fc1 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -221,10 +221,10 @@ void FunctionCtor::construct(const Managed *that, Scope &scope, CallData *callDa
IR::Module module(scope.engine->debugger() != 0);
- QQmlJS::RuntimeCodegen cg(scope.engine, f->strictMode());
+ Compiler::JSUnitGenerator jsGenerator(&module);
+ QQmlJS::RuntimeCodegen cg(scope.engine, &jsGenerator, f->strictMode());
cg.generateFromFunctionExpression(QString(), function, fe, &module);
- Compiler::JSUnitGenerator jsGenerator(&module);
QScopedPointer<EvalInstructionSelection> isel(scope.engine->iselFactory->create(QQmlEnginePrivate::get(scope.engine), scope.engine->executableAllocator, &module, &jsGenerator));
QQmlRefPointer<CompiledData::CompilationUnit> compilationUnit = isel->compile();
Function *vmf = compilationUnit->linkToEngine(scope.engine);