diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-06-29 15:31:13 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-06-30 07:48:51 +0000 |
commit | 6fdf0390311278d571bb4c851baa1e3a0ef550ec (patch) | |
tree | ec5935880b84055f8ed9d92e6f7494c2b7d731b6 /src/qml/compiler/qqmlirbuilder.cpp | |
parent | 65c8e3bed73dd903e808270136b2330928bba126 (diff) |
Rename Codegen::Environment to Context and pull it out of Codegen
Part of refactoring and streamlining this code base.
Change-Id: I324d35d1f0a74c5908b40243ffa2b247ce924304
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlirbuilder.cpp')
-rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index d03e2ad539..40439a323e 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -1587,8 +1587,8 @@ QVector<int> JSCodeGen::generateJSCodeForFunctionsAndBindings(const QList<Compil { QVector<int> runtimeFunctionIndices(functions.size()); - ScanFunctions scan(this, sourceCode, GlobalCode); - scan.enterEnvironment(0, QmlBinding); + ScanFunctions scan(this, sourceCode, QQmlJS::GlobalCode); + scan.enterEnvironment(0, QQmlJS::QmlBinding); scan.enterQmlScope(qmlRoot, QStringLiteral("context scope")); for (const CompiledFunctionOrExpression &f : functions) { Q_ASSERT(f.node != qmlRoot); @@ -1597,7 +1597,7 @@ QVector<int> JSCodeGen::generateJSCodeForFunctionsAndBindings(const QList<Compil if (function) scan.enterQmlFunction(function); else - scan.enterEnvironment(f.node, QmlBinding); + scan.enterEnvironment(f.node, QQmlJS::QmlBinding); scan(function ? function->body : f.node); scan.leaveEnvironment(); @@ -1605,7 +1605,7 @@ QVector<int> JSCodeGen::generateJSCodeForFunctionsAndBindings(const QList<Compil scan.leaveEnvironment(); scan.leaveEnvironment(); - _variableEnvironment = 0; + _context = 0; _function = _module->functions.at(defineFunction(QStringLiteral("context scope"), qmlRoot, 0, 0)); for (int i = 0; i < functions.count(); ++i) { @@ -1648,8 +1648,8 @@ QVector<int> JSCodeGen::generateJSCodeForFunctionsAndBindings(const QList<Compil runtimeFunctionIndices[i] = idx; } - qDeleteAll(_envMap); - _envMap.clear(); + qDeleteAll(_contextMap); + _contextMap.clear(); return runtimeFunctionIndices; } |