edbf360852
The reason is that while there are optimizations for them definition of their state is both rather simple and may be confusing in testData
87 lines
5.0 KiB
Plaintext
Vendored
87 lines
5.0 KiB
Plaintext
Vendored
== foo ==
|
|
fun foo(numbers: Collection<Int>) {
|
|
for (i in numbers) {
|
|
val b: Boolean
|
|
if (1 < 2) {
|
|
b = false
|
|
}
|
|
else {
|
|
b = true
|
|
}
|
|
use(b)
|
|
continue
|
|
}
|
|
}
|
|
---------------------
|
|
L0:
|
|
1 <START> INIT: in: {} out: {}
|
|
v(numbers: Collection<Int>) INIT: in: {} out: {}
|
|
magic[FAKE_INITIALIZER](numbers: Collection<Int>) -> <v0> INIT: in: {} out: {}
|
|
w(numbers|<v0>) INIT: in: {} out: {}
|
|
2 mark({ for (i in numbers) { val b: Boolean if (1 < 2) { b = false } else { b = true } use(b) continue } }) INIT: in: {} out: {}
|
|
3 r(numbers) -> <v1>
|
|
mark(numbers)
|
|
call(numbers, iterator|<v1>) -> <v2>
|
|
v(i) INIT: in: {} out: {}
|
|
L2 [loop entry point]:
|
|
L6 [condition entry point]:
|
|
mark(numbers) INIT: in: {} out: {}
|
|
call(numbers, hasNext) -> <v3>
|
|
jmp?(L3)
|
|
mark(numbers)
|
|
call(numbers, next) -> <v4>
|
|
magic[LOOP_RANGE_ITERATION](numbers|<v4>) -> <v5>
|
|
w(i|<v5>) INIT: in: {} out: {}
|
|
mark(for (i in numbers) { val b: Boolean if (1 < 2) { b = false } else { b = true } use(b) continue }) INIT: in: {} out: {} USE: in: {} out: {}
|
|
L4 [body entry point]:
|
|
4 mark({ val b: Boolean if (1 < 2) { b = false } else { b = true } use(b) continue })
|
|
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) -> <v6>
|
|
r(2) -> <v7>
|
|
mark(1 < 2)
|
|
call(1 < 2, compareTo|<v6>, <v7>) -> <v8>
|
|
jf(L7|<v8>)
|
|
5 mark({ b = false })
|
|
r(false) -> <v9> USE: in: {b=WRITTEN_AFTER_READ} out: {b=WRITTEN_AFTER_READ}
|
|
w(b|<v9>) INIT: in: {b=D} out: {b=ID} USE: in: {b=READ} out: {b=WRITTEN_AFTER_READ}
|
|
4 jmp(L8) INIT: in: {b=ID} out: {b=ID} USE: in: {b=READ} out: {b=READ}
|
|
L7 [else branch]:
|
|
5 mark({ b = true }) INIT: in: {b=D} out: {b=D}
|
|
r(true) -> <v11> USE: in: {b=WRITTEN_AFTER_READ} out: {b=WRITTEN_AFTER_READ}
|
|
w(b|<v11>) INIT: in: {b=D} out: {b=ID} USE: in: {b=READ} out: {b=WRITTEN_AFTER_READ}
|
|
L8 ['if' expression result]:
|
|
4 merge(if (1 < 2) { b = false } else { b = true }|!<v10>, !<v12>) -> <v13> INIT: in: {b=ID} out: {b=ID} USE: in: {b=READ} out: {b=READ}
|
|
r(b) -> <v14> USE: in: {} out: {b=READ}
|
|
mark(use(b))
|
|
call(use(b), use|<v14>) -> <v15>
|
|
jmp(L6) USE: in: {} out: {}
|
|
- 3 jmp(L2)
|
|
L3 [loop exit point]:
|
|
L5 [body exit point]:
|
|
read (Unit) INIT: in: {} out: {}
|
|
L1:
|
|
1 <END>
|
|
error:
|
|
<ERROR>
|
|
sink:
|
|
<SINK> USE: in: {} out: {}
|
|
=====================
|
|
== use ==
|
|
fun use(vararg a: Any?) = a
|
|
---------------------
|
|
L0:
|
|
1 <START> INIT: in: {} out: {}
|
|
v(vararg a: Any?) INIT: in: {} out: {}
|
|
magic[FAKE_INITIALIZER](vararg a: Any?) -> <v0> INIT: in: {} out: {}
|
|
w(a|<v0>) INIT: in: {} out: {}
|
|
r(a) -> <v1> INIT: in: {} out: {}
|
|
ret(*|<v1>) L1
|
|
L1:
|
|
<END>
|
|
error:
|
|
<ERROR>
|
|
sink:
|
|
<SINK> USE: in: {} out: {}
|
|
=====================
|