restructured control flow tests
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
== t1 ==
|
||||
fun t1() {
|
||||
for (i in 1..2) {
|
||||
doSmth(i)
|
||||
}
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
mark({ for (i in 1..2) { doSmth(i) } })
|
||||
mark(for (i in 1..2) { doSmth(i) })
|
||||
mark(1..2)
|
||||
r(1)
|
||||
r(2)
|
||||
call(.., rangeTo)
|
||||
v(i)
|
||||
w(i)
|
||||
L3:
|
||||
jmp?(L2) NEXT:[read (Unit), mark({ doSmth(i) })]
|
||||
L4 [loop entry point]:
|
||||
L5 [body entry point]:
|
||||
mark({ doSmth(i) }) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
|
||||
mark(doSmth(i))
|
||||
r(i)
|
||||
call(doSmth, doSmth)
|
||||
jmp?(L4 [loop entry point]) NEXT:[mark({ doSmth(i) }), read (Unit)]
|
||||
L2:
|
||||
read (Unit) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== doSmth ==
|
||||
fun doSmth(i: Int) {}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(i: Int)
|
||||
w(i)
|
||||
mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
Reference in New Issue
Block a user