blob: ac9e198e8b670f9573d37428539307b4a81b5a20 [file]
== foo ==
fun foo() {
"before"
try {
foo()
}
catch (e: Exception) {
val a = e
}
finally {
val a = 1
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 } "after" })
mark("before")
r("before") -> <v0>
mark(try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 })
jmp?(L2)
jmp?(L3)
3 mark({ foo() })
mark(foo())
call(foo(), foo) -> <v1>
2 jmp?(L2)
jmp?(L3)
jmp(L4)
L2 [onException]:
3 v(e: Exception) INIT: in: {} out: {}
magic[FAKE_INITIALIZER](e: Exception) -> <v2> INIT: in: {} out: {}
w(e|<v2>) INIT: in: {} out: {}
4 mark({ val a = e }) INIT: in: {} out: {}
v(val a = e) INIT: in: {} out: {}
r(e) -> <v3> INIT: in: {} out: {}
w(a|<v3>) INIT: in: {} out: {}
3 jmp(L4) INIT: in: {} out: {}
L4 [afterCatches]:
2 jmp(L5)
L3 [onExceptionToFinallyBlock]:
L6 [start finally]:
3 mark({ val a = 1 })
v(val a = 1) INIT: in: {} out: {}
r(1) -> <v4> INIT: in: {} out: {}
w(a|<v4>) INIT: in: {} out: {}
L7 [finish finally]:
2 jmp(error) INIT: in: {} out: {}
L5 [skipFinallyToErrorBlock]:
L8 [copy of L3, onExceptionToFinallyBlock]:
3 mark({ val a = 1 })
v(val a = 1)
r(1) -> <v4>
w(a|<v4>)
2 merge(try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 }|<v1>, !<v5>) -> <v6>
mark("after")
r("after") -> <v7>
L1:
1 <END>
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================