Files
kotlin-fork/compiler/testData/cfg-variables/lexicalScopes/forScope.instructions
T
Denis Zharkov edbf360852 Do not render trivial variables in DataFlow tests
The reason is that while there are optimizations for them
definition of their state is both rather simple and may be
confusing in testData
2017-10-02 10:04:16 +03:00

50 lines
1.6 KiB
Plaintext
Vendored

== foo ==
fun foo() {
"before"
for (i in 1..10) {
val a = i
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" for (i in 1..10) { val a = i } "after" })
mark("before")
r("before") -> <v0>
3 r(1) -> <v1>
r(10) -> <v2>
mark(1..10)
call(1..10, rangeTo|<v1>, <v2>) -> <v3>
mark(1..10)
call(1..10, iterator|<v3>) -> <v4>
v(i) INIT: in: {} out: {}
L2 [loop entry point]:
L6 [condition entry point]:
mark(1..10) INIT: in: {} out: {}
call(1..10, hasNext) -> <v5>
jmp?(L3)
mark(1..10)
call(1..10, next) -> <v6>
magic[LOOP_RANGE_ITERATION](1..10|<v6>) -> <v7>
w(i|<v7>) INIT: in: {} out: {}
mark(for (i in 1..10) { val a = i }) INIT: in: {} out: {}
L4 [body entry point]:
4 mark({ val a = i })
v(val a = i) INIT: in: {} out: {}
r(i) -> <v8> INIT: in: {} out: {}
w(a|<v8>) INIT: in: {} out: {}
3 jmp(L2) INIT: in: {} out: {}
L3 [loop exit point]:
L5 [body exit point]:
read (Unit)
2 mark("after")
r("after") -> <v9>
L1:
1 <END>
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================