== foo == fun foo() { outer@while (true) { try { while (true) { continue@outer } } finally { break } } println("OK") } --------------------- L0: 1 2 mark({ outer@while (true) { try { while (true) { continue@outer } } finally { break } } println("OK") }) mark(outer@while (true) { try { while (true) { continue@outer } } finally { break } }) L2 [loop entry point]: L6 [condition entry point]: r(true) -> mark(while (true) { try { while (true) { continue@outer } } finally { break } }) magic[VALUE_CONSUMER](true|) -> L4 [body entry point]: 3 mark({ try { while (true) { continue@outer } } finally { break } }) mark(try { while (true) { continue@outer } } finally { break }) jmp?(L7) NEXT:[mark({ break }), mark({ while (true) { continue@outer } })] 4 mark({ while (true) { continue@outer } }) L8 [loop entry point]: L12 [condition entry point]: r(true) -> mark(while (true) { continue@outer }) magic[VALUE_CONSUMER](true|) -> L10 [body entry point]: 5 mark({ continue@outer }) jmp?(L7) NEXT:[mark({ break }), mark({ break })] L13 [start finally]: 6 mark({ break }) jmp(L3) NEXT:[read (Unit)] L14 [finish finally]: - 5 jmp(L6) NEXT:[r(true) -> ] PREV:[] - 4 jmp(L8) NEXT:[r(true) -> ] PREV:[] L9 [loop exit point]: L11 [body exit point]: - read (Unit) PREV:[] - 3 jmp?(L7) NEXT:[mark({ break }), jmp(L15)] PREV:[] - jmp(L15) NEXT:[mark({ break })] PREV:[] L7 [onExceptionToFinallyBlock]: 6 mark({ break }) PREV:[jmp?(L7), jmp?(L7)] jmp(L3) NEXT:[read (Unit)] - 3 jmp(error) NEXT:[] PREV:[] L15 [skipFinallyToErrorBlock]: - 6 mark({ break }) PREV:[] - jmp(L3) NEXT:[read (Unit)] PREV:[] - 3 merge(try { while (true) { continue@outer } } finally { break }|!) -> PREV:[] - 2 jmp(L2) NEXT:[r(true) -> ] PREV:[] L3 [loop exit point]: L5 [body exit point]: read (Unit) PREV:[jmp(L3), jmp(L3)] mark("OK") r("OK") -> mark(println("OK")) magic[UNRESOLVED_CALL](println("OK")|, !) -> L1: 1 NEXT:[] error: PREV:[] sink: PREV:[, ] ===================== == bar == fun bar(): String { outer@while (true) { try { while (true) { continue@outer } } finally { return "OK" } } } --------------------- L0: 1 2 mark({ outer@while (true) { try { while (true) { continue@outer } } finally { return "OK" } } }) mark(outer@while (true) { try { while (true) { continue@outer } } finally { return "OK" } }) L2 [loop entry point]: L6 [condition entry point]: r(true) -> mark(while (true) { try { while (true) { continue@outer } } finally { return "OK" } }) magic[VALUE_CONSUMER](true|) -> L4 [body entry point]: 3 mark({ try { while (true) { continue@outer } } finally { return "OK" } }) mark(try { while (true) { continue@outer } } finally { return "OK" }) jmp?(L7) NEXT:[mark({ return "OK" }), mark({ while (true) { continue@outer } })] 4 mark({ while (true) { continue@outer } }) L8 [loop entry point]: L12 [condition entry point]: r(true) -> mark(while (true) { continue@outer }) magic[VALUE_CONSUMER](true|) -> L10 [body entry point]: 5 mark({ continue@outer }) jmp?(L7) NEXT:[mark({ return "OK" }), mark({ return "OK" })] L13 [start finally]: 6 mark({ return "OK" }) mark("OK") r("OK") -> ret(*|) L1 NEXT:[] L14 [finish finally]: - 5 jmp(L6) NEXT:[r(true) -> ] PREV:[] - 4 jmp(L8) NEXT:[r(true) -> ] PREV:[] L9 [loop exit point]: L11 [body exit point]: - read (Unit) PREV:[] - 3 jmp?(L7) NEXT:[mark({ return "OK" }), jmp(L15)] PREV:[] - jmp(L15) NEXT:[mark({ return "OK" })] PREV:[] L7 [onExceptionToFinallyBlock]: 6 mark({ return "OK" }) PREV:[jmp?(L7), jmp?(L7)] mark("OK") r("OK") -> ret(*|) L1 NEXT:[] - 3 jmp(error) NEXT:[] PREV:[] L15 [skipFinallyToErrorBlock]: - 6 mark({ return "OK" }) PREV:[] - mark("OK") PREV:[] - r("OK") -> PREV:[] - ret(*|) L1 NEXT:[] PREV:[] - 3 merge(try { while (true) { continue@outer } } finally { return "OK" }|!) -> PREV:[] - 2 jmp(L2) NEXT:[r(true) -> ] PREV:[] L3 [loop exit point]: L5 [body exit point]: - read (Unit) PREV:[] L1: 1 NEXT:[] PREV:[ret(*|) L1, ret(*|) L1] error: PREV:[] sink: PREV:[, ] ===================== == baz == fun baz(): String { outer@while (true) { try { inner@while (true) { continue@inner } } finally { return "OK" } } } --------------------- L0: 1 2 mark({ outer@while (true) { try { inner@while (true) { continue@inner } } finally { return "OK" } } }) mark(outer@while (true) { try { inner@while (true) { continue@inner } } finally { return "OK" } }) L2 [loop entry point]: L6 [condition entry point]: r(true) -> mark(while (true) { try { inner@while (true) { continue@inner } } finally { return "OK" } }) magic[VALUE_CONSUMER](true|) -> L4 [body entry point]: 3 mark({ try { inner@while (true) { continue@inner } } finally { return "OK" } }) mark(try { inner@while (true) { continue@inner } } finally { return "OK" }) jmp?(L7) NEXT:[mark({ return "OK" }), mark({ inner@while (true) { continue@inner } })] 4 mark({ inner@while (true) { continue@inner } }) mark(inner@while (true) { continue@inner }) L8 [loop entry point]: L12 [condition entry point]: r(true) -> PREV:[mark(inner@while (true) { continue@inner }), jmp(L12)] mark(while (true) { continue@inner }) magic[VALUE_CONSUMER](true|) -> L10 [body entry point]: 5 mark({ continue@inner }) jmp(L12) NEXT:[r(true) -> ] - 4 jmp(L8) NEXT:[r(true) -> ] PREV:[] L9 [loop exit point]: L11 [body exit point]: - read (Unit) PREV:[] - 3 jmp?(L7) NEXT:[mark({ return "OK" }), jmp(L13)] PREV:[] - jmp(L13) NEXT:[mark({ return "OK" })] PREV:[] L7 [onExceptionToFinallyBlock]: L14 [start finally]: 4 mark({ return "OK" }) PREV:[jmp?(L7)] mark("OK") r("OK") -> ret(*|) L1 NEXT:[] L15 [finish finally]: - 3 jmp(error) NEXT:[] PREV:[] L13 [skipFinallyToErrorBlock]: L16 [copy of L7, onExceptionToFinallyBlock]: - 4 mark({ return "OK" }) PREV:[] - mark("OK") PREV:[] - r("OK") -> PREV:[] - ret(*|) L1 NEXT:[] PREV:[] - 3 merge(try { inner@while (true) { continue@inner } } finally { return "OK" }|!) -> PREV:[] - 2 jmp(L2) NEXT:[r(true) -> ] PREV:[] L3 [loop exit point]: L5 [body exit point]: - read (Unit) PREV:[] L1: 1 NEXT:[] PREV:[ret(*|) L1] error: PREV:[] sink: PREV:[, ] =====================