summaryrefslogtreecommitdiff
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 09f08e8bf2..c90787acc8 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -3435,8 +3435,6 @@ bool Codegen::visit(SwitchStatement *ast)
RegisterScope scope(this);
if (ast->block) {
- ControlFlowBlock controlFlow(this, ast->block);
-
BytecodeGenerator::Label switchEnd = bytecodeGenerator->newLabel();
Reference lhs = expression(ast->expression);
@@ -3444,6 +3442,8 @@ bool Codegen::visit(SwitchStatement *ast)
return false;
lhs = lhs.storeOnStack();
+ ControlFlowBlock controlFlow(this, ast->block);
+
// set up labels for all clauses
QHash<Node *, BytecodeGenerator::Label> blockMap;
for (CaseClauses *it = ast->block->clauses; it; it = it->next)