aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compilerscanfunctions.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-04-03 21:15:18 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-02 14:17:25 +0000
commit9934514db7ec46f1c57d82e54e61c02b35bfd357 (patch)
tree422d1db77b9c65b52e559a38a4cf3e84adc9613c /src/qml/compiler/qv4compilerscanfunctions.cpp
parent851c28d140c398990513640047a20aab36ccc655 (diff)
Split out the generation of indices for locals and registers
Change-Id: I0e98ccba9ae3026cd8bfdc4cae100f280b5aa22c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compilerscanfunctions.cpp')
-rw-r--r--src/qml/compiler/qv4compilerscanfunctions.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4compilerscanfunctions.cpp b/src/qml/compiler/qv4compilerscanfunctions.cpp
index 0feba7bb61..4fa35f3adb 100644
--- a/src/qml/compiler/qv4compilerscanfunctions.cpp
+++ b/src/qml/compiler/qv4compilerscanfunctions.cpp
@@ -502,9 +502,6 @@ void ScanFunctions::calcEscapingVariables()
if (allVarsEscape) {
c->requiresExecutionContext = true;
c->argumentsCanEscape = true;
- for (auto &m : c->members) {
- m.canEscape = true;
- }
}
// ### for now until we have lexically scoped vars that'll require it
if (c->type == ContextType::Global)
@@ -522,13 +519,17 @@ void ScanFunctions::calcEscapingVariables()
c->requiresExecutionContext = true;
}
}
+ if (allVarsEscape) {
+ for (auto &m : c->members)
+ m.canEscape = true;
+ }
}
static const bool showEscapingVars = qEnvironmentVariableIsSet("QV4_SHOW_ESCAPING_VARS");
if (showEscapingVars) {
qDebug() << "==== escaping variables ====";
for (Context *c : qAsConst(m->contextMap)) {
- qDebug() << "Context" << c->name << ":";
+ qDebug() << "Context" << c << c->name << ":";
if (c->argumentsCanEscape)
qDebug() << " Arguments escape";
for (auto it = c->members.constBegin(); it != c->members.constEnd(); ++it) {