handle generic conditions is for loops
commit9f352e76f7f6a614786e1200d0d2c35a256b359b
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 30 May 2012 15:43:02 +0000 (30 17:43 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 3 Jun 2012 11:56:48 +0000 (3 13:56 +0200)
tree89de4704e0a593e00e123cdca49d08b0d91288c8
parent9bcd35ae5879e353cd661a6868dec49ddbefb172
handle generic conditions is for loops

They are handled in essentially the same way as while loops,
except that we need to take into account the loop iterator on the for loop.

Because we don't know in advance if we are going to need a separate
statement to evaluate the loop condition, we may need to make room
for such a statement even when we turn out not to need it.
This commit may therefore also affect the statement numbers
in some cases.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
14 files changed:
scan.cc
tests/dynamic_bound.scop
tests/for_while.c [new file with mode: 0644]
tests/for_while.scop [new file with mode: 0644]
tests/for_while_dec.c [new file with mode: 0644]
tests/for_while_dec.scop [new file with mode: 0644]
tests/for_while_inc.c [new file with mode: 0644]
tests/for_while_inc.scop [new file with mode: 0644]
tests/for_while_overflow.c [new file with mode: 0644]
tests/for_while_overflow.scop [new file with mode: 0644]
tests/for_while_unsigned.c [new file with mode: 0644]
tests/for_while_unsigned.scop [new file with mode: 0644]
tests/for_while_unsigned2.c [new file with mode: 0644]
tests/for_while_unsigned2.scop [new file with mode: 0644]