diff options
author | Jani Heikkinen <jani.heikkinen@digia.com> | 2014-04-23 12:44:13 +0300 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@digia.com> | 2014-04-23 12:44:14 +0300 |
commit | 7d16c2f40a2995c6bdff3a1999a7cb6100fdf301 (patch) | |
tree | fda2e8a1b363caae655ba1369e54ec0257c7d067 /src/qml/compiler/qv4codegen.cpp | |
parent | aedcd57c84ac9d6b74816c13bdf3fde31e1132b5 (diff) | |
parent | 937fdde5d3b26291d417f856ee05ba479a6ba730 (diff) |
Merge remote-tracking branch 'origin/release' into stable
Change-Id: I1214586499ab2876c8bc55a99367a0c938c8b919
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index d1450f051c..1e067c8a1e 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -2212,8 +2212,6 @@ bool Codegen::visit(ForEachStatement *ast) IR::BasicBlock *foreachbody = _function->newBasicBlock(foreachin, exceptionHandler()); IR::BasicBlock *foreachend = _function->newBasicBlock(groupStartBlock(), exceptionHandler()); - enterLoop(ast, foreachin, foreachend, foreachin); - int objectToIterateOn = _block->newTemp(); move(_block->TEMP(objectToIterateOn), *expression(ast->expression)); IR::ExprList *args = _function->New<IR::ExprList>(); @@ -2222,6 +2220,7 @@ bool Codegen::visit(ForEachStatement *ast) int iterator = _block->newTemp(); move(_block->TEMP(iterator), _block->CALL(_block->NAME(IR::Name::builtin_foreach_iterator_object, 0, 0), args)); + enterLoop(ast, foreachin, foreachend, foreachin); _block->JUMP(foreachin); _block = foreachbody; @@ -2352,8 +2351,6 @@ bool Codegen::visit(LocalForEachStatement *ast) IR::BasicBlock *foreachbody = _function->newBasicBlock(foreachin, exceptionHandler()); IR::BasicBlock *foreachend = _function->newBasicBlock(groupStartBlock(), exceptionHandler()); - enterLoop(ast, foreachin, foreachend, foreachin); - variableDeclaration(ast->declaration); int iterator = _block->newTemp(); @@ -2363,6 +2360,7 @@ bool Codegen::visit(LocalForEachStatement *ast) move(_block->TEMP(iterator), _block->CALL(_block->NAME(IR::Name::builtin_foreach_iterator_object, 0, 0), args)); _block->JUMP(foreachin); + enterLoop(ast, foreachin, foreachend, foreachin); _block = foreachbody; int temp = _block->newTemp(); |