Files
kotlin-fork/compiler/testData/cfg-variables/lexicalScopes/doWhileScope.instructions
T
Svetlana Isakova 35c6a656c9 Store only data for variables declared in current lexical scope.
Remove data for other variables (when leaving a scope).
2014-03-07 21:08:17 +04:00

39 lines
1.1 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") 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)
w(a)
L5 [condition entry point]:
mark(a > 0)
r(a)
r(0)
call(>, compareTo)
jt(L2 [loop entry point]) USE: in: {a=READ} out: {a=READ}
L3 [loop exit point]:
read (Unit)
2 mark("after") INIT: in: {} out: {}
r("after")
L1:
1 <END>
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================