Files
kotlin-fork/compiler/testData/cfg-variables/lexicalScopes/whileScope.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

34 lines
954 B
Plaintext

== foo ==
fun foo() {
"before"
while (true) {
val a: Int
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" while (true) { val a: Int } "after" })
mark("before")
r("before")
mark(while (true) { val a: Int })
L2 [loop entry point]:
L5 [condition entry point]:
r(true)
L4 [body entry point]:
3 mark({ val a: Int })
v(val a: Int) INIT: in: {} out: {a=D}
2 jmp(L2 [loop entry point]) INIT: in: {} out: {} USE: in: {} out: {}
L3 [loop exit point]:
- read (Unit)
- mark("after")
- r("after")
L1:
1 <END> INIT: in: {} out: {}
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================