Files
kotlin-fork/compiler/testData/cfg/controlStructures/For.instructions
T
2014-03-07 21:08:16 +04:00

52 lines
1.2 KiB
Plaintext

== t1 ==
fun t1() {
for (i in 1..2) {
doSmth(i)
}
}
---------------------
L0:
1 <START>
2 mark({ for (i in 1..2) { doSmth(i) } })
3 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]:
4 mark({ doSmth(i) }) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
mark(doSmth(i))
r(i)
call(doSmth, doSmth)
3 jmp?(L4 [loop entry point]) NEXT:[mark({ doSmth(i) }), read (Unit)]
L2:
read (Unit) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
L1:
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== doSmth ==
fun doSmth(i: Int) {}
---------------------
L0:
1 <START>
v(i: Int)
w(i)
2 mark({})
read (Unit)
L1:
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================