Files
kotlin-fork/compiler/testData/cfg/For.instructions
T
2012-12-18 16:00:27 +04:00

51 lines
2.3 KiB
Plaintext

== t1 ==
fun t1() {
for (i in 1..2) {
doSmth(i)
}
}
---------------------
L0:
<START> NEXT:[r(for (i in 1..2) { doSmth(i..)] PREV:[]
r(for (i in 1..2) {
doSmth(i)
}) NEXT:[r(1)] PREV:[<START>]
r(1) NEXT:[r(2)] PREV:[r(for (i in 1..2) { doSmth(i..)]
r(2) NEXT:[r(..)] PREV:[r(1)]
r(..) NEXT:[r(1..2)] PREV:[r(2)]
r(1..2) NEXT:[v(i)] PREV:[r(..)]
v(i) NEXT:[w(i)] PREV:[r(1..2)]
w(i) NEXT:[jmp?(L2)] PREV:[v(i)]
L3:
jmp?(L2) NEXT:[read (Unit), r(i)] PREV:[w(i)]
L4 [loop entry point]:
L5 [body entry point]:
r(i) NEXT:[r(doSmth)] PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
r(doSmth) NEXT:[r(doSmth(i))] PREV:[r(i)]
r(doSmth(i)) NEXT:[jmp?(L4 [loop entry point])] PREV:[r(doSmth)]
jmp?(L4 [loop entry point]) NEXT:[r(i), read (Unit)] PREV:[r(doSmth(i))]
L2:
read (Unit) NEXT:[<END>] PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== doSmth ==
fun doSmth(i: Int) {}
---------------------
L0:
<START> NEXT:[v(i: Int)] PREV:[]
v(i: Int) NEXT:[w(i)] PREV:[<START>]
w(i) NEXT:[read (Unit)] PREV:[v(i: Int)]
read (Unit) NEXT:[<END>] PREV:[w(i)]
L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================