== test == fun test() { do { val s: String s = "" } while (s == "") } --------------------- L0: 1 INIT: in: {} out: {} 2 mark({ do { val s: String s = "" } while (s == "") }) USE: in: {} out: {} 3 mark(do { val s: String s = "" } while (s == "")) L2 [loop entry point]: L4 [body entry point]: mark({ val s: String s = "" }) v(val s: String) INIT: in: {} out: {s=D} mark("") INIT: in: {s=D} out: {s=D} r("") -> USE: in: {s=WRITTEN_AFTER_READ} out: {s=WRITTEN_AFTER_READ} w(s|) INIT: in: {s=D} out: {s=ID} USE: in: {s=READ} out: {s=WRITTEN_AFTER_READ} L5 [body exit point]: L6 [condition entry point]: r(s) -> INIT: in: {s=ID} out: {s=ID} USE: in: {} out: {s=READ} mark("") r("") -> mark(s == "") call(s == "", equals|, ) -> 2 jt(L2|) INIT: in: {} out: {} L3 [loop exit point]: read (Unit) L1: 1 error: sink: USE: in: {} out: {} ===================== == test2 == fun test2() { while (true) { val s: String s = "" if (s != "") break } } --------------------- L0: 1 INIT: in: {} out: {} 2 mark({ while (true) { val s: String s = "" if (s != "") break } }) L2 [loop entry point]: L6 [condition entry point]: r(true) -> mark(while (true) { val s: String s = "" if (s != "") break }) magic[VALUE_CONSUMER](true|) -> USE: in: {} out: {} L4 [body entry point]: 3 mark({ val s: String s = "" if (s != "") break }) v(val s: String) INIT: in: {} out: {s=D} mark("") INIT: in: {s=D} out: {s=D} r("") -> USE: in: {s=WRITTEN_AFTER_READ} out: {s=WRITTEN_AFTER_READ} w(s|) INIT: in: {s=D} out: {s=ID} USE: in: {s=READ} out: {s=WRITTEN_AFTER_READ} mark(if (s != "") break) INIT: in: {s=ID} out: {s=ID} USE: in: {s=READ} out: {s=READ} r(s) -> USE: in: {} out: {s=READ} mark("") r("") -> mark(s != "") call(s != "", equals|, ) -> jf(L7|) jmp(L3) USE: in: {} out: {} - jmp(L8) L7 [else branch]: read (Unit) INIT: in: {s=ID} out: {s=ID} L8 ['if' expression result]: merge(if (s != "") break|!) -> 2 jmp(L2) INIT: in: {} out: {} L3 [loop exit point]: L5 [body exit point]: read (Unit) L1: 1 error: sink: USE: in: {} out: {} =====================