== foo == fun foo() { "before" try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 } "after" } --------------------- L0: 1 INIT: in: {} out: {} 2 mark({ "before" try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 } "after" }) mark("before") r("before") -> 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) -> 2 jmp?(L2) jmp?(L3) jmp(L4) L2 [onException]: 3 v(e: Exception) INIT: in: {} out: {} magic[FAKE_INITIALIZER](e: Exception) -> INIT: in: {} out: {} w(e|) INIT: in: {} out: {} 4 mark({ val a = e }) INIT: in: {} out: {} v(val a = e) INIT: in: {} out: {} r(e) -> INIT: in: {} out: {} w(a|) 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) -> INIT: in: {} out: {} w(a|) 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) -> w(a|) 2 merge(try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 }|, !) -> mark("after") r("after") -> L1: 1 error: sink: USE: in: {} out: {} =====================