aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-03-01 10:42:47 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2017-03-07 10:54:46 +0000
commitd5d12e1d6fb9aaa5a8cee7924555f0d4d19ffabc (patch)
tree13ce80ffc0c46c1255a9994489262b3ff925e059 /src/qml/compiler/qv4codegen.cpp
parent7fe0d1a06830518e8ce6752e45a0a01b1b97fa73 (diff)
Set source location for all loop body-to-front jumps
Task-number: QTBUG-59204 Change-Id: Id1a73b228cd3386c7fcc7712c2485f387238b65e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 819f4615f2..2c1b5c57cc 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -2256,7 +2256,7 @@ bool Codegen::visit(DoWhileStatement *ast)
_block = loopbody;
statement(ast->statement);
- _block->JUMP(loopcond);
+ setLocation(_block->JUMP(loopcond), ast->statement->lastSourceLocation());
_block = loopcond;
condition(ast->expression, loopbody, loopend);
@@ -2321,7 +2321,7 @@ bool Codegen::visit(ForEachStatement *ast)
return false;
move(*init, _block->TEMP(temp));
statement(ast->statement);
- _block->JUMP(foreachin);
+ setLocation(_block->JUMP(foreachin), ast->lastSourceLocation());
_block = foreachin;
@@ -2360,7 +2360,7 @@ bool Codegen::visit(ForStatement *ast)
_block = forbody;
statement(ast->statement);
- _block->JUMP(forstep);
+ setLocation(_block->JUMP(forstep), ast->lastSourceLocation());
_block = forstep;
statement(ast->expression);
@@ -2460,7 +2460,7 @@ bool Codegen::visit(LocalForEachStatement *ast)
int temp = _block->newTemp();
move(identifier(ast->declaration->name.toString()), _block->TEMP(temp));
statement(ast->statement);
- _block->JUMP(foreachin);
+ setLocation(_block->JUMP(foreachin), ast->lastSourceLocation());
_block = foreachin;
@@ -2800,7 +2800,7 @@ bool Codegen::visit(WhileStatement *ast)
_block = whilebody;
statement(ast->statement);
- _block->JUMP(whilecond);
+ setLocation(_block->JUMP(whilecond), ast->lastSourceLocation());
_block = whileend;
leaveLoop();