Files
kotlin-fork/compiler/testData/cfg-variables/lexicalScopes/doWhileScope.instructions
T
Svetlana Isakova aa26db0538 Updated tests for control flow: call instruction stores call element
instead of callee expression
2014-07-08 14:57:38 +04:00

39 lines
1.2 KiB
Plaintext

== foo ==
fun foo() {
"before"
do {
var a = 2
} while (a > 0)
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" do { var a = 2 } while (a > 0) "after" })
mark("before")
r("before") -> <v0> USE: in: {} out: {}
3 mark(do { var a = 2 } while (a > 0))
L2 [loop entry point]:
L4 [body entry point]:
mark({ var a = 2 }) INIT: in: {a=ID} out: {a=ID}
v(var a = 2)
r(2) -> <v1>
w(a|<v1>)
L5 [condition entry point]:
r(a) -> <v2>
r(0) -> <v3>
mark(a > 0)
call(a > 0, compareTo|<v2>, <v3>) -> <v4>
jt(L2 [loop entry point]|<v4>) USE: in: {a=READ} out: {a=READ}
L3 [loop exit point]:
read (Unit)
2 mark("after") INIT: in: {} out: {}
r("after") -> <v5>
L1:
1 <END>
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================