diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-06-12 10:27:54 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-06-19 12:50:37 +0000 |
commit | 56f29d005c2c6eb028e3ed2d1ef8edd6d03d1403 (patch) | |
tree | e8a2503ba9f50c7797e16eeb96e444617b54ec18 /src/qml/jsruntime/qv4functionobject.cpp | |
parent | 6f2bdb816dc816461cf3888eb732f71904b6a7ab (diff) |
Pass the JSUnitGenerator into the codegen
Allow registering all the required data to generate the
proper compilationunit already in the codegenerator.
Change-Id: I36345cc01927b3f8dc3ba6d91da175bd6abe124a
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 4 |
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); |