blob: 5f1f1e645fac303869ae474e9fbf1c6bc9f09786 [file] [log] [blame]
== foo ==
fun foo() {
val b: Boolean
if (1 < 2) {
b = false
}
else {
b = true
}
use(b)
}
---------------------
L0:
1 <START> INIT: in: {} out: {} USE: in: {} out: {}
2 mark({ val b: Boolean if (1 < 2) { b = false } else { b = true } use(b) })
v(val b: Boolean) INIT: in: {} out: {b=D}
mark(if (1 < 2) { b = false } else { b = true }) INIT: in: {b=D} out: {b=D}
r(1) -> <v0>
r(2) -> <v1>
mark(1 < 2)
call(1 < 2, compareTo|<v0>, <v1>) -> <v2>
jf(L2|<v2>)
3 mark({ b = false })
r(false) -> <v3> USE: in: {b=WRITTEN_AFTER_READ} out: {b=WRITTEN_AFTER_READ}
w(b|<v3>) INIT: in: {b=D} out: {b=ID} USE: in: {b=READ} out: {b=WRITTEN_AFTER_READ}
2 jmp(L3) INIT: in: {b=ID} out: {b=ID} USE: in: {b=READ} out: {b=READ}
L2 [else branch]:
3 mark({ b = true }) INIT: in: {b=D} out: {b=D}
r(true) -> <v5> USE: in: {b=WRITTEN_AFTER_READ} out: {b=WRITTEN_AFTER_READ}
w(b|<v5>) INIT: in: {b=D} out: {b=ID} USE: in: {b=READ} out: {b=WRITTEN_AFTER_READ}
L3 ['if' expression result]:
2 merge(if (1 < 2) { b = false } else { b = true }|!<v4>, !<v6>) -> <v7> INIT: in: {b=ID} out: {b=ID} USE: in: {b=READ} out: {b=READ}
r(b) -> <v8> USE: in: {} out: {b=READ}
mark(use(b))
magic[UNRESOLVED_CALL](use(b)|<v8>, !<v9>) -> <v10>
L1:
1 <END> INIT: in: {} out: {}
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================