diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-06-30 15:34:12 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-07-03 06:09:13 +0000 |
commit | bac9b54dfb38767a34410fa55f8f46e64b458efb (patch) | |
tree | 800905c8112b465b1ded26f100b1abc7f7f17c68 /src/qml/jsruntime/qv4functionobject.cpp | |
parent | f4804726c30279c54b0e9354305506458b9a0c76 (diff) |
Split up qv4codegen into several files
And changed the namespace of those classes to
QV4::Compiler.
ScanFunctions should over time also move into its
own file.
Change-Id: If084acea4a9a20b9c79ad47dac19e02dc720e098
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 992701d0fb..fbce1e0cda 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -210,17 +210,16 @@ void FunctionCtor::construct(const Managed *that, Scope &scope, CallData *callDa return; } - using namespace QQmlJS::AST; - FunctionExpression *fe = QQmlJS::AST::cast<FunctionExpression *>(parser.rootNode()); + QQmlJS::AST::FunctionExpression *fe = QQmlJS::AST::cast<QQmlJS::AST::FunctionExpression *>(parser.rootNode()); if (!fe) { scope.result = scope.engine->throwSyntaxError(QLatin1String("Parse error")); return; } - QQmlJS::Module module(scope.engine->debugger() != 0); + Compiler::Module module(scope.engine->debugger() != 0); Compiler::JSUnitGenerator jsGenerator(&module); - QQmlJS::RuntimeCodegen cg(scope.engine, &jsGenerator, f->strictMode()); + Compiler::RuntimeCodegen cg(scope.engine, &jsGenerator, f->strictMode()); cg.generateFromFunctionExpression(QString(), function, fe, &module); QQmlRefPointer<CompiledData::CompilationUnit> compilationUnit = cg.generateCompilationUnit(); |