V4: fix loop block marking for initializer blocks.
authorErik Verbruggen <erik.verbruggen@me.com>
Mon, 11 Nov 2013 13:23:50 +0000 (14:23 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 12 Nov 2013 13:40:22 +0000 (14:40 +0100)
commitff306b7829a6fcf1e1c28c3b0934ecebccd9e67d
tree807e230c1baa2865fb8e2bacdcff30b3c24c2a14
parent24b9d7d1c215bf141bcff75e542ef0b00cd5dd3b
V4: fix loop block marking for initializer blocks.

Any new blocks generated as part of the initializer were incorrectly
marked as belonging to a loop. For example, if a LocalForStatement
would contain a ternary expression, the generated then and else blocks
would be marked. This would confuse the block scheduling, because all
blocks are postponed unil the condition block (“group start”) is
scheduled.

Task-number: QTBUG-33754

Change-Id: I45919ebeac356f015bb91fe0210472b3df0b56d8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/compiler/qv4codegen.cpp
tests/auto/qml/qqmlecmascript/data/qtbug_33754.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp