Files
kotlin-fork/compiler/testData/cfg/tailCalls/finally.instructions
T

37 lines
1.4 KiB
Plaintext

== test ==
tailRecursive fun test() : Int {
try {
// do nothing
} finally {
test()
}
}
---------------------
L0:
1 <START>
2 mark({ try { // do nothing } finally { test() } })
mark(try { // do nothing } finally { test() })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ test() }), mark({ // do nothing })]
3 mark({ // do nothing })
read (Unit)
2 jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ test() })]
L2 [onExceptionToFinallyBlock]:
L4 [start finally]:
3 mark({ test() }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
mark(test())
call(test(), test) -> <v0>
L5 [finish finally]:
2 jmp(error) NEXT:[<ERROR>]
L3 [skipFinallyToErrorBlock]:
3 mark({ test() }) PREV:[jmp(L3 [skipFinallyToErrorBlock])]
mark(test())
call(test(), test) -> <v0>
2 merge(try { // do nothing } finally { test() }|!<v1>) -> <v2>
L1:
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[jmp(error)]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================