diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetControlFlowInstructionsGenerator.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetControlFlowInstructionsGenerator.java index cbcc08d80f5..0abe6c282cb 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetControlFlowInstructionsGenerator.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetControlFlowInstructionsGenerator.java @@ -103,13 +103,13 @@ public class JetControlFlowInstructionsGenerator extends JetControlFlowBuilderAd @NotNull @Override public final Label createUnboundLabel() { - return pseudocode.createLabel("l" + labelCount++); + return pseudocode.createLabel("L" + labelCount++); } @NotNull @Override public Label createUnboundLabel(@NotNull String name) { - return pseudocode.createLabel("l" + labelCount++ + " [" + name + "]"); + return pseudocode.createLabel("L" + labelCount++ + " [" + name + "]"); } @Override diff --git a/compiler/testData/cfg/AnonymousInitializers.instructions b/compiler/testData/cfg/AnonymousInitializers.instructions index d513fda9296..44774306bc1 100644 --- a/compiler/testData/cfg/AnonymousInitializers.instructions +++ b/compiler/testData/cfg/AnonymousInitializers.instructions @@ -15,7 +15,7 @@ class AnonymousInitializers() { } } --------------------- -l0: +L0: NEXT:[v(val k = 34)] PREV:[] v(val k = 34) NEXT:[r(34)] PREV:[] r(34) NEXT:[w(k)] PREV:[v(val k = 34)] @@ -24,22 +24,22 @@ l0: r(12) NEXT:[w($i)] PREV:[v(val i: Int)] w($i) NEXT:[v(val j: Int get() = 20) ] PREV:[r(12)] v(val j: Int - get() = 20) NEXT:[jmp?(l2)] PREV:[w($i)] - jmp?(l2) NEXT:[r(13), d(get() = 20)] PREV:[v(val j: Int get() = 20) ] - d(get() = 20) NEXT:[] PREV:[jmp?(l2)] -l2: - r(13) NEXT:[w($i)] PREV:[jmp?(l2)] + get() = 20) NEXT:[jmp?(L2)] PREV:[w($i)] + jmp?(L2) NEXT:[r(13), d(get() = 20)] PREV:[v(val j: Int get() = 20) ] + d(get() = 20) NEXT:[] PREV:[jmp?(L2)] +L2: + r(13) NEXT:[w($i)] PREV:[jmp?(L2)] w($i) NEXT:[] PREV:[r(13)] -l1: +L1: NEXT:[] PREV:[w($i)] error: NEXT:[] PREV:[] sink: NEXT:[] PREV:[, , d(get() = 20)] -l3: +L3: NEXT:[r(20)] PREV:[] r(20) NEXT:[] PREV:[] -l4: +L4: NEXT:[] PREV:[r(20)] error: NEXT:[] PREV:[] @@ -49,10 +49,10 @@ sink: == get_j == get() = 20 --------------------- -l3: +L3: NEXT:[r(20)] PREV:[] r(20) NEXT:[] PREV:[] -l4: +L4: NEXT:[] PREV:[r(20)] error: NEXT:[] PREV:[] diff --git a/compiler/testData/cfg/ArrayAccess.instructions b/compiler/testData/cfg/ArrayAccess.instructions index 1e0e143d1de..188c36430ab 100644 --- a/compiler/testData/cfg/ArrayAccess.instructions +++ b/compiler/testData/cfg/ArrayAccess.instructions @@ -9,7 +9,7 @@ fun foo() { a[10] += 1 } --------------------- -l0: +L0: NEXT:[v(val a = Array)] PREV:[] v(val a = Array) NEXT:[r(Array)] PREV:[] r(Array) NEXT:[r(Array)] PREV:[v(val a = Array)] @@ -32,7 +32,7 @@ l0: r(1) NEXT:[r(+=)] PREV:[r(a[10])] r(+=) NEXT:[w(a[10])] PREV:[r(1)] w(a[10]) NEXT:[] PREV:[r(+=)] -l1: +L1: NEXT:[] PREV:[w(a[10])] error: NEXT:[] PREV:[] diff --git a/compiler/testData/cfg/Assignments.instructions b/compiler/testData/cfg/Assignments.instructions index dc70c8556fb..4123c49d123 100644 --- a/compiler/testData/cfg/Assignments.instructions +++ b/compiler/testData/cfg/Assignments.instructions @@ -3,10 +3,10 @@ class Test { var x : Int; } --------------------- -l0: +L0: NEXT:[v(var x : Int;)] PREV:[] v(var x : Int;) NEXT:[] PREV:[] -l1: +L1: NEXT:[] PREV:[v(var x : Int;)] error: NEXT:[] PREV:[] @@ -28,7 +28,7 @@ fun assignments() : Unit { t.x = 1 } --------------------- -l0: +L0: NEXT:[v(var x = 1)] PREV:[] v(var x = 1) NEXT:[r(1)] PREV:[] r(1) NEXT:[w(x)] PREV:[v(var x = 1)] @@ -39,27 +39,27 @@ l0: r(2) NEXT:[r(+=)] PREV:[r(x)] r(+=) NEXT:[w(x)] PREV:[r(2)] w(x) NEXT:[r(true)] PREV:[r(+=)] - r(true) NEXT:[jf(l2)] PREV:[w(x)] - jf(l2) NEXT:[r(2), r(1)] PREV:[r(true)] - r(1) NEXT:[jmp(l3)] PREV:[jf(l2)] - jmp(l3) NEXT:[w(x)] PREV:[r(1)] -l2: - r(2) NEXT:[w(x)] PREV:[jf(l2)] -l3: - w(x) NEXT:[v(val y = true && false)] PREV:[jmp(l3), r(2)] + r(true) NEXT:[jf(L2)] PREV:[w(x)] + jf(L2) NEXT:[r(2), r(1)] PREV:[r(true)] + r(1) NEXT:[jmp(L3)] PREV:[jf(L2)] + jmp(L3) NEXT:[w(x)] PREV:[r(1)] +L2: + r(2) NEXT:[w(x)] PREV:[jf(L2)] +L3: + w(x) NEXT:[v(val y = true && false)] PREV:[jmp(L3), r(2)] v(val y = true && false) NEXT:[r(true)] PREV:[w(x)] - r(true) NEXT:[jf(l4)] PREV:[v(val y = true && false)] - jf(l4) NEXT:[r(true && false), r(false)] PREV:[r(true)] - r(false) NEXT:[r(true && false)] PREV:[jf(l4)] -l4: - r(true && false) NEXT:[w(y)] PREV:[jf(l4), r(false)] + r(true) NEXT:[jf(L4)] PREV:[v(val y = true && false)] + jf(L4) NEXT:[r(true && false), r(false)] PREV:[r(true)] + r(false) NEXT:[r(true && false)] PREV:[jf(L4)] +L4: + r(true && false) NEXT:[w(y)] PREV:[jf(L4), r(false)] w(y) NEXT:[v(val z = false && true)] PREV:[r(true && false)] v(val z = false && true) NEXT:[r(false)] PREV:[w(y)] - r(false) NEXT:[jf(l5)] PREV:[v(val z = false && true)] - jf(l5) NEXT:[r(false && true), r(true)] PREV:[r(false)] - r(true) NEXT:[r(false && true)] PREV:[jf(l5)] -l5: - r(false && true) NEXT:[w(z)] PREV:[jf(l5), r(true)] + r(false) NEXT:[jf(L5)] PREV:[v(val z = false && true)] + jf(L5) NEXT:[r(false && true), r(true)] PREV:[r(false)] + r(true) NEXT:[r(false && true)] PREV:[jf(L5)] +L5: + r(false && true) NEXT:[w(z)] PREV:[jf(L5), r(true)] w(z) NEXT:[v(val t = Test())] PREV:[r(false && true)] v(val t = Test()) NEXT:[r(Test)] PREV:[w(z)] r(Test) NEXT:[r(Test())] PREV:[v(val t = Test())] @@ -69,7 +69,7 @@ l5: r(t) NEXT:[r(=)] PREV:[r(1)] r(=) NEXT:[w(t.x)] PREV:[r(t)] w(t.x) NEXT:[] PREV:[r(=)] -l1: +L1: NEXT:[] PREV:[w(t.x)] error: NEXT:[] PREV:[] diff --git a/compiler/testData/cfg/Basic.instructions b/compiler/testData/cfg/Basic.instructions index a3ddadb3a30..54fb20d1cc2 100644 --- a/compiler/testData/cfg/Basic.instructions +++ b/compiler/testData/cfg/Basic.instructions @@ -17,7 +17,7 @@ fun f(a : Boolean) : Unit { } --------------------- -l0: +L0: NEXT:[v(a : Boolean)] PREV:[] v(a : Boolean) NEXT:[w(a)] PREV:[] w(a) NEXT:[r(1)] PREV:[v(a : Boolean)] @@ -32,11 +32,11 @@ l0: r(foo) NEXT:[r(foo(a, 3))] PREV:[r(3)] r(foo(a, 3)) NEXT:[r(genfun)] PREV:[r(foo)] r(genfun) NEXT:[r(genfun())] PREV:[r(foo(a, 3))] - r(genfun()) NEXT:[jmp?(l2)] PREV:[r(genfun)] - jmp?(l2) NEXT:[r({1}), d({1})] PREV:[r(genfun())] - d({1}) NEXT:[] PREV:[jmp?(l2)] -l2: - r({1}) NEXT:[r(flfun)] PREV:[jmp?(l2)] + r(genfun()) NEXT:[jmp?(L2)] PREV:[r(genfun)] + jmp?(L2) NEXT:[r({1}), d({1})] PREV:[r(genfun())] + d({1}) NEXT:[] PREV:[jmp?(L2)] +L2: + r({1}) NEXT:[r(flfun)] PREV:[jmp?(L2)] r(flfun) NEXT:[r(flfun {1})] PREV:[r({1})] r(flfun {1}) NEXT:[r(3)] PREV:[r(flfun)] r(3) NEXT:[r(4)] PREV:[r(flfun {1})] @@ -52,26 +52,26 @@ l2: r(2) NEXT:[r(+)] PREV:[r(1)] r(+) NEXT:[r(1 + 2)] PREV:[r(2)] r(1 + 2) NEXT:[r(a)] PREV:[r(+)] - r(a) NEXT:[jf(l5)] PREV:[r(1 + 2)] - jf(l5) NEXT:[r(a && true), r(true)] PREV:[r(a)] - r(true) NEXT:[r(a && true)] PREV:[jf(l5)] -l5: - r(a && true) NEXT:[r(a)] PREV:[jf(l5), r(true)] - r(a) NEXT:[jt(l6)] PREV:[r(a && true)] - jt(l6) NEXT:[r(false), r(a || false)] PREV:[r(a)] - r(false) NEXT:[r(a || false)] PREV:[jt(l6)] -l6: - r(a || false) NEXT:[] PREV:[jt(l6), r(false)] -l1: + r(a) NEXT:[jf(L5)] PREV:[r(1 + 2)] + jf(L5) NEXT:[r(a && true), r(true)] PREV:[r(a)] + r(true) NEXT:[r(a && true)] PREV:[jf(L5)] +L5: + r(a && true) NEXT:[r(a)] PREV:[jf(L5), r(true)] + r(a) NEXT:[jt(L6)] PREV:[r(a && true)] + jt(L6) NEXT:[r(false), r(a || false)] PREV:[r(a)] + r(false) NEXT:[r(a || false)] PREV:[jt(L6)] +L6: + r(a || false) NEXT:[] PREV:[jt(L6), r(false)] +L1: NEXT:[] PREV:[r(a || false)] error: NEXT:[] PREV:[] sink: NEXT:[] PREV:[, , d({1})] -l3: +L3: NEXT:[r(1)] PREV:[] r(1) NEXT:[] PREV:[] -l4: +L4: NEXT:[] PREV:[r(1)] error: NEXT:[] PREV:[] @@ -81,10 +81,10 @@ sink: == anonymous_0 == {1} --------------------- -l3: +L3: NEXT:[r(1)] PREV:[] r(1) NEXT:[] PREV:[] -l4: +L4: NEXT:[] PREV:[r(1)] error: NEXT:[] PREV:[] @@ -94,14 +94,14 @@ sink: == foo == fun foo(a : Boolean, b : Int) : Unit {} --------------------- -l0: +L0: NEXT:[v(a : Boolean)] PREV:[] v(a : Boolean) NEXT:[w(a)] PREV:[] w(a) NEXT:[v(b : Int)] PREV:[v(a : Boolean)] v(b : Int) NEXT:[w(b)] PREV:[w(a)] w(b) NEXT:[read (Unit)] PREV:[v(b : Int)] read (Unit) NEXT:[] PREV:[w(b)] -l1: +L1: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[] @@ -111,10 +111,10 @@ sink: == genfun == fun genfun() : Unit {} --------------------- -l0: +L0: NEXT:[read (Unit)] PREV:[] read (Unit) NEXT:[] PREV:[] -l1: +L1: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[] @@ -124,12 +124,12 @@ sink: == flfun == fun flfun(f : () -> Any) : Unit {} --------------------- -l0: +L0: NEXT:[v(f : () -> Any)] PREV:[] v(f : () -> Any) NEXT:[w(f)] PREV:[] w(f) NEXT:[read (Unit)] PREV:[v(f : () -> Any)] read (Unit) NEXT:[] PREV:[w(f)] -l1: +L1: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[] diff --git a/compiler/testData/cfg/DeadCode.instructions b/compiler/testData/cfg/DeadCode.instructions index ebfde2fc5c1..bd6401227c4 100644 --- a/compiler/testData/cfg/DeadCode.instructions +++ b/compiler/testData/cfg/DeadCode.instructions @@ -4,14 +4,14 @@ fun test() { test() } --------------------- -l0: +L0: NEXT:[r(Exception)] PREV:[] r(Exception) NEXT:[r(Exception())] PREV:[] r(Exception()) NEXT:[throw (throw Exception())] PREV:[r(Exception)] throw (throw Exception()) NEXT:[] PREV:[r(Exception())] - r(test) NEXT:[r(test())] PREV:[] - r(test()) NEXT:[] PREV:[] -l1: +L1: NEXT:[] PREV:[] error: NEXT:[] PREV:[throw (throw Exception())] diff --git a/compiler/testData/cfg/EmptyFunction.instructions b/compiler/testData/cfg/EmptyFunction.instructions index 054789e37c6..06faa1a0195 100644 --- a/compiler/testData/cfg/EmptyFunction.instructions +++ b/compiler/testData/cfg/EmptyFunction.instructions @@ -1,10 +1,10 @@ == empty == fun empty() {} --------------------- -l0: +L0: NEXT:[read (Unit)] PREV:[] read (Unit) NEXT:[] PREV:[] -l1: +L1: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[] diff --git a/compiler/testData/cfg/FailFunction.instructions b/compiler/testData/cfg/FailFunction.instructions index edb14876dc1..fee3cb54eda 100644 --- a/compiler/testData/cfg/FailFunction.instructions +++ b/compiler/testData/cfg/FailFunction.instructions @@ -3,7 +3,7 @@ fun fail() : Nothing { throw java.lang.RuntimeException() } --------------------- -l0: +L0: NEXT:[r(java)] PREV:[] r(java) NEXT:[r(lang)] PREV:[] r(lang) NEXT:[r(java.lang)] PREV:[r(java)] @@ -12,7 +12,7 @@ l0: r(RuntimeException()) NEXT:[r(java.lang.RuntimeException())] PREV:[r(RuntimeException)] r(java.lang.RuntimeException()) NEXT:[throw (throw java.lang.RuntimeException())] PREV:[r(RuntimeException())] throw (throw java.lang.RuntimeException()) NEXT:[] PREV:[r(java.lang.RuntimeException())] -l1: +L1: NEXT:[] PREV:[] error: NEXT:[] PREV:[throw (throw java.lang.RuntimeException())] diff --git a/compiler/testData/cfg/Finally.instructions b/compiler/testData/cfg/Finally.instructions index 95084d29498..6f6e2094732 100644 --- a/compiler/testData/cfg/Finally.instructions +++ b/compiler/testData/cfg/Finally.instructions @@ -7,26 +7,26 @@ fun t1() { } } --------------------- -l0: +L0: NEXT:[r(try { 1 } finally { 2 }) ] PREV:[] r(try { 1 } finally { 2 - }) NEXT:[jmp?(l2 [onExceptionToFinallyBlock])] PREV:[] - jmp?(l2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 } finally { 2 }) ] - r(1) NEXT:[jmp(l3 [skipFinallyToErrorBlock])] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] + }) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[] + jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 } finally { 2 }) ] + r(1) NEXT:[jmp(L3 [skipFinallyToErrorBlock])] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] d0: - jmp(l3 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r(1)] -l2 [onExceptionToFinallyBlock]: -l4 [start finally]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] -l5 [finish finally]: + jmp(L3 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r(1)] +L2 [onExceptionToFinallyBlock]: +L4 [start finally]: + r(2) NEXT:[jmp(error)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] +L5 [finish finally]: jmp(error) NEXT:[] PREV:[r(2)] -l3 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l3 [skipFinallyToErrorBlock])] -l1: -l6 [stop [d0]]: +L3 [skipFinallyToErrorBlock]: + r(2) NEXT:[] PREV:[jmp(L3 [skipFinallyToErrorBlock])] +L1: +L6 [stop [d0]]: NEXT:[] PREV:[r(2)] error: NEXT:[] PREV:[jmp(error)] @@ -45,7 +45,7 @@ fun t2() { } } --------------------- -l0: +L0: NEXT:[r(try { 1 if (2 > 3) { retur..)] PREV:[] r(try { 1 @@ -54,32 +54,32 @@ l0: } } finally { 2 - }) NEXT:[jmp?(l2 [onExceptionToFinallyBlock])] PREV:[] - jmp?(l2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { retur..)] - r(1) NEXT:[r(2)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] + }) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[] + jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { retur..)] + r(1) NEXT:[r(2)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] r(2) NEXT:[r(3)] PREV:[r(1)] r(3) NEXT:[r(>)] PREV:[r(2)] r(>) NEXT:[r(2 > 3)] PREV:[r(3)] - r(2 > 3) NEXT:[jf(l3)] PREV:[r(>)] - jf(l3) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)] -l4 [start finally]: - r(2) NEXT:[ret l1] PREV:[jf(l3)] -l5 [finish finally]: - ret l1 NEXT:[] PREV:[r(2)] -- jmp(l6) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] -l3: - read (Unit) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[jf(l3)] -l6: + r(2 > 3) NEXT:[jf(L3)] PREV:[r(>)] + jf(L3) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)] +L4 [start finally]: + r(2) NEXT:[ret L1] PREV:[jf(L3)] +L5 [finish finally]: + ret L1 NEXT:[] PREV:[r(2)] +- jmp(L6) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[] +L3: + read (Unit) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[jf(L3)] +L6: d0: - jmp(l7 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] -l2 [onExceptionToFinallyBlock]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] + jmp(L7 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] +L2 [onExceptionToFinallyBlock]: + r(2) NEXT:[jmp(error)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] jmp(error) NEXT:[] PREV:[r(2)] -l7 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l7 [skipFinallyToErrorBlock])] -l1: -l8 [stop [d0]]: - NEXT:[] PREV:[ret l1, r(2)] +L7 [skipFinallyToErrorBlock]: + r(2) NEXT:[] PREV:[jmp(L7 [skipFinallyToErrorBlock])] +L1: +L8 [stop [d0]]: + NEXT:[] PREV:[ret L1, r(2)] error: NEXT:[] PREV:[jmp(error)] sink: @@ -99,7 +99,7 @@ fun t3() { } } --------------------- -l0: +L0: NEXT:[r(try { 1 @{ () => if (2 > 3..)] PREV:[] r(try { 1 @@ -110,52 +110,52 @@ l0: } } finally { 2 - }) NEXT:[jmp?(l2 [onExceptionToFinallyBlock])] PREV:[] - jmp?(l2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 @{ () => if (2 > 3..)] - r(1) NEXT:[jmp?(l3)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] - jmp?(l3) NEXT:[r({ () => if (2 > 3) { retur..), d({ () => if (2 > 3) { retur..)] PREV:[r(1)] + }) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[] + jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 @{ () => if (2 > 3..)] + r(1) NEXT:[jmp?(L3)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + jmp?(L3) NEXT:[r({ () => if (2 > 3) { retur..), d({ () => if (2 > 3) { retur..)] PREV:[r(1)] d({ () => if (2 > 3) { return@ } - }) NEXT:[] PREV:[jmp?(l3)] -l3: + }) NEXT:[] PREV:[jmp?(L3)] +L3: r({ () => if (2 > 3) { return@ } - }) NEXT:[jmp(l8 [skipFinallyToErrorBlock])] PREV:[jmp?(l3)] + }) NEXT:[jmp(L8 [skipFinallyToErrorBlock])] PREV:[jmp?(L3)] d0: - jmp(l8 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r({ () => if (2 > 3) { retur..)] -l2 [onExceptionToFinallyBlock]: -l9 [start finally]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] -l10 [finish finally]: + jmp(L8 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r({ () => if (2 > 3) { retur..)] +L2 [onExceptionToFinallyBlock]: +L9 [start finally]: + r(2) NEXT:[jmp(error)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] +L10 [finish finally]: jmp(error) NEXT:[] PREV:[r(2)] -l8 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l8 [skipFinallyToErrorBlock])] -l1: -l11 [stop [d0]]: +L8 [skipFinallyToErrorBlock]: + r(2) NEXT:[] PREV:[jmp(L8 [skipFinallyToErrorBlock])] +L1: +L11 [stop [d0]]: NEXT:[] PREV:[r(2)] error: NEXT:[] PREV:[jmp(error)] sink: NEXT:[] PREV:[, , d({ () => if (2 > 3) { retur..)] -l4: +L4: NEXT:[r(())] PREV:[] r(()) NEXT:[r(2)] PREV:[] r(2) NEXT:[r(3)] PREV:[r(())] r(3) NEXT:[r(>)] PREV:[r(2)] r(>) NEXT:[r(2 > 3)] PREV:[r(3)] - r(2 > 3) NEXT:[jf(l6)] PREV:[r(>)] - jf(l6) NEXT:[read (Unit), ret l5] PREV:[r(2 > 3)] - ret l5 NEXT:[] PREV:[jf(l6)] -- jmp(l7) NEXT:[] PREV:[] -l6: - read (Unit) NEXT:[] PREV:[jf(l6)] -l5: -l7: - NEXT:[] PREV:[ret l5, read (Unit)] + r(2 > 3) NEXT:[jf(L6)] PREV:[r(>)] + jf(L6) NEXT:[read (Unit), ret L5] PREV:[r(2 > 3)] + ret L5 NEXT:[] PREV:[jf(L6)] +- jmp(L7) NEXT:[] PREV:[] +L6: + read (Unit) NEXT:[] PREV:[jf(L6)] +L5: +L7: + NEXT:[] PREV:[ret L5, read (Unit)] error: NEXT:[] PREV:[] sink: @@ -168,21 +168,21 @@ sink: } } --------------------- -l4: +L4: NEXT:[r(())] PREV:[] r(()) NEXT:[r(2)] PREV:[] r(2) NEXT:[r(3)] PREV:[r(())] r(3) NEXT:[r(>)] PREV:[r(2)] r(>) NEXT:[r(2 > 3)] PREV:[r(3)] - r(2 > 3) NEXT:[jf(l6)] PREV:[r(>)] - jf(l6) NEXT:[read (Unit), ret l5] PREV:[r(2 > 3)] - ret l5 NEXT:[] PREV:[jf(l6)] -- jmp(l7) NEXT:[] PREV:[] -l6: - read (Unit) NEXT:[] PREV:[jf(l6)] -l5: -l7: - NEXT:[] PREV:[ret l5, read (Unit)] + r(2 > 3) NEXT:[jf(L6)] PREV:[r(>)] + jf(L6) NEXT:[read (Unit), ret L5] PREV:[r(2 > 3)] + ret L5 NEXT:[] PREV:[jf(L6)] +- jmp(L7) NEXT:[] PREV:[] +L6: + read (Unit) NEXT:[] PREV:[jf(L6)] +L5: +L7: + NEXT:[] PREV:[ret L5, read (Unit)] error: NEXT:[] PREV:[] sink: @@ -202,9 +202,9 @@ fun t4() { } } --------------------- -l0: - NEXT:[jmp?(l2)] PREV:[] - jmp?(l2) NEXT:[r({ () => try { 1 if (2 > 3)..), d({ () => try { 1 if (2 > 3)..)] PREV:[] +L0: + NEXT:[jmp?(L2)] PREV:[] + jmp?(L2) NEXT:[r({ () => try { 1 if (2 > 3)..), d({ () => try { 1 if (2 > 3)..)] PREV:[] d({ () => try { 1 @@ -214,8 +214,8 @@ l0: } finally { 2 } - }) NEXT:[] PREV:[jmp?(l2)] -l2: + }) NEXT:[] PREV:[jmp?(L2)] +L2: r({ () => try { 1 @@ -225,14 +225,14 @@ l2: } finally { 2 } - }) NEXT:[] PREV:[jmp?(l2)] -l1: + }) NEXT:[] PREV:[jmp?(L2)] +L1: NEXT:[] PREV:[r({ () => try { 1 if (2 > 3)..)] error: NEXT:[] PREV:[] sink: NEXT:[] PREV:[, , d({ () => try { 1 if (2 > 3)..)] -l3: +L3: NEXT:[r(())] PREV:[] r(()) NEXT:[r(try { 1 if (2 > 3) { retur..)] PREV:[] r(try { @@ -242,32 +242,32 @@ l3: } } finally { 2 - }) NEXT:[jmp?(l5 [onExceptionToFinallyBlock])] PREV:[r(())] - jmp?(l5 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { retur..)] - r(1) NEXT:[r(2)] PREV:[jmp?(l5 [onExceptionToFinallyBlock])] + }) NEXT:[jmp?(L5 [onExceptionToFinallyBlock])] PREV:[r(())] + jmp?(L5 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { retur..)] + r(1) NEXT:[r(2)] PREV:[jmp?(L5 [onExceptionToFinallyBlock])] r(2) NEXT:[r(3)] PREV:[r(1)] r(3) NEXT:[r(>)] PREV:[r(2)] r(>) NEXT:[r(2 > 3)] PREV:[r(3)] - r(2 > 3) NEXT:[jf(l6)] PREV:[r(>)] - jf(l6) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)] -l7 [start finally]: - r(2) NEXT:[ret l4] PREV:[jf(l6)] -l8 [finish finally]: - ret l4 NEXT:[] PREV:[r(2)] -- jmp(l9) NEXT:[jmp(l10 [skipFinallyToErrorBlock])] PREV:[] -l6: - read (Unit) NEXT:[jmp(l10 [skipFinallyToErrorBlock])] PREV:[jf(l6)] -l9: + r(2 > 3) NEXT:[jf(L6)] PREV:[r(>)] + jf(L6) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)] +L7 [start finally]: + r(2) NEXT:[ret L4] PREV:[jf(L6)] +L8 [finish finally]: + ret L4 NEXT:[] PREV:[r(2)] +- jmp(L9) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[] +L6: + read (Unit) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[jf(L6)] +L9: d0: - jmp(l10 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] -l5 [onExceptionToFinallyBlock]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l5 [onExceptionToFinallyBlock])] + jmp(L10 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] +L5 [onExceptionToFinallyBlock]: + r(2) NEXT:[jmp(error)] PREV:[jmp?(L5 [onExceptionToFinallyBlock])] jmp(error) NEXT:[] PREV:[r(2)] -l10 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l10 [skipFinallyToErrorBlock])] -l4: -l11 [stop [d0]]: - NEXT:[] PREV:[ret l4, r(2)] +L10 [skipFinallyToErrorBlock]: + r(2) NEXT:[] PREV:[jmp(L10 [skipFinallyToErrorBlock])] +L4: +L11 [stop [d0]]: + NEXT:[] PREV:[ret L4, r(2)] error: NEXT:[] PREV:[jmp(error)] sink: @@ -285,7 +285,7 @@ sink: } } --------------------- -l3: +L3: NEXT:[r(())] PREV:[] r(()) NEXT:[r(try { 1 if (2 > 3) { retur..)] PREV:[] r(try { @@ -295,32 +295,32 @@ l3: } } finally { 2 - }) NEXT:[jmp?(l5 [onExceptionToFinallyBlock])] PREV:[r(())] - jmp?(l5 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { retur..)] - r(1) NEXT:[r(2)] PREV:[jmp?(l5 [onExceptionToFinallyBlock])] + }) NEXT:[jmp?(L5 [onExceptionToFinallyBlock])] PREV:[r(())] + jmp?(L5 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { retur..)] + r(1) NEXT:[r(2)] PREV:[jmp?(L5 [onExceptionToFinallyBlock])] r(2) NEXT:[r(3)] PREV:[r(1)] r(3) NEXT:[r(>)] PREV:[r(2)] r(>) NEXT:[r(2 > 3)] PREV:[r(3)] - r(2 > 3) NEXT:[jf(l6)] PREV:[r(>)] - jf(l6) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)] -l7 [start finally]: - r(2) NEXT:[ret l4] PREV:[jf(l6)] -l8 [finish finally]: - ret l4 NEXT:[] PREV:[r(2)] -- jmp(l9) NEXT:[jmp(l10 [skipFinallyToErrorBlock])] PREV:[] -l6: - read (Unit) NEXT:[jmp(l10 [skipFinallyToErrorBlock])] PREV:[jf(l6)] -l9: + r(2 > 3) NEXT:[jf(L6)] PREV:[r(>)] + jf(L6) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)] +L7 [start finally]: + r(2) NEXT:[ret L4] PREV:[jf(L6)] +L8 [finish finally]: + ret L4 NEXT:[] PREV:[r(2)] +- jmp(L9) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[] +L6: + read (Unit) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[jf(L6)] +L9: d0: - jmp(l10 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] -l5 [onExceptionToFinallyBlock]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l5 [onExceptionToFinallyBlock])] + jmp(L10 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] +L5 [onExceptionToFinallyBlock]: + r(2) NEXT:[jmp(error)] PREV:[jmp?(L5 [onExceptionToFinallyBlock])] jmp(error) NEXT:[] PREV:[r(2)] -l10 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l10 [skipFinallyToErrorBlock])] -l4: -l11 [stop [d0]]: - NEXT:[] PREV:[ret l4, r(2)] +L10 [skipFinallyToErrorBlock]: + r(2) NEXT:[] PREV:[jmp(L10 [skipFinallyToErrorBlock])] +L4: +L11 [stop [d0]]: + NEXT:[] PREV:[ret L4, r(2)] error: NEXT:[] PREV:[jmp(error)] sink: @@ -340,7 +340,7 @@ fun t5() { } } --------------------- -l0: +L0: NEXT:[r(while(true) { try { 1 if (..)] PREV:[] r(while(true) { try { @@ -352,10 +352,10 @@ l0: 2 } }) NEXT:[r(true)] PREV:[] -l2 [loop entry point]: -l5 [condition entry point]: - r(true) NEXT:[r(try { 1 if (2 > 3) { break..)] PREV:[r(while(true) { try { 1 if (..), jmp(l2 [loop entry point])] -l4 [body entry point]: +L2 [loop entry point]: +L5 [condition entry point]: + r(true) NEXT:[r(try { 1 if (2 > 3) { break..)] PREV:[r(while(true) { try { 1 if (..), jmp(L2 [loop entry point])] +L4 [body entry point]: r(try { 1 if (2 > 3) { @@ -363,34 +363,34 @@ l4 [body entry point]: } } finally { 2 - }) NEXT:[jmp?(l6 [onExceptionToFinallyBlock])] PREV:[r(true)] - jmp?(l6 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { break..)] - r(1) NEXT:[r(2)] PREV:[jmp?(l6 [onExceptionToFinallyBlock])] + }) NEXT:[jmp?(L6 [onExceptionToFinallyBlock])] PREV:[r(true)] + jmp?(L6 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { break..)] + r(1) NEXT:[r(2)] PREV:[jmp?(L6 [onExceptionToFinallyBlock])] r(2) NEXT:[r(3)] PREV:[r(1)] r(3) NEXT:[r(>)] PREV:[r(2)] r(>) NEXT:[r(2 > 3)] PREV:[r(3)] - r(2 > 3) NEXT:[jf(l7)] PREV:[r(>)] - jf(l7) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)] -l8 [start finally]: - r(2) NEXT:[jmp(l3 [loop exit point])] PREV:[jf(l7)] -l9 [finish finally]: - jmp(l3 [loop exit point]) NEXT:[read (Unit)] PREV:[r(2)] -- jmp(l10) NEXT:[jmp(l11 [skipFinallyToErrorBlock])] PREV:[] -l7: - read (Unit) NEXT:[jmp(l11 [skipFinallyToErrorBlock])] PREV:[jf(l7)] -l10: + r(2 > 3) NEXT:[jf(L7)] PREV:[r(>)] + jf(L7) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)] +L8 [start finally]: + r(2) NEXT:[jmp(L3 [loop exit point])] PREV:[jf(L7)] +L9 [finish finally]: + jmp(L3 [loop exit point]) NEXT:[read (Unit)] PREV:[r(2)] +- jmp(L10) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[] +L7: + read (Unit) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[jf(L7)] +L10: d0: - jmp(l11 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] -l6 [onExceptionToFinallyBlock]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l6 [onExceptionToFinallyBlock])] + jmp(L11 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] +L6 [onExceptionToFinallyBlock]: + r(2) NEXT:[jmp(error)] PREV:[jmp?(L6 [onExceptionToFinallyBlock])] jmp(error) NEXT:[] PREV:[r(2)] -l11 [skipFinallyToErrorBlock]: - r(2) NEXT:[jmp(l2 [loop entry point])] PREV:[jmp(l11 [skipFinallyToErrorBlock])] -l12 [stop [d0]]: - jmp(l2 [loop entry point]) NEXT:[r(true)] PREV:[r(2)] -l3 [loop exit point]: - read (Unit) NEXT:[] PREV:[jmp(l3 [loop exit point])] -l1: +L11 [skipFinallyToErrorBlock]: + r(2) NEXT:[jmp(L2 [loop entry point])] PREV:[jmp(L11 [skipFinallyToErrorBlock])] +L12 [stop [d0]]: + jmp(L2 [loop entry point]) NEXT:[r(true)] PREV:[r(2)] +L3 [loop exit point]: + read (Unit) NEXT:[] PREV:[jmp(L3 [loop exit point])] +L1: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[jmp(error)] @@ -412,7 +412,7 @@ fun t6() { } } --------------------- -l0: +L0: NEXT:[r(try { @ while(true) { 1 if..)] PREV:[] r(try { @ while(true) { @@ -424,44 +424,44 @@ l0: 5 } finally { 2 - }) NEXT:[jmp?(l2 [onExceptionToFinallyBlock])] PREV:[] - jmp?(l2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(while(true) { 1 if (2 > 3)..)] PREV:[r(try { @ while(true) { 1 if..)] + }) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[] + jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(while(true) { 1 if (2 > 3)..)] PREV:[r(try { @ while(true) { 1 if..)] r(while(true) { 1 if (2 > 3) { break @ } - }) NEXT:[r(true)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] -l3 [loop entry point]: -l6 [condition entry point]: - r(true) NEXT:[r(1)] PREV:[r(while(true) { 1 if (2 > 3)..), jmp(l3 [loop entry point])] -l5 [body entry point]: + }) NEXT:[r(true)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] +L3 [loop entry point]: +L6 [condition entry point]: + r(true) NEXT:[r(1)] PREV:[r(while(true) { 1 if (2 > 3)..), jmp(L3 [loop entry point])] +L5 [body entry point]: r(1) NEXT:[r(2)] PREV:[r(true)] r(2) NEXT:[r(3)] PREV:[r(1)] r(3) NEXT:[r(>)] PREV:[r(2)] r(>) NEXT:[r(2 > 3)] PREV:[r(3)] - r(2 > 3) NEXT:[jf(l7)] PREV:[r(>)] - jf(l7) NEXT:[read (Unit), jmp(l4 [loop exit point])] PREV:[r(2 > 3)] - jmp(l4 [loop exit point]) NEXT:[read (Unit)] PREV:[jf(l7)] -- jmp(l8) NEXT:[jmp(l3 [loop entry point])] PREV:[] -l7: - read (Unit) NEXT:[jmp(l3 [loop entry point])] PREV:[jf(l7)] -l8: - jmp(l3 [loop entry point]) NEXT:[r(true)] PREV:[read (Unit)] -l4 [loop exit point]: - read (Unit) NEXT:[r(5)] PREV:[jmp(l4 [loop exit point])] - r(5) NEXT:[jmp(l9 [skipFinallyToErrorBlock])] PREV:[read (Unit)] + r(2 > 3) NEXT:[jf(L7)] PREV:[r(>)] + jf(L7) NEXT:[read (Unit), jmp(L4 [loop exit point])] PREV:[r(2 > 3)] + jmp(L4 [loop exit point]) NEXT:[read (Unit)] PREV:[jf(L7)] +- jmp(L8) NEXT:[jmp(L3 [loop entry point])] PREV:[] +L7: + read (Unit) NEXT:[jmp(L3 [loop entry point])] PREV:[jf(L7)] +L8: + jmp(L3 [loop entry point]) NEXT:[r(true)] PREV:[read (Unit)] +L4 [loop exit point]: + read (Unit) NEXT:[r(5)] PREV:[jmp(L4 [loop exit point])] + r(5) NEXT:[jmp(L9 [skipFinallyToErrorBlock])] PREV:[read (Unit)] d0: - jmp(l9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r(5)] -l2 [onExceptionToFinallyBlock]: -l10 [start finally]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] -l11 [finish finally]: + jmp(L9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r(5)] +L2 [onExceptionToFinallyBlock]: +L10 [start finally]: + r(2) NEXT:[jmp(error)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] +L11 [finish finally]: jmp(error) NEXT:[] PREV:[r(2)] -l9 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l9 [skipFinallyToErrorBlock])] -l1: -l12 [stop [d0]]: +L9 [skipFinallyToErrorBlock]: + r(2) NEXT:[] PREV:[jmp(L9 [skipFinallyToErrorBlock])] +L1: +L12 [stop [d0]]: NEXT:[] PREV:[r(2)] error: NEXT:[] PREV:[jmp(error)] @@ -482,7 +482,7 @@ fun t7() { } } --------------------- -l0: +L0: NEXT:[r(try { @ while(true) { 1 if..)] PREV:[] r(try { @ while(true) { @@ -493,43 +493,43 @@ l0: } } finally { 2 - }) NEXT:[jmp?(l2 [onExceptionToFinallyBlock])] PREV:[] - jmp?(l2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(while(true) { 1 if (2 > 3)..)] PREV:[r(try { @ while(true) { 1 if..)] + }) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[] + jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(while(true) { 1 if (2 > 3)..)] PREV:[r(try { @ while(true) { 1 if..)] r(while(true) { 1 if (2 > 3) { break @ } - }) NEXT:[r(true)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] -l3 [loop entry point]: -l6 [condition entry point]: - r(true) NEXT:[r(1)] PREV:[r(while(true) { 1 if (2 > 3)..), jmp(l3 [loop entry point])] -l5 [body entry point]: + }) NEXT:[r(true)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] +L3 [loop entry point]: +L6 [condition entry point]: + r(true) NEXT:[r(1)] PREV:[r(while(true) { 1 if (2 > 3)..), jmp(L3 [loop entry point])] +L5 [body entry point]: r(1) NEXT:[r(2)] PREV:[r(true)] r(2) NEXT:[r(3)] PREV:[r(1)] r(3) NEXT:[r(>)] PREV:[r(2)] r(>) NEXT:[r(2 > 3)] PREV:[r(3)] - r(2 > 3) NEXT:[jf(l7)] PREV:[r(>)] - jf(l7) NEXT:[read (Unit), jmp(l4 [loop exit point])] PREV:[r(2 > 3)] - jmp(l4 [loop exit point]) NEXT:[read (Unit)] PREV:[jf(l7)] -- jmp(l8) NEXT:[jmp(l3 [loop entry point])] PREV:[] -l7: - read (Unit) NEXT:[jmp(l3 [loop entry point])] PREV:[jf(l7)] -l8: - jmp(l3 [loop entry point]) NEXT:[r(true)] PREV:[read (Unit)] -l4 [loop exit point]: - read (Unit) NEXT:[jmp(l9 [skipFinallyToErrorBlock])] PREV:[jmp(l4 [loop exit point])] + r(2 > 3) NEXT:[jf(L7)] PREV:[r(>)] + jf(L7) NEXT:[read (Unit), jmp(L4 [loop exit point])] PREV:[r(2 > 3)] + jmp(L4 [loop exit point]) NEXT:[read (Unit)] PREV:[jf(L7)] +- jmp(L8) NEXT:[jmp(L3 [loop entry point])] PREV:[] +L7: + read (Unit) NEXT:[jmp(L3 [loop entry point])] PREV:[jf(L7)] +L8: + jmp(L3 [loop entry point]) NEXT:[r(true)] PREV:[read (Unit)] +L4 [loop exit point]: + read (Unit) NEXT:[jmp(L9 [skipFinallyToErrorBlock])] PREV:[jmp(L4 [loop exit point])] d0: - jmp(l9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] -l2 [onExceptionToFinallyBlock]: -l10 [start finally]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] -l11 [finish finally]: + jmp(L9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] +L2 [onExceptionToFinallyBlock]: +L10 [start finally]: + r(2) NEXT:[jmp(error)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] +L11 [finish finally]: jmp(error) NEXT:[] PREV:[r(2)] -l9 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l9 [skipFinallyToErrorBlock])] -l1: -l12 [stop [d0]]: +L9 [skipFinallyToErrorBlock]: + r(2) NEXT:[] PREV:[jmp(L9 [skipFinallyToErrorBlock])] +L1: +L12 [stop [d0]]: NEXT:[] PREV:[r(2)] error: NEXT:[] PREV:[jmp(error)] @@ -550,7 +550,7 @@ fun t8(a : Int) { } } --------------------- -l0: +L0: NEXT:[v(a : Int)] PREV:[] v(a : Int) NEXT:[w(a)] PREV:[] w(a) NEXT:[r(for (i in 1..a) { try { 1 ..)] PREV:[v(a : Int)] @@ -569,11 +569,11 @@ l0: r(..) NEXT:[r(1..a)] PREV:[r(a)] r(1..a) NEXT:[v(i)] PREV:[r(..)] v(i) NEXT:[w(i)] PREV:[r(1..a)] - w(i) NEXT:[jmp?(l2)] PREV:[v(i)] -l3: - jmp?(l2) NEXT:[read (Unit), r(try { 1 if (2 > 3) { conti..)] PREV:[w(i)] -l4 [loop entry point]: -l5 [body entry point]: + w(i) NEXT:[jmp?(L2)] PREV:[v(i)] +L3: + jmp?(L2) NEXT:[read (Unit), r(try { 1 if (2 > 3) { conti..)] PREV:[w(i)] +L4 [loop entry point]: +L5 [body entry point]: r(try { 1 if (2 > 3) { @@ -581,34 +581,34 @@ l5 [body entry point]: } } finally { 2 - }) NEXT:[jmp?(l6 [onExceptionToFinallyBlock])] PREV:[jmp?(l2), jmp(l4 [loop entry point]), jmp?(l4 [loop entry point])] - jmp?(l6 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { conti..)] - r(1) NEXT:[r(2)] PREV:[jmp?(l6 [onExceptionToFinallyBlock])] + }) NEXT:[jmp?(L6 [onExceptionToFinallyBlock])] PREV:[jmp?(L2), jmp(L4 [loop entry point]), jmp?(L4 [loop entry point])] + jmp?(L6 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { conti..)] + r(1) NEXT:[r(2)] PREV:[jmp?(L6 [onExceptionToFinallyBlock])] r(2) NEXT:[r(3)] PREV:[r(1)] r(3) NEXT:[r(>)] PREV:[r(2)] r(>) NEXT:[r(2 > 3)] PREV:[r(3)] - r(2 > 3) NEXT:[jf(l7)] PREV:[r(>)] - jf(l7) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)] -l8 [start finally]: - r(2) NEXT:[jmp(l4 [loop entry point])] PREV:[jf(l7)] -l9 [finish finally]: - jmp(l4 [loop entry point]) NEXT:[r(try { 1 if (2 > 3) { conti..)] PREV:[r(2)] -- jmp(l10) NEXT:[jmp(l11 [skipFinallyToErrorBlock])] PREV:[] -l7: - read (Unit) NEXT:[jmp(l11 [skipFinallyToErrorBlock])] PREV:[jf(l7)] -l10: + r(2 > 3) NEXT:[jf(L7)] PREV:[r(>)] + jf(L7) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)] +L8 [start finally]: + r(2) NEXT:[jmp(L4 [loop entry point])] PREV:[jf(L7)] +L9 [finish finally]: + jmp(L4 [loop entry point]) NEXT:[r(try { 1 if (2 > 3) { conti..)] PREV:[r(2)] +- jmp(L10) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[] +L7: + read (Unit) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[jf(L7)] +L10: d0: - jmp(l11 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] -l6 [onExceptionToFinallyBlock]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l6 [onExceptionToFinallyBlock])] + jmp(L11 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] +L6 [onExceptionToFinallyBlock]: + r(2) NEXT:[jmp(error)] PREV:[jmp?(L6 [onExceptionToFinallyBlock])] jmp(error) NEXT:[] PREV:[r(2)] -l11 [skipFinallyToErrorBlock]: - r(2) NEXT:[jmp?(l4 [loop entry point])] PREV:[jmp(l11 [skipFinallyToErrorBlock])] -l12 [stop [d0]]: - jmp?(l4 [loop entry point]) NEXT:[r(try { 1 if (2 > 3) { conti..), read (Unit)] PREV:[r(2)] -l2: - read (Unit) NEXT:[] PREV:[jmp?(l2), jmp?(l4 [loop entry point])] -l1: +L11 [skipFinallyToErrorBlock]: + r(2) NEXT:[jmp?(L4 [loop entry point])] PREV:[jmp(L11 [skipFinallyToErrorBlock])] +L12 [stop [d0]]: + jmp?(L4 [loop entry point]) NEXT:[r(try { 1 if (2 > 3) { conti..), read (Unit)] PREV:[r(2)] +L2: + read (Unit) NEXT:[] PREV:[jmp?(L2), jmp?(L4 [loop entry point])] +L1: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[jmp(error)] @@ -630,7 +630,7 @@ fun t9(a : Int) { } } --------------------- -l0: +L0: NEXT:[v(a : Int)] PREV:[] v(a : Int) NEXT:[w(a)] PREV:[] w(a) NEXT:[r(try { @ for (i in 1..a) { ..)] PREV:[v(a : Int)] @@ -644,50 +644,50 @@ l0: 5 } finally { 2 - }) NEXT:[jmp?(l2 [onExceptionToFinallyBlock])] PREV:[w(a)] - jmp?(l2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(for (i in 1..a) { 1 if (2 ..)] PREV:[r(try { @ for (i in 1..a) { ..)] + }) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[w(a)] + jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(for (i in 1..a) { 1 if (2 ..)] PREV:[r(try { @ for (i in 1..a) { ..)] r(for (i in 1..a) { 1 if (2 > 3) { continue @ } - }) NEXT:[r(1)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] + }) NEXT:[r(1)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] r(1) NEXT:[r(a)] PREV:[r(for (i in 1..a) { 1 if (2 ..)] r(a) NEXT:[r(..)] PREV:[r(1)] r(..) NEXT:[r(1..a)] PREV:[r(a)] r(1..a) NEXT:[v(i)] PREV:[r(..)] v(i) NEXT:[w(i)] PREV:[r(1..a)] - w(i) NEXT:[jmp?(l3)] PREV:[v(i)] -l4: - jmp?(l3) NEXT:[read (Unit), r(1)] PREV:[w(i)] -l5 [loop entry point]: -l6 [body entry point]: - r(1) NEXT:[r(2)] PREV:[jmp?(l3), jmp(l5 [loop entry point]), jmp?(l5 [loop entry point])] + w(i) NEXT:[jmp?(L3)] PREV:[v(i)] +L4: + jmp?(L3) NEXT:[read (Unit), r(1)] PREV:[w(i)] +L5 [loop entry point]: +L6 [body entry point]: + r(1) NEXT:[r(2)] PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])] r(2) NEXT:[r(3)] PREV:[r(1)] r(3) NEXT:[r(>)] PREV:[r(2)] r(>) NEXT:[r(2 > 3)] PREV:[r(3)] - r(2 > 3) NEXT:[jf(l7)] PREV:[r(>)] - jf(l7) NEXT:[read (Unit), jmp(l5 [loop entry point])] PREV:[r(2 > 3)] - jmp(l5 [loop entry point]) NEXT:[r(1)] PREV:[jf(l7)] -- jmp(l8) NEXT:[jmp?(l5 [loop entry point])] PREV:[] -l7: - read (Unit) NEXT:[jmp?(l5 [loop entry point])] PREV:[jf(l7)] -l8: - jmp?(l5 [loop entry point]) NEXT:[r(1), read (Unit)] PREV:[read (Unit)] -l3: - read (Unit) NEXT:[r(5)] PREV:[jmp?(l3), jmp?(l5 [loop entry point])] - r(5) NEXT:[jmp(l9 [skipFinallyToErrorBlock])] PREV:[read (Unit)] + r(2 > 3) NEXT:[jf(L7)] PREV:[r(>)] + jf(L7) NEXT:[read (Unit), jmp(L5 [loop entry point])] PREV:[r(2 > 3)] + jmp(L5 [loop entry point]) NEXT:[r(1)] PREV:[jf(L7)] +- jmp(L8) NEXT:[jmp?(L5 [loop entry point])] PREV:[] +L7: + read (Unit) NEXT:[jmp?(L5 [loop entry point])] PREV:[jf(L7)] +L8: + jmp?(L5 [loop entry point]) NEXT:[r(1), read (Unit)] PREV:[read (Unit)] +L3: + read (Unit) NEXT:[r(5)] PREV:[jmp?(L3), jmp?(L5 [loop entry point])] + r(5) NEXT:[jmp(L9 [skipFinallyToErrorBlock])] PREV:[read (Unit)] d0: - jmp(l9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r(5)] -l2 [onExceptionToFinallyBlock]: -l10 [start finally]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] -l11 [finish finally]: + jmp(L9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r(5)] +L2 [onExceptionToFinallyBlock]: +L10 [start finally]: + r(2) NEXT:[jmp(error)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] +L11 [finish finally]: jmp(error) NEXT:[] PREV:[r(2)] -l9 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l9 [skipFinallyToErrorBlock])] -l1: -l12 [stop [d0]]: +L9 [skipFinallyToErrorBlock]: + r(2) NEXT:[] PREV:[jmp(L9 [skipFinallyToErrorBlock])] +L1: +L12 [stop [d0]]: NEXT:[] PREV:[r(2)] error: NEXT:[] PREV:[jmp(error)] @@ -708,7 +708,7 @@ fun t10(a : Int) { } } --------------------- -l0: +L0: NEXT:[v(a : Int)] PREV:[] v(a : Int) NEXT:[w(a)] PREV:[] w(a) NEXT:[r(try { @ for (i in 1..a) { ..)] PREV:[v(a : Int)] @@ -721,49 +721,49 @@ l0: } } finally { 2 - }) NEXT:[jmp?(l2 [onExceptionToFinallyBlock])] PREV:[w(a)] - jmp?(l2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(for (i in 1..a) { 1 if (2 ..)] PREV:[r(try { @ for (i in 1..a) { ..)] + }) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[w(a)] + jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(for (i in 1..a) { 1 if (2 ..)] PREV:[r(try { @ for (i in 1..a) { ..)] r(for (i in 1..a) { 1 if (2 > 3) { continue @ } - }) NEXT:[r(1)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] + }) NEXT:[r(1)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] r(1) NEXT:[r(a)] PREV:[r(for (i in 1..a) { 1 if (2 ..)] r(a) NEXT:[r(..)] PREV:[r(1)] r(..) NEXT:[r(1..a)] PREV:[r(a)] r(1..a) NEXT:[v(i)] PREV:[r(..)] v(i) NEXT:[w(i)] PREV:[r(1..a)] - w(i) NEXT:[jmp?(l3)] PREV:[v(i)] -l4: - jmp?(l3) NEXT:[read (Unit), r(1)] PREV:[w(i)] -l5 [loop entry point]: -l6 [body entry point]: - r(1) NEXT:[r(2)] PREV:[jmp?(l3), jmp(l5 [loop entry point]), jmp?(l5 [loop entry point])] + w(i) NEXT:[jmp?(L3)] PREV:[v(i)] +L4: + jmp?(L3) NEXT:[read (Unit), r(1)] PREV:[w(i)] +L5 [loop entry point]: +L6 [body entry point]: + r(1) NEXT:[r(2)] PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])] r(2) NEXT:[r(3)] PREV:[r(1)] r(3) NEXT:[r(>)] PREV:[r(2)] r(>) NEXT:[r(2 > 3)] PREV:[r(3)] - r(2 > 3) NEXT:[jf(l7)] PREV:[r(>)] - jf(l7) NEXT:[read (Unit), jmp(l5 [loop entry point])] PREV:[r(2 > 3)] - jmp(l5 [loop entry point]) NEXT:[r(1)] PREV:[jf(l7)] -- jmp(l8) NEXT:[jmp?(l5 [loop entry point])] PREV:[] -l7: - read (Unit) NEXT:[jmp?(l5 [loop entry point])] PREV:[jf(l7)] -l8: - jmp?(l5 [loop entry point]) NEXT:[r(1), read (Unit)] PREV:[read (Unit)] -l3: - read (Unit) NEXT:[jmp(l9 [skipFinallyToErrorBlock])] PREV:[jmp?(l3), jmp?(l5 [loop entry point])] + r(2 > 3) NEXT:[jf(L7)] PREV:[r(>)] + jf(L7) NEXT:[read (Unit), jmp(L5 [loop entry point])] PREV:[r(2 > 3)] + jmp(L5 [loop entry point]) NEXT:[r(1)] PREV:[jf(L7)] +- jmp(L8) NEXT:[jmp?(L5 [loop entry point])] PREV:[] +L7: + read (Unit) NEXT:[jmp?(L5 [loop entry point])] PREV:[jf(L7)] +L8: + jmp?(L5 [loop entry point]) NEXT:[r(1), read (Unit)] PREV:[read (Unit)] +L3: + read (Unit) NEXT:[jmp(L9 [skipFinallyToErrorBlock])] PREV:[jmp?(L3), jmp?(L5 [loop entry point])] d0: - jmp(l9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] -l2 [onExceptionToFinallyBlock]: -l10 [start finally]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] -l11 [finish finally]: + jmp(L9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] +L2 [onExceptionToFinallyBlock]: +L10 [start finally]: + r(2) NEXT:[jmp(error)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] +L11 [finish finally]: jmp(error) NEXT:[] PREV:[r(2)] -l9 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l9 [skipFinallyToErrorBlock])] -l1: -l12 [stop [d0]]: +L9 [skipFinallyToErrorBlock]: + r(2) NEXT:[] PREV:[jmp(L9 [skipFinallyToErrorBlock])] +L1: +L12 [stop [d0]]: NEXT:[] PREV:[r(2)] error: NEXT:[] PREV:[jmp(error)] @@ -780,33 +780,33 @@ fun t11() { } } --------------------- -l0: +L0: NEXT:[r(try { return 1 } finally {..)] PREV:[] r(try { return 1 } finally { return 2 - }) NEXT:[jmp?(l2 [onExceptionToFinallyBlock])] PREV:[] - jmp?(l2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { return 1 } finally {..)] - r(1) NEXT:[r(2)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] -l3 [start finally]: - r(2) NEXT:[ret(*) l1] PREV:[r(1)] - ret(*) l1 NEXT:[] PREV:[r(2)] -l4 [finish finally]: -- ret(*) l1 NEXT:[] PREV:[] + }) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[] + jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { return 1 } finally {..)] + r(1) NEXT:[r(2)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] +L3 [start finally]: + r(2) NEXT:[ret(*) L1] PREV:[r(1)] + ret(*) L1 NEXT:[] PREV:[r(2)] +L4 [finish finally]: +- ret(*) L1 NEXT:[] PREV:[] d0: -- jmp(l5 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[] -l2 [onExceptionToFinallyBlock]: - r(2) NEXT:[ret(*) l1] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] - ret(*) l1 NEXT:[] PREV:[r(2)] +- jmp(L5 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[] +L2 [onExceptionToFinallyBlock]: + r(2) NEXT:[ret(*) L1] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + ret(*) L1 NEXT:[] PREV:[r(2)] - jmp(error) NEXT:[] PREV:[] -l5 [skipFinallyToErrorBlock]: -- r(2) NEXT:[ret(*) l1] PREV:[] -- ret(*) l1 NEXT:[] PREV:[] -l1: -l6 [stop [d0]]: - NEXT:[] PREV:[ret(*) l1, ret(*) l1] +L5 [skipFinallyToErrorBlock]: +- r(2) NEXT:[ret(*) L1] PREV:[] +- ret(*) L1 NEXT:[] PREV:[] +L1: +L6 [stop [d0]]: + NEXT:[] PREV:[ret(*) L1, ret(*) L1] error: NEXT:[] PREV:[] sink: @@ -822,36 +822,36 @@ fun t12() : Int { } } --------------------- -l0: +L0: NEXT:[r(try { return 1 } finally {..)] PREV:[] r(try { return 1 } finally { doSmth(3) - }) NEXT:[jmp?(l2 [onExceptionToFinallyBlock])] PREV:[] - jmp?(l2 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[r(try { return 1 } finally {..)] - r(1) NEXT:[r(3)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] -l3 [start finally]: + }) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[] + jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[r(try { return 1 } finally {..)] + r(1) NEXT:[r(3)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] +L3 [start finally]: r(3) NEXT:[r(doSmth)] PREV:[r(1)] r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] - r(doSmth(3)) NEXT:[ret(*) l1] PREV:[r(doSmth)] -l4 [finish finally]: - ret(*) l1 NEXT:[] PREV:[r(doSmth(3))] + r(doSmth(3)) NEXT:[ret(*) L1] PREV:[r(doSmth)] +L4 [finish finally]: + ret(*) L1 NEXT:[] PREV:[r(doSmth(3))] d0: -- jmp(l5 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[] -l2 [onExceptionToFinallyBlock]: - r(3) NEXT:[r(doSmth)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] +- jmp(L5 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[] +L2 [onExceptionToFinallyBlock]: + r(3) NEXT:[r(doSmth)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] r(doSmth(3)) NEXT:[jmp(error)] PREV:[r(doSmth)] jmp(error) NEXT:[] PREV:[r(doSmth(3))] -l5 [skipFinallyToErrorBlock]: +L5 [skipFinallyToErrorBlock]: - r(3) NEXT:[r(doSmth)] PREV:[] - r(doSmth) NEXT:[r(doSmth(3))] PREV:[] - r(doSmth(3)) NEXT:[] PREV:[] -l1: -l6 [stop [d0]]: - NEXT:[] PREV:[ret(*) l1] +L1: +L6 [stop [d0]]: + NEXT:[] PREV:[ret(*) L1] error: NEXT:[] PREV:[jmp(error)] sink: @@ -870,7 +870,7 @@ fun t13() : Int { } } --------------------- -l0: +L0: NEXT:[r(try { return 1 } catch (e:..)] PREV:[] r(try { return 1 @@ -880,40 +880,40 @@ l0: } finally { doSmth(3) - }) NEXT:[jmp?(l2 [onException])] PREV:[] - jmp?(l2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(l3 [onExceptionToFinallyBlock])] PREV:[r(try { return 1 } catch (e:..)] - jmp?(l3 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[jmp?(l2 [onException])] - r(1) NEXT:[r(3)] PREV:[jmp?(l3 [onExceptionToFinallyBlock])] -l4 [start finally]: + }) NEXT:[jmp?(L2 [onException])] PREV:[] + jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[r(try { return 1 } catch (e:..)] + jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[jmp?(L2 [onException])] + r(1) NEXT:[r(3)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] +L4 [start finally]: r(3) NEXT:[r(doSmth)] PREV:[r(1)] r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] - r(doSmth(3)) NEXT:[ret(*) l1] PREV:[r(doSmth)] -l5 [finish finally]: - ret(*) l1 NEXT:[] PREV:[r(doSmth(3))] + r(doSmth(3)) NEXT:[ret(*) L1] PREV:[r(doSmth)] +L5 [finish finally]: + ret(*) L1 NEXT:[] PREV:[r(doSmth(3))] d0: -- jmp(l6 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] -l2 [onException]: - v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(l2 [onException])] +- jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[] +L2 [onException]: + v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(L2 [onException])] w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)] r(2) NEXT:[r(doSmth)] PREV:[w(e)] r(doSmth) NEXT:[r(doSmth(2))] PREV:[r(2)] - r(doSmth(2)) NEXT:[jmp(l6 [afterCatches])] PREV:[r(doSmth)] + r(doSmth(2)) NEXT:[jmp(L6 [afterCatches])] PREV:[r(doSmth)] d1: - jmp(l6 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[r(doSmth(2))] -l6 [afterCatches]: - jmp(l7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[jmp(l6 [afterCatches])] -l3 [onExceptionToFinallyBlock]: - r(3) NEXT:[r(doSmth)] PREV:[jmp?(l3 [onExceptionToFinallyBlock])] + jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[r(doSmth(2))] +L6 [afterCatches]: + jmp(L7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[jmp(L6 [afterCatches])] +L3 [onExceptionToFinallyBlock]: + r(3) NEXT:[r(doSmth)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] r(doSmth(3)) NEXT:[jmp(error)] PREV:[r(doSmth)] jmp(error) NEXT:[] PREV:[r(doSmth(3))] -l7 [skipFinallyToErrorBlock]: - r(3) NEXT:[r(doSmth)] PREV:[jmp(l7 [skipFinallyToErrorBlock])] +L7 [skipFinallyToErrorBlock]: + r(3) NEXT:[r(doSmth)] PREV:[jmp(L7 [skipFinallyToErrorBlock])] r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] r(doSmth(3)) NEXT:[] PREV:[r(doSmth)] -l1: -l8 [stop [d0, d1]]: - NEXT:[] PREV:[ret(*) l1, r(doSmth(3))] +L1: +L8 [stop [d0, d1]]: + NEXT:[] PREV:[ret(*) L1, r(doSmth(3))] error: NEXT:[] PREV:[jmp(error)] sink: @@ -929,31 +929,31 @@ fun t14() : Int { } } --------------------- -l0: +L0: NEXT:[r(try { return 1 } catch (e:..)] PREV:[] r(try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) - }) NEXT:[jmp?(l2 [onException])] PREV:[] - jmp?(l2 [onException]) NEXT:[v(e: UnsupportedOperationException), r(1)] PREV:[r(try { return 1 } catch (e:..)] - r(1) NEXT:[ret(*) l1] PREV:[jmp?(l2 [onException])] - ret(*) l1 NEXT:[] PREV:[r(1)] + }) NEXT:[jmp?(L2 [onException])] PREV:[] + jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), r(1)] PREV:[r(try { return 1 } catch (e:..)] + r(1) NEXT:[ret(*) L1] PREV:[jmp?(L2 [onException])] + ret(*) L1 NEXT:[] PREV:[r(1)] d0: -- jmp(l3 [afterCatches]) NEXT:[] PREV:[] -l2 [onException]: - v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(l2 [onException])] +- jmp(L3 [afterCatches]) NEXT:[] PREV:[] +L2 [onException]: + v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(L2 [onException])] w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)] r(2) NEXT:[r(doSmth)] PREV:[w(e)] r(doSmth) NEXT:[r(doSmth(2))] PREV:[r(2)] - r(doSmth(2)) NEXT:[jmp(l3 [afterCatches])] PREV:[r(doSmth)] + r(doSmth(2)) NEXT:[jmp(L3 [afterCatches])] PREV:[r(doSmth)] d1: - jmp(l3 [afterCatches]) NEXT:[] PREV:[r(doSmth(2))] -l1: -l3 [afterCatches]: -l4 [stop [d0, d1]]: - NEXT:[] PREV:[ret(*) l1, jmp(l3 [afterCatches])] + jmp(L3 [afterCatches]) NEXT:[] PREV:[r(doSmth(2))] +L1: +L3 [afterCatches]: +L4 [stop [d0, d1]]: + NEXT:[] PREV:[ret(*) L1, jmp(L3 [afterCatches])] error: NEXT:[] PREV:[] sink: @@ -972,7 +972,7 @@ fun t15() : Int { } } --------------------- -l0: +L0: NEXT:[r(try { return 1 } catch (e:..)] PREV:[] r(try { return 1 @@ -982,42 +982,42 @@ l0: } finally { doSmth(3) - }) NEXT:[jmp?(l2 [onException])] PREV:[] - jmp?(l2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(l3 [onExceptionToFinallyBlock])] PREV:[r(try { return 1 } catch (e:..)] - jmp?(l3 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[jmp?(l2 [onException])] - r(1) NEXT:[r(3)] PREV:[jmp?(l3 [onExceptionToFinallyBlock])] -l4 [start finally]: + }) NEXT:[jmp?(L2 [onException])] PREV:[] + jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[r(try { return 1 } catch (e:..)] + jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[jmp?(L2 [onException])] + r(1) NEXT:[r(3)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] +L4 [start finally]: r(3) NEXT:[r(doSmth)] PREV:[r(1)] r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] - r(doSmth(3)) NEXT:[ret(*) l1] PREV:[r(doSmth)] -l5 [finish finally]: - ret(*) l1 NEXT:[] PREV:[r(doSmth(3))] + r(doSmth(3)) NEXT:[ret(*) L1] PREV:[r(doSmth)] +L5 [finish finally]: + ret(*) L1 NEXT:[] PREV:[r(doSmth(3))] d0: -- jmp(l6 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] -l2 [onException]: - v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(l2 [onException])] +- jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[] +L2 [onException]: + v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(L2 [onException])] w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)] r(2) NEXT:[r(3)] PREV:[w(e)] r(3) NEXT:[r(doSmth)] PREV:[r(2)] r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] - r(doSmth(3)) NEXT:[ret(*) l1] PREV:[r(doSmth)] - ret(*) l1 NEXT:[] PREV:[r(doSmth(3))] + r(doSmth(3)) NEXT:[ret(*) L1] PREV:[r(doSmth)] + ret(*) L1 NEXT:[] PREV:[r(doSmth(3))] d1: -- jmp(l6 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] -l6 [afterCatches]: -- jmp(l7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[] -l3 [onExceptionToFinallyBlock]: - r(3) NEXT:[r(doSmth)] PREV:[jmp?(l3 [onExceptionToFinallyBlock])] +- jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[] +L6 [afterCatches]: +- jmp(L7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[] +L3 [onExceptionToFinallyBlock]: + r(3) NEXT:[r(doSmth)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] r(doSmth(3)) NEXT:[jmp(error)] PREV:[r(doSmth)] jmp(error) NEXT:[] PREV:[r(doSmth(3))] -l7 [skipFinallyToErrorBlock]: +L7 [skipFinallyToErrorBlock]: - r(3) NEXT:[r(doSmth)] PREV:[] - r(doSmth) NEXT:[r(doSmth(3))] PREV:[] - r(doSmth(3)) NEXT:[] PREV:[] -l1: -l8 [stop [d0, d1]]: - NEXT:[] PREV:[ret(*) l1, ret(*) l1] +L1: +L8 [stop [d0, d1]]: + NEXT:[] PREV:[ret(*) L1, ret(*) L1] error: NEXT:[] PREV:[jmp(error)] sink: @@ -1036,7 +1036,7 @@ fun t16() : Int { } } --------------------- -l0: +L0: NEXT:[r(try { doSmth(1) } catch (e..)] PREV:[] r(try { doSmth(1) @@ -1046,40 +1046,40 @@ l0: } finally { doSmth(3) - }) NEXT:[jmp?(l2 [onException])] PREV:[] - jmp?(l2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(l3 [onExceptionToFinallyBlock])] PREV:[r(try { doSmth(1) } catch (e..)] - jmp?(l3 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[jmp?(l2 [onException])] - r(1) NEXT:[r(doSmth)] PREV:[jmp?(l3 [onExceptionToFinallyBlock])] + }) NEXT:[jmp?(L2 [onException])] PREV:[] + jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[r(try { doSmth(1) } catch (e..)] + jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[jmp?(L2 [onException])] + r(1) NEXT:[r(doSmth)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] r(doSmth) NEXT:[r(doSmth(1))] PREV:[r(1)] - r(doSmth(1)) NEXT:[jmp(l4 [afterCatches])] PREV:[r(doSmth)] + r(doSmth(1)) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth)] d0: - jmp(l4 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[r(doSmth(1))] -l2 [onException]: - v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(l2 [onException])] + jmp(L4 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[r(doSmth(1))] +L2 [onException]: + v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(L2 [onException])] w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)] r(2) NEXT:[r(3)] PREV:[w(e)] -l5 [start finally]: +L5 [start finally]: r(3) NEXT:[r(doSmth)] PREV:[r(2)] r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] - r(doSmth(3)) NEXT:[ret(*) l1] PREV:[r(doSmth)] -l6 [finish finally]: - ret(*) l1 NEXT:[] PREV:[r(doSmth(3))] + r(doSmth(3)) NEXT:[ret(*) L1] PREV:[r(doSmth)] +L6 [finish finally]: + ret(*) L1 NEXT:[] PREV:[r(doSmth(3))] d1: -- jmp(l4 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] -l4 [afterCatches]: - jmp(l7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[jmp(l4 [afterCatches])] -l3 [onExceptionToFinallyBlock]: - r(3) NEXT:[r(doSmth)] PREV:[jmp?(l3 [onExceptionToFinallyBlock])] +- jmp(L4 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[] +L4 [afterCatches]: + jmp(L7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[jmp(L4 [afterCatches])] +L3 [onExceptionToFinallyBlock]: + r(3) NEXT:[r(doSmth)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] r(doSmth(3)) NEXT:[jmp(error)] PREV:[r(doSmth)] jmp(error) NEXT:[] PREV:[r(doSmth(3))] -l7 [skipFinallyToErrorBlock]: - r(3) NEXT:[r(doSmth)] PREV:[jmp(l7 [skipFinallyToErrorBlock])] +L7 [skipFinallyToErrorBlock]: + r(3) NEXT:[r(doSmth)] PREV:[jmp(L7 [skipFinallyToErrorBlock])] r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] r(doSmth(3)) NEXT:[] PREV:[r(doSmth)] -l1: -l8 [stop [d0, d1]]: - NEXT:[] PREV:[ret(*) l1, r(doSmth(3))] +L1: +L8 [stop [d0, d1]]: + NEXT:[] PREV:[ret(*) L1, r(doSmth(3))] error: NEXT:[] PREV:[jmp(error)] sink: @@ -1089,12 +1089,12 @@ sink: fun doSmth(i: Int) { } --------------------- -l0: +L0: NEXT:[v(i: Int)] PREV:[] v(i: Int) NEXT:[w(i)] PREV:[] w(i) NEXT:[read (Unit)] PREV:[v(i: Int)] read (Unit) NEXT:[] PREV:[w(i)] -l1: +L1: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[] diff --git a/compiler/testData/cfg/FinallyTestCopy.instructions b/compiler/testData/cfg/FinallyTestCopy.instructions index e03bde1cf0a..b6135cce62c 100644 --- a/compiler/testData/cfg/FinallyTestCopy.instructions +++ b/compiler/testData/cfg/FinallyTestCopy.instructions @@ -14,7 +14,7 @@ fun testCopy1() : Int { } } --------------------- -l0: +L0: NEXT:[r(try { doSmth() } catch (e:..)] PREV:[] r(try { doSmth() @@ -27,42 +27,42 @@ l0: } finally { return 1 - }) NEXT:[jmp?(l2 [onException])] PREV:[] - jmp?(l2 [onException]) NEXT:[jmp?(l5 [catch 0]), jmp?(l3 [onExceptionToFinallyBlock])] PREV:[r(try { doSmth() } catch (e:..)] - jmp?(l3 [onExceptionToFinallyBlock]) NEXT:[r(1), r(doSmth)] PREV:[jmp?(l2 [onException])] - r(doSmth) NEXT:[r(doSmth())] PREV:[jmp?(l3 [onExceptionToFinallyBlock])] - r(doSmth()) NEXT:[jmp(l4 [afterCatches])] PREV:[r(doSmth)] + }) NEXT:[jmp?(L2 [onException])] PREV:[] + jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[r(try { doSmth() } catch (e:..)] + jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(1), r(doSmth)] PREV:[jmp?(L2 [onException])] + r(doSmth) NEXT:[r(doSmth())] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] + r(doSmth()) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth)] d0: - jmp(l4 [afterCatches]) NEXT:[jmp(l6 [skipFinallyToErrorBlock])] PREV:[r(doSmth())] -l2 [onException]: - jmp?(l5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(l2 [onException])] - v(e: NullPointerException) NEXT:[w(e)] PREV:[jmp?(l5 [catch 0])] + jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[r(doSmth())] +L2 [onException]: + jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])] + v(e: NullPointerException) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])] w(e) NEXT:[r(doSmth1)] PREV:[v(e: NullPointerException)] r(doSmth1) NEXT:[r(doSmth1())] PREV:[w(e)] - r(doSmth1()) NEXT:[jmp(l4 [afterCatches])] PREV:[r(doSmth1)] + r(doSmth1()) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth1)] d1: - jmp(l4 [afterCatches]) NEXT:[jmp(l6 [skipFinallyToErrorBlock])] PREV:[r(doSmth1())] -l5 [catch 0]: - v(e: Exception) NEXT:[w(e)] PREV:[jmp?(l5 [catch 0])] + jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[r(doSmth1())] +L5 [catch 0]: + v(e: Exception) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])] w(e) NEXT:[r(doSmth2)] PREV:[v(e: Exception)] r(doSmth2) NEXT:[r(doSmth2())] PREV:[w(e)] - r(doSmth2()) NEXT:[jmp(l4 [afterCatches])] PREV:[r(doSmth2)] + r(doSmth2()) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth2)] d2: - jmp(l4 [afterCatches]) NEXT:[jmp(l6 [skipFinallyToErrorBlock])] PREV:[r(doSmth2())] -l4 [afterCatches]: - jmp(l6 [skipFinallyToErrorBlock]) NEXT:[r(1)] PREV:[jmp(l4 [afterCatches]), jmp(l4 [afterCatches]), jmp(l4 [afterCatches])] -l3 [onExceptionToFinallyBlock]: -l7 [start finally]: - r(1) NEXT:[ret(*) l1] PREV:[jmp?(l3 [onExceptionToFinallyBlock])] - ret(*) l1 NEXT:[] PREV:[r(1)] -l8 [finish finally]: + jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[r(doSmth2())] +L4 [afterCatches]: + jmp(L6 [skipFinallyToErrorBlock]) NEXT:[r(1)] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])] +L3 [onExceptionToFinallyBlock]: +L7 [start finally]: + r(1) NEXT:[ret(*) L1] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] + ret(*) L1 NEXT:[] PREV:[r(1)] +L8 [finish finally]: - jmp(error) NEXT:[] PREV:[] -l6 [skipFinallyToErrorBlock]: - r(1) NEXT:[ret(*) l1] PREV:[jmp(l6 [skipFinallyToErrorBlock])] - ret(*) l1 NEXT:[] PREV:[r(1)] -l1: -l9 [stop [d0, d1, d2]]: - NEXT:[] PREV:[ret(*) l1, ret(*) l1] +L6 [skipFinallyToErrorBlock]: + r(1) NEXT:[ret(*) L1] PREV:[jmp(L6 [skipFinallyToErrorBlock])] + ret(*) L1 NEXT:[] PREV:[r(1)] +L1: +L9 [stop [d0, d1, d2]]: + NEXT:[] PREV:[ret(*) L1, ret(*) L1] error: NEXT:[] PREV:[] sink: @@ -87,7 +87,7 @@ fun testCopy2() { } } --------------------- -l0: +L0: NEXT:[r(while (cond()) { try { doS..)] PREV:[] r(while (cond()) { try { @@ -104,12 +104,12 @@ l0: else continue } }) NEXT:[r(cond)] PREV:[] -l2 [loop entry point]: -l5 [condition entry point]: - r(cond) NEXT:[r(cond())] PREV:[r(while (cond()) { try { doS..), jmp(l2 [loop entry point]), jmp(l2 [loop entry point])] - r(cond()) NEXT:[jf(l3 [loop exit point])] PREV:[r(cond)] - jf(l3 [loop exit point]) NEXT:[read (Unit), r(try { doSmth() } catch (e:..)] PREV:[r(cond())] -l4 [body entry point]: +L2 [loop entry point]: +L5 [condition entry point]: + r(cond) NEXT:[r(cond())] PREV:[r(while (cond()) { try { doS..), jmp(L2 [loop entry point]), jmp(L2 [loop entry point])] + r(cond()) NEXT:[jf(L3 [loop exit point])] PREV:[r(cond)] + jf(L3 [loop exit point]) NEXT:[read (Unit), r(try { doSmth() } catch (e:..)] PREV:[r(cond())] +L4 [body entry point]: r(try { doSmth() } @@ -122,55 +122,55 @@ l4 [body entry point]: finally { if (cond()) return else continue - }) NEXT:[jmp?(l6 [onException])] PREV:[jf(l3 [loop exit point])] - jmp?(l6 [onException]) NEXT:[jmp?(l9 [catch 0]), jmp?(l7 [onExceptionToFinallyBlock])] PREV:[r(try { doSmth() } catch (e:..)] - jmp?(l7 [onExceptionToFinallyBlock]) NEXT:[r(cond), r(doSmth)] PREV:[jmp?(l6 [onException])] - r(doSmth) NEXT:[r(doSmth())] PREV:[jmp?(l7 [onExceptionToFinallyBlock])] - r(doSmth()) NEXT:[jmp(l8 [afterCatches])] PREV:[r(doSmth)] + }) NEXT:[jmp?(L6 [onException])] PREV:[jf(L3 [loop exit point])] + jmp?(L6 [onException]) NEXT:[jmp?(L9 [catch 0]), jmp?(L7 [onExceptionToFinallyBlock])] PREV:[r(try { doSmth() } catch (e:..)] + jmp?(L7 [onExceptionToFinallyBlock]) NEXT:[r(cond), r(doSmth)] PREV:[jmp?(L6 [onException])] + r(doSmth) NEXT:[r(doSmth())] PREV:[jmp?(L7 [onExceptionToFinallyBlock])] + r(doSmth()) NEXT:[jmp(L8 [afterCatches])] PREV:[r(doSmth)] d0: - jmp(l8 [afterCatches]) NEXT:[jmp(l10 [skipFinallyToErrorBlock])] PREV:[r(doSmth())] -l6 [onException]: - jmp?(l9 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(l6 [onException])] - v(e: NullPointerException) NEXT:[w(e)] PREV:[jmp?(l9 [catch 0])] + jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[r(doSmth())] +L6 [onException]: + jmp?(L9 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L6 [onException])] + v(e: NullPointerException) NEXT:[w(e)] PREV:[jmp?(L9 [catch 0])] w(e) NEXT:[r(doSmth1)] PREV:[v(e: NullPointerException)] r(doSmth1) NEXT:[r(doSmth1())] PREV:[w(e)] - r(doSmth1()) NEXT:[jmp(l8 [afterCatches])] PREV:[r(doSmth1)] + r(doSmth1()) NEXT:[jmp(L8 [afterCatches])] PREV:[r(doSmth1)] d1: - jmp(l8 [afterCatches]) NEXT:[jmp(l10 [skipFinallyToErrorBlock])] PREV:[r(doSmth1())] -l9 [catch 0]: - v(e: Exception) NEXT:[w(e)] PREV:[jmp?(l9 [catch 0])] + jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[r(doSmth1())] +L9 [catch 0]: + v(e: Exception) NEXT:[w(e)] PREV:[jmp?(L9 [catch 0])] w(e) NEXT:[r(doSmth2)] PREV:[v(e: Exception)] r(doSmth2) NEXT:[r(doSmth2())] PREV:[w(e)] - r(doSmth2()) NEXT:[jmp(l8 [afterCatches])] PREV:[r(doSmth2)] + r(doSmth2()) NEXT:[jmp(L8 [afterCatches])] PREV:[r(doSmth2)] d2: - jmp(l8 [afterCatches]) NEXT:[jmp(l10 [skipFinallyToErrorBlock])] PREV:[r(doSmth2())] -l8 [afterCatches]: - jmp(l10 [skipFinallyToErrorBlock]) NEXT:[r(cond)] PREV:[jmp(l8 [afterCatches]), jmp(l8 [afterCatches]), jmp(l8 [afterCatches])] -l7 [onExceptionToFinallyBlock]: -l11 [start finally]: - r(cond) NEXT:[r(cond())] PREV:[jmp?(l7 [onExceptionToFinallyBlock])] - r(cond()) NEXT:[jf(l12)] PREV:[r(cond)] - jf(l12) NEXT:[jmp(l2 [loop entry point]), ret l1] PREV:[r(cond())] - ret l1 NEXT:[] PREV:[jf(l12)] -- jmp(l13) NEXT:[jmp(error)] PREV:[] -l12: - jmp(l2 [loop entry point]) NEXT:[r(cond)] PREV:[jf(l12)] -l13: -l14 [finish finally]: + jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[r(doSmth2())] +L8 [afterCatches]: + jmp(L10 [skipFinallyToErrorBlock]) NEXT:[r(cond)] PREV:[jmp(L8 [afterCatches]), jmp(L8 [afterCatches]), jmp(L8 [afterCatches])] +L7 [onExceptionToFinallyBlock]: +L11 [start finally]: + r(cond) NEXT:[r(cond())] PREV:[jmp?(L7 [onExceptionToFinallyBlock])] + r(cond()) NEXT:[jf(L12)] PREV:[r(cond)] + jf(L12) NEXT:[jmp(L2 [loop entry point]), ret L1] PREV:[r(cond())] + ret L1 NEXT:[] PREV:[jf(L12)] +- jmp(L13) NEXT:[jmp(error)] PREV:[] +L12: + jmp(L2 [loop entry point]) NEXT:[r(cond)] PREV:[jf(L12)] +L13: +L14 [finish finally]: - jmp(error) NEXT:[] PREV:[] -l10 [skipFinallyToErrorBlock]: - r(cond) NEXT:[r(cond())] PREV:[jmp(l10 [skipFinallyToErrorBlock])] - r(cond()) NEXT:[jf(copy l12)] PREV:[r(cond)] - jf(copy l12) NEXT:[jmp(l2 [loop entry point]), ret l1] PREV:[r(cond())] - ret l1 NEXT:[] PREV:[jf(copy l12)] -- jmp(l13) NEXT:[jmp(error)] PREV:[] - jmp(l2 [loop entry point]) NEXT:[r(cond)] PREV:[jf(copy l12)] -l15 [stop [d0, d1, d2]]: -- jmp(l2 [loop entry point]) NEXT:[r(cond)] PREV:[] -l3 [loop exit point]: - read (Unit) NEXT:[] PREV:[jf(l3 [loop exit point])] -l1: - NEXT:[] PREV:[ret l1, ret l1, read (Unit)] +L10 [skipFinallyToErrorBlock]: + r(cond) NEXT:[r(cond())] PREV:[jmp(L10 [skipFinallyToErrorBlock])] + r(cond()) NEXT:[jf(copy L12)] PREV:[r(cond)] + jf(copy L12) NEXT:[jmp(L2 [loop entry point]), ret L1] PREV:[r(cond())] + ret L1 NEXT:[] PREV:[jf(copy L12)] +- jmp(L13) NEXT:[jmp(error)] PREV:[] + jmp(L2 [loop entry point]) NEXT:[r(cond)] PREV:[jf(copy L12)] +L15 [stop [d0, d1, d2]]: +- jmp(L2 [loop entry point]) NEXT:[r(cond)] PREV:[] +L3 [loop exit point]: + read (Unit) NEXT:[] PREV:[jf(L3 [loop exit point])] +L1: + NEXT:[] PREV:[ret L1, ret L1, read (Unit)] error: NEXT:[] PREV:[] sink: @@ -192,7 +192,7 @@ fun testCopy3() { } } --------------------- -l0: +L0: NEXT:[r(try { doSmth() } catch (e:..)] PREV:[] r(try { doSmth() @@ -205,53 +205,53 @@ l0: } finally { while (cond()); - }) NEXT:[jmp?(l2 [onException])] PREV:[] - jmp?(l2 [onException]) NEXT:[jmp?(l5 [catch 0]), jmp?(l3 [onExceptionToFinallyBlock])] PREV:[r(try { doSmth() } catch (e:..)] - jmp?(l3 [onExceptionToFinallyBlock]) NEXT:[r(while (cond())), r(doSmth)] PREV:[jmp?(l2 [onException])] - r(doSmth) NEXT:[r(doSmth())] PREV:[jmp?(l3 [onExceptionToFinallyBlock])] - r(doSmth()) NEXT:[jmp(l4 [afterCatches])] PREV:[r(doSmth)] + }) NEXT:[jmp?(L2 [onException])] PREV:[] + jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[r(try { doSmth() } catch (e:..)] + jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(while (cond())), r(doSmth)] PREV:[jmp?(L2 [onException])] + r(doSmth) NEXT:[r(doSmth())] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] + r(doSmth()) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth)] d0: - jmp(l4 [afterCatches]) NEXT:[jmp(l6 [skipFinallyToErrorBlock])] PREV:[r(doSmth())] -l2 [onException]: - jmp?(l5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(l2 [onException])] - v(e: NullPointerException) NEXT:[w(e)] PREV:[jmp?(l5 [catch 0])] + jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[r(doSmth())] +L2 [onException]: + jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])] + v(e: NullPointerException) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])] w(e) NEXT:[r(doSmth1)] PREV:[v(e: NullPointerException)] r(doSmth1) NEXT:[r(doSmth1())] PREV:[w(e)] - r(doSmth1()) NEXT:[jmp(l4 [afterCatches])] PREV:[r(doSmth1)] + r(doSmth1()) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth1)] d1: - jmp(l4 [afterCatches]) NEXT:[jmp(l6 [skipFinallyToErrorBlock])] PREV:[r(doSmth1())] -l5 [catch 0]: - v(e: Exception) NEXT:[w(e)] PREV:[jmp?(l5 [catch 0])] + jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[r(doSmth1())] +L5 [catch 0]: + v(e: Exception) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])] w(e) NEXT:[r(doSmth2)] PREV:[v(e: Exception)] r(doSmth2) NEXT:[r(doSmth2())] PREV:[w(e)] - r(doSmth2()) NEXT:[jmp(l4 [afterCatches])] PREV:[r(doSmth2)] + r(doSmth2()) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth2)] d2: - jmp(l4 [afterCatches]) NEXT:[jmp(l6 [skipFinallyToErrorBlock])] PREV:[r(doSmth2())] -l4 [afterCatches]: - jmp(l6 [skipFinallyToErrorBlock]) NEXT:[r(while (cond()))] PREV:[jmp(l4 [afterCatches]), jmp(l4 [afterCatches]), jmp(l4 [afterCatches])] -l3 [onExceptionToFinallyBlock]: -l7 [start finally]: - r(while (cond())) NEXT:[r(cond)] PREV:[jmp?(l3 [onExceptionToFinallyBlock])] -l8 [loop entry point]: -l11 [condition entry point]: - r(cond) NEXT:[r(cond())] PREV:[r(while (cond())), jmp(l8 [loop entry point])] - r(cond()) NEXT:[jf(l9 [loop exit point])] PREV:[r(cond)] - jf(l9 [loop exit point]) NEXT:[read (Unit), jmp(l8 [loop entry point])] PREV:[r(cond())] -l10 [body entry point]: - jmp(l8 [loop entry point]) NEXT:[r(cond)] PREV:[jf(l9 [loop exit point])] -l9 [loop exit point]: - read (Unit) NEXT:[jmp(error)] PREV:[jf(l9 [loop exit point])] -l12 [finish finally]: + jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[r(doSmth2())] +L4 [afterCatches]: + jmp(L6 [skipFinallyToErrorBlock]) NEXT:[r(while (cond()))] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])] +L3 [onExceptionToFinallyBlock]: +L7 [start finally]: + r(while (cond())) NEXT:[r(cond)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] +L8 [loop entry point]: +L11 [condition entry point]: + r(cond) NEXT:[r(cond())] PREV:[r(while (cond())), jmp(L8 [loop entry point])] + r(cond()) NEXT:[jf(L9 [loop exit point])] PREV:[r(cond)] + jf(L9 [loop exit point]) NEXT:[read (Unit), jmp(L8 [loop entry point])] PREV:[r(cond())] +L10 [body entry point]: + jmp(L8 [loop entry point]) NEXT:[r(cond)] PREV:[jf(L9 [loop exit point])] +L9 [loop exit point]: + read (Unit) NEXT:[jmp(error)] PREV:[jf(L9 [loop exit point])] +L12 [finish finally]: jmp(error) NEXT:[] PREV:[read (Unit)] -l6 [skipFinallyToErrorBlock]: - r(while (cond())) NEXT:[r(cond)] PREV:[jmp(l6 [skipFinallyToErrorBlock])] - r(cond) NEXT:[r(cond())] PREV:[r(while (cond())), jmp(copy l8 [loop entry point])] - r(cond()) NEXT:[jf(copy l9 [loop exit point])] PREV:[r(cond)] - jf(copy l9 [loop exit point]) NEXT:[read (Unit), jmp(copy l8 [loop entry point])] PREV:[r(cond())] - jmp(copy l8 [loop entry point]) NEXT:[r(cond)] PREV:[jf(copy l9 [loop exit point])] - read (Unit) NEXT:[] PREV:[jf(copy l9 [loop exit point])] -l1: -l13 [stop [d0, d1, d2]]: +L6 [skipFinallyToErrorBlock]: + r(while (cond())) NEXT:[r(cond)] PREV:[jmp(L6 [skipFinallyToErrorBlock])] + r(cond) NEXT:[r(cond())] PREV:[r(while (cond())), jmp(copy L8 [loop entry point])] + r(cond()) NEXT:[jf(copy L9 [loop exit point])] PREV:[r(cond)] + jf(copy L9 [loop exit point]) NEXT:[read (Unit), jmp(copy L8 [loop entry point])] PREV:[r(cond())] + jmp(copy L8 [loop entry point]) NEXT:[r(cond)] PREV:[jf(copy L9 [loop exit point])] + read (Unit) NEXT:[] PREV:[jf(copy L9 [loop exit point])] +L1: +L13 [stop [d0, d1, d2]]: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[jmp(error)] diff --git a/compiler/testData/cfg/For.instructions b/compiler/testData/cfg/For.instructions index 923a0ec3c0a..3d28a4a8af1 100644 --- a/compiler/testData/cfg/For.instructions +++ b/compiler/testData/cfg/For.instructions @@ -5,7 +5,7 @@ fun t1() { } } --------------------- -l0: +L0: NEXT:[r(for (i in 1..2) { doSmth(i..)] PREV:[] r(for (i in 1..2) { doSmth(i) @@ -15,18 +15,18 @@ l0: r(..) NEXT:[r(1..2)] PREV:[r(2)] r(1..2) NEXT:[v(i)] PREV:[r(..)] v(i) NEXT:[w(i)] PREV:[r(1..2)] - w(i) NEXT:[jmp?(l2)] PREV:[v(i)] -l3: - jmp?(l2) NEXT:[read (Unit), r(i)] PREV:[w(i)] -l4 [loop entry point]: -l5 [body entry point]: - r(i) NEXT:[r(doSmth)] PREV:[jmp?(l2), jmp?(l4 [loop entry point])] + w(i) NEXT:[jmp?(L2)] PREV:[v(i)] +L3: + jmp?(L2) NEXT:[read (Unit), r(i)] PREV:[w(i)] +L4 [loop entry point]: +L5 [body entry point]: + r(i) NEXT:[r(doSmth)] PREV:[jmp?(L2), jmp?(L4 [loop entry point])] r(doSmth) NEXT:[r(doSmth(i))] PREV:[r(i)] - r(doSmth(i)) NEXT:[jmp?(l4 [loop entry point])] PREV:[r(doSmth)] - jmp?(l4 [loop entry point]) NEXT:[r(i), read (Unit)] PREV:[r(doSmth(i))] -l2: - read (Unit) NEXT:[] PREV:[jmp?(l2), jmp?(l4 [loop entry point])] -l1: + r(doSmth(i)) NEXT:[jmp?(L4 [loop entry point])] PREV:[r(doSmth)] + jmp?(L4 [loop entry point]) NEXT:[r(i), read (Unit)] PREV:[r(doSmth(i))] +L2: + read (Unit) NEXT:[] PREV:[jmp?(L2), jmp?(L4 [loop entry point])] +L1: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[] @@ -36,12 +36,12 @@ sink: == doSmth == fun doSmth(i: Int) {} --------------------- -l0: +L0: NEXT:[v(i: Int)] PREV:[] v(i: Int) NEXT:[w(i)] PREV:[] w(i) NEXT:[read (Unit)] PREV:[v(i: Int)] read (Unit) NEXT:[] PREV:[w(i)] -l1: +L1: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[] diff --git a/compiler/testData/cfg/If.instructions b/compiler/testData/cfg/If.instructions index f23eeeeacd8..c5e473cafc5 100644 --- a/compiler/testData/cfg/If.instructions +++ b/compiler/testData/cfg/If.instructions @@ -16,36 +16,36 @@ fun t1(b: Boolean) { doSmth(r) } --------------------- -l0: +L0: NEXT:[v(b: Boolean)] PREV:[] v(b: Boolean) NEXT:[w(b)] PREV:[] w(b) NEXT:[v(var u: String)] PREV:[v(b: Boolean)] v(var u: String) NEXT:[r(b)] PREV:[w(b)] - r(b) NEXT:[jf(l2)] PREV:[v(var u: String)] - jf(l2) NEXT:[read (Unit), r("s")] PREV:[r(b)] - r("s") NEXT:[w(u)] PREV:[jf(l2)] - w(u) NEXT:[jmp(l3)] PREV:[r("s")] - jmp(l3) NEXT:[r(u)] PREV:[w(u)] -l2: - read (Unit) NEXT:[r(u)] PREV:[jf(l2)] -l3: - r(u) NEXT:[r(doSmth)] PREV:[jmp(l3), read (Unit)] + r(b) NEXT:[jf(L2)] PREV:[v(var u: String)] + jf(L2) NEXT:[read (Unit), r("s")] PREV:[r(b)] + r("s") NEXT:[w(u)] PREV:[jf(L2)] + w(u) NEXT:[jmp(L3)] PREV:[r("s")] + jmp(L3) NEXT:[r(u)] PREV:[w(u)] +L2: + read (Unit) NEXT:[r(u)] PREV:[jf(L2)] +L3: + r(u) NEXT:[r(doSmth)] PREV:[jmp(L3), read (Unit)] r(doSmth) NEXT:[r(doSmth(u))] PREV:[r(u)] r(doSmth(u)) NEXT:[v(var r: String)] PREV:[r(doSmth)] v(var r: String) NEXT:[r(b)] PREV:[r(doSmth(u))] - r(b) NEXT:[jf(l4)] PREV:[v(var r: String)] - jf(l4) NEXT:[r("t"), r("s")] PREV:[r(b)] - r("s") NEXT:[w(r)] PREV:[jf(l4)] - w(r) NEXT:[jmp(l5)] PREV:[r("s")] - jmp(l5) NEXT:[r(r)] PREV:[w(r)] -l4: - r("t") NEXT:[w(r)] PREV:[jf(l4)] + r(b) NEXT:[jf(L4)] PREV:[v(var r: String)] + jf(L4) NEXT:[r("t"), r("s")] PREV:[r(b)] + r("s") NEXT:[w(r)] PREV:[jf(L4)] + w(r) NEXT:[jmp(L5)] PREV:[r("s")] + jmp(L5) NEXT:[r(r)] PREV:[w(r)] +L4: + r("t") NEXT:[w(r)] PREV:[jf(L4)] w(r) NEXT:[r(r)] PREV:[r("t")] -l5: - r(r) NEXT:[r(doSmth)] PREV:[jmp(l5), w(r)] +L5: + r(r) NEXT:[r(doSmth)] PREV:[jmp(L5), w(r)] r(doSmth) NEXT:[r(doSmth(r))] PREV:[r(r)] r(doSmth(r)) NEXT:[] PREV:[r(doSmth)] -l1: +L1: NEXT:[] PREV:[r(doSmth(r))] error: NEXT:[] PREV:[] @@ -64,33 +64,33 @@ fun t2(b: Boolean) { } } --------------------- -l0: +L0: NEXT:[v(b: Boolean)] PREV:[] v(b: Boolean) NEXT:[w(b)] PREV:[] w(b) NEXT:[v(val i = 3)] PREV:[v(b: Boolean)] v(val i = 3) NEXT:[r(3)] PREV:[w(b)] r(3) NEXT:[w(i)] PREV:[v(val i = 3)] w(i) NEXT:[r(b)] PREV:[r(3)] - r(b) NEXT:[jf(l2)] PREV:[w(i)] - jf(l2) NEXT:[read (Unit), ret l1] PREV:[r(b)] - ret l1 NEXT:[] PREV:[jf(l2)] -- jmp(l3) NEXT:[r(i)] PREV:[] -l2: - read (Unit) NEXT:[r(i)] PREV:[jf(l2)] -l3: + r(b) NEXT:[jf(L2)] PREV:[w(i)] + jf(L2) NEXT:[read (Unit), ret L1] PREV:[r(b)] + ret L1 NEXT:[] PREV:[jf(L2)] +- jmp(L3) NEXT:[r(i)] PREV:[] +L2: + read (Unit) NEXT:[r(i)] PREV:[jf(L2)] +L3: r(i) NEXT:[r(doSmth)] PREV:[read (Unit)] r(doSmth) NEXT:[r(doSmth(i))] PREV:[r(i)] r(doSmth(i)) NEXT:[r(i)] PREV:[r(doSmth)] r(i) NEXT:[r(i is Int)] PREV:[r(doSmth(i))] - r(i is Int) NEXT:[jf(l4)] PREV:[r(i)] - jf(l4) NEXT:[read (Unit), ret l1] PREV:[r(i is Int)] - ret l1 NEXT:[] PREV:[jf(l4)] -- jmp(l5) NEXT:[] PREV:[] -l4: - read (Unit) NEXT:[] PREV:[jf(l4)] -l1: -l5: - NEXT:[] PREV:[ret l1, ret l1, read (Unit)] + r(i is Int) NEXT:[jf(L4)] PREV:[r(i)] + jf(L4) NEXT:[read (Unit), ret L1] PREV:[r(i is Int)] + ret L1 NEXT:[] PREV:[jf(L4)] +- jmp(L5) NEXT:[] PREV:[] +L4: + read (Unit) NEXT:[] PREV:[jf(L4)] +L1: +L5: + NEXT:[] PREV:[ret L1, ret L1, read (Unit)] error: NEXT:[] PREV:[] sink: @@ -99,12 +99,12 @@ sink: == doSmth == fun doSmth(s: String) {} --------------------- -l0: +L0: NEXT:[v(s: String)] PREV:[] v(s: String) NEXT:[w(s)] PREV:[] w(s) NEXT:[read (Unit)] PREV:[v(s: String)] read (Unit) NEXT:[] PREV:[w(s)] -l1: +L1: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[] diff --git a/compiler/testData/cfg/LazyBooleans.instructions b/compiler/testData/cfg/LazyBooleans.instructions index 0fd8ee339c4..00c86dc6fc5 100644 --- a/compiler/testData/cfg/LazyBooleans.instructions +++ b/compiler/testData/cfg/LazyBooleans.instructions @@ -17,59 +17,59 @@ fun lazyBooleans(a : Boolean, b : Boolean) : Unit { 14 } --------------------- -l0: +L0: NEXT:[v(a : Boolean)] PREV:[] v(a : Boolean) NEXT:[w(a)] PREV:[] w(a) NEXT:[v(b : Boolean)] PREV:[v(a : Boolean)] v(b : Boolean) NEXT:[w(b)] PREV:[w(a)] w(b) NEXT:[r(a)] PREV:[v(b : Boolean)] - r(a) NEXT:[jf(l2)] PREV:[w(b)] - jf(l2) NEXT:[r(2), r(1)] PREV:[r(a)] - r(1) NEXT:[jmp(l3)] PREV:[jf(l2)] - jmp(l3) NEXT:[r(3)] PREV:[r(1)] -l2: - r(2) NEXT:[r(3)] PREV:[jf(l2)] -l3: - r(3) NEXT:[r(a)] PREV:[jmp(l3), r(2)] - r(a) NEXT:[jf(l4)] PREV:[r(3)] - jf(l4) NEXT:[jf(l5), r(b)] PREV:[r(a)] - r(b) NEXT:[jf(l5)] PREV:[jf(l4)] -l4: - jf(l5) NEXT:[r(6), r(5)] PREV:[jf(l4), r(b)] - r(5) NEXT:[jmp(l6)] PREV:[jf(l5)] - jmp(l6) NEXT:[r(7)] PREV:[r(5)] -l5: - r(6) NEXT:[r(7)] PREV:[jf(l5)] -l6: - r(7) NEXT:[r(a)] PREV:[jmp(l6), r(6)] - r(a) NEXT:[jt(l7)] PREV:[r(7)] - jt(l7) NEXT:[r(b), jf(l8)] PREV:[r(a)] - r(b) NEXT:[jf(l8)] PREV:[jt(l7)] -l7: - jf(l8) NEXT:[r(9), r(8)] PREV:[jt(l7), r(b)] - r(8) NEXT:[jmp(l9)] PREV:[jf(l8)] - jmp(l9) NEXT:[r(10)] PREV:[r(8)] -l8: - r(9) NEXT:[r(10)] PREV:[jf(l8)] -l9: - r(10) NEXT:[r(a)] PREV:[jmp(l9), r(9)] - r(a) NEXT:[jf(l10)] PREV:[r(10)] - jf(l10) NEXT:[read (Unit), r(11)] PREV:[r(a)] - r(11) NEXT:[jmp(l11)] PREV:[jf(l10)] - jmp(l11) NEXT:[r(12)] PREV:[r(11)] -l10: - read (Unit) NEXT:[r(12)] PREV:[jf(l10)] -l11: - r(12) NEXT:[r(a)] PREV:[jmp(l11), read (Unit)] - r(a) NEXT:[jf(l12)] PREV:[r(12)] - jf(l12) NEXT:[r(13), read (Unit)] PREV:[r(a)] - read (Unit) NEXT:[jmp(l13)] PREV:[jf(l12)] - jmp(l13) NEXT:[r(14)] PREV:[read (Unit)] -l12: - r(13) NEXT:[r(14)] PREV:[jf(l12)] -l13: - r(14) NEXT:[] PREV:[jmp(l13), r(13)] -l1: + r(a) NEXT:[jf(L2)] PREV:[w(b)] + jf(L2) NEXT:[r(2), r(1)] PREV:[r(a)] + r(1) NEXT:[jmp(L3)] PREV:[jf(L2)] + jmp(L3) NEXT:[r(3)] PREV:[r(1)] +L2: + r(2) NEXT:[r(3)] PREV:[jf(L2)] +L3: + r(3) NEXT:[r(a)] PREV:[jmp(L3), r(2)] + r(a) NEXT:[jf(L4)] PREV:[r(3)] + jf(L4) NEXT:[jf(L5), r(b)] PREV:[r(a)] + r(b) NEXT:[jf(L5)] PREV:[jf(L4)] +L4: + jf(L5) NEXT:[r(6), r(5)] PREV:[jf(L4), r(b)] + r(5) NEXT:[jmp(L6)] PREV:[jf(L5)] + jmp(L6) NEXT:[r(7)] PREV:[r(5)] +L5: + r(6) NEXT:[r(7)] PREV:[jf(L5)] +L6: + r(7) NEXT:[r(a)] PREV:[jmp(L6), r(6)] + r(a) NEXT:[jt(L7)] PREV:[r(7)] + jt(L7) NEXT:[r(b), jf(L8)] PREV:[r(a)] + r(b) NEXT:[jf(L8)] PREV:[jt(L7)] +L7: + jf(L8) NEXT:[r(9), r(8)] PREV:[jt(L7), r(b)] + r(8) NEXT:[jmp(L9)] PREV:[jf(L8)] + jmp(L9) NEXT:[r(10)] PREV:[r(8)] +L8: + r(9) NEXT:[r(10)] PREV:[jf(L8)] +L9: + r(10) NEXT:[r(a)] PREV:[jmp(L9), r(9)] + r(a) NEXT:[jf(L10)] PREV:[r(10)] + jf(L10) NEXT:[read (Unit), r(11)] PREV:[r(a)] + r(11) NEXT:[jmp(L11)] PREV:[jf(L10)] + jmp(L11) NEXT:[r(12)] PREV:[r(11)] +L10: + read (Unit) NEXT:[r(12)] PREV:[jf(L10)] +L11: + r(12) NEXT:[r(a)] PREV:[jmp(L11), read (Unit)] + r(a) NEXT:[jf(L12)] PREV:[r(12)] + jf(L12) NEXT:[r(13), read (Unit)] PREV:[r(a)] + read (Unit) NEXT:[jmp(L13)] PREV:[jf(L12)] + jmp(L13) NEXT:[r(14)] PREV:[read (Unit)] +L12: + r(13) NEXT:[r(14)] PREV:[jf(L12)] +L13: + r(14) NEXT:[] PREV:[jmp(L13), r(13)] +L1: NEXT:[] PREV:[r(14)] error: NEXT:[] PREV:[] diff --git a/compiler/testData/cfg/LocalDeclarations.instructions b/compiler/testData/cfg/LocalDeclarations.instructions index 388bf6cb715..910a1b9a76f 100644 --- a/compiler/testData/cfg/LocalDeclarations.instructions +++ b/compiler/testData/cfg/LocalDeclarations.instructions @@ -17,12 +17,12 @@ class C() { } } --------------------- -l0: +L0: NEXT:[v(val a: Int = 1)] PREV:[] v(val a: Int = 1) NEXT:[r(1)] PREV:[] r(1) NEXT:[w(a)] PREV:[v(val a: Int = 1)] w(a) NEXT:[] PREV:[r(1)] -l1: +L1: NEXT:[] PREV:[w(a)] error: NEXT:[] PREV:[] @@ -32,12 +32,12 @@ sink: == doSmth == fun doSmth(i: Int) {} --------------------- -l0: +L0: NEXT:[v(i: Int)] PREV:[] v(i: Int) NEXT:[w(i)] PREV:[] w(i) NEXT:[read (Unit)] PREV:[v(i: Int)] read (Unit) NEXT:[] PREV:[w(i)] -l1: +L1: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[] @@ -54,7 +54,7 @@ fun test1() { } } --------------------- -l0: +L0: NEXT:[v(val a = object { val x : I..)] PREV:[] v(val a = object { val x : Int @@ -72,7 +72,7 @@ l0: } }) NEXT:[w(a)] PREV:[w($x)] w(a) NEXT:[] PREV:[r(object { val x : Int { $x ..)] -l1: +L1: NEXT:[] PREV:[w(a)] error: NEXT:[] PREV:[] @@ -87,12 +87,12 @@ object O { } } --------------------- -l0: +L0: NEXT:[v(val x : Int)] PREV:[] v(val x : Int) NEXT:[r(1)] PREV:[] r(1) NEXT:[w($x)] PREV:[v(val x : Int)] w($x) NEXT:[] PREV:[r(1)] -l1: +L1: NEXT:[] PREV:[w($x)] error: NEXT:[] PREV:[] @@ -107,7 +107,7 @@ fun test2() { } } --------------------- -l0: +L0: NEXT:[v(val b = 1)] PREV:[] v(val b = 1) NEXT:[r(1)] PREV:[] r(1) NEXT:[w(b)] PREV:[v(val b = 1)] @@ -122,7 +122,7 @@ l0: val x = b }) NEXT:[w(a)] PREV:[w(x)] w(a) NEXT:[] PREV:[r(object { val x = b }) ] -l1: +L1: NEXT:[] PREV:[w(a)] error: NEXT:[] PREV:[] @@ -139,7 +139,7 @@ fun test3() { } } --------------------- -l0: +L0: NEXT:[v(val a = object { val y : I..)] PREV:[] v(val a = object { val y : Int @@ -147,30 +147,30 @@ l0: y = 10 } }) NEXT:[v(val y : Int)] PREV:[] - v(val y : Int) NEXT:[jmp?(l2)] PREV:[v(val a = object { val y : I..)] - jmp?(l2) NEXT:[r(object { val y : Int fun i..), d(fun inner_bar() { y = 10 }) ] PREV:[v(val y : Int)] + v(val y : Int) NEXT:[jmp?(L2)] PREV:[v(val a = object { val y : I..)] + jmp?(L2) NEXT:[r(object { val y : Int fun i..), d(fun inner_bar() { y = 10 }) ] PREV:[v(val y : Int)] d(fun inner_bar() { y = 10 - }) NEXT:[] PREV:[jmp?(l2)] -l2: + }) NEXT:[] PREV:[jmp?(L2)] +L2: r(object { val y : Int fun inner_bar() { y = 10 } - }) NEXT:[w(a)] PREV:[jmp?(l2)] + }) NEXT:[w(a)] PREV:[jmp?(L2)] w(a) NEXT:[] PREV:[r(object { val y : Int fun i..)] -l1: +L1: NEXT:[] PREV:[w(a)] error: NEXT:[] PREV:[] sink: NEXT:[] PREV:[, , d(fun inner_bar() { y = 10 }) ] -l3: +L3: NEXT:[r(10)] PREV:[] r(10) NEXT:[w(y)] PREV:[] w(y) NEXT:[] PREV:[r(10)] -l4: +L4: NEXT:[] PREV:[w(y)] error: NEXT:[] PREV:[] @@ -182,11 +182,11 @@ fun inner_bar() { y = 10 } --------------------- -l3: +L3: NEXT:[r(10)] PREV:[] r(10) NEXT:[w(y)] PREV:[] w(y) NEXT:[] PREV:[r(10)] -l4: +L4: NEXT:[] PREV:[w(y)] error: NEXT:[] PREV:[] @@ -207,7 +207,7 @@ fun test4() { } } --------------------- -l0: +L0: NEXT:[v(val a = object { val x : I..)] PREV:[] v(val a = object { val x : Int @@ -222,12 +222,12 @@ l0: v(val x : Int) NEXT:[v(val y : Int)] PREV:[v(val a = object { val x : I..)] v(val y : Int) NEXT:[r(1)] PREV:[v(val x : Int)] r(1) NEXT:[w($x)] PREV:[v(val y : Int)] - w($x) NEXT:[jmp?(l2)] PREV:[r(1)] - jmp?(l2) NEXT:[r(object { val x : Int val y..), d(fun ggg() { y = 10 }) ] PREV:[w($x)] + w($x) NEXT:[jmp?(L2)] PREV:[r(1)] + jmp?(L2) NEXT:[r(object { val x : Int val y..), d(fun ggg() { y = 10 }) ] PREV:[w($x)] d(fun ggg() { y = 10 - }) NEXT:[] PREV:[jmp?(l2)] -l2: + }) NEXT:[] PREV:[jmp?(L2)] +L2: r(object { val x : Int val y : Int @@ -237,19 +237,19 @@ l2: fun ggg() { y = 10 } - }) NEXT:[w(a)] PREV:[jmp?(l2)] + }) NEXT:[w(a)] PREV:[jmp?(L2)] w(a) NEXT:[] PREV:[r(object { val x : Int val y..)] -l1: +L1: NEXT:[] PREV:[w(a)] error: NEXT:[] PREV:[] sink: NEXT:[] PREV:[, , d(fun ggg() { y = 10 }) ] -l3: +L3: NEXT:[r(10)] PREV:[] r(10) NEXT:[w(y)] PREV:[] w(y) NEXT:[] PREV:[r(10)] -l4: +L4: NEXT:[] PREV:[w(y)] error: NEXT:[] PREV:[] @@ -261,11 +261,11 @@ fun ggg() { y = 10 } --------------------- -l3: +L3: NEXT:[r(10)] PREV:[] r(10) NEXT:[w(y)] PREV:[] w(y) NEXT:[] PREV:[r(10)] -l4: +L4: NEXT:[] PREV:[w(y)] error: NEXT:[] PREV:[] @@ -288,7 +288,7 @@ fun test5() { } } --------------------- -l0: +L0: NEXT:[v(val a = object { var x = 1..)] PREV:[] v(val a = object { var x = 1 @@ -306,17 +306,17 @@ l0: r(1) NEXT:[w(x)] PREV:[v(var x = 1)] w(x) NEXT:[r(2)] PREV:[r(1)] r(2) NEXT:[w($x)] PREV:[w(x)] - w($x) NEXT:[jmp?(l2)] PREV:[r(2)] - jmp?(l2) NEXT:[jmp?(l5), d(fun foo() { x = 3 }) ] PREV:[w($x)] + w($x) NEXT:[jmp?(L2)] PREV:[r(2)] + jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 }) ] PREV:[w($x)] d(fun foo() { x = 3 - }) NEXT:[] PREV:[jmp?(l2)] -l2: - jmp?(l5) NEXT:[r(object { var x = 1 { $x = ..), d(fun bar() { x = 4 }) ] PREV:[jmp?(l2)] + }) NEXT:[] PREV:[jmp?(L2)] +L2: + jmp?(L5) NEXT:[r(object { var x = 1 { $x = ..), d(fun bar() { x = 4 }) ] PREV:[jmp?(L2)] d(fun bar() { x = 4 - }) NEXT:[] PREV:[jmp?(l5)] -l5: + }) NEXT:[] PREV:[jmp?(L5)] +L5: r(object { var x = 1 { @@ -328,29 +328,29 @@ l5: fun bar() { x = 4 } - }) NEXT:[w(a)] PREV:[jmp?(l5)] + }) NEXT:[w(a)] PREV:[jmp?(L5)] w(a) NEXT:[] PREV:[r(object { var x = 1 { $x = ..)] -l1: +L1: NEXT:[] PREV:[w(a)] error: NEXT:[] PREV:[] sink: NEXT:[] PREV:[, , d(fun foo() { x = 3 }) , d(fun bar() { x = 4 }) ] -l3: +L3: NEXT:[r(3)] PREV:[] r(3) NEXT:[w(x)] PREV:[] w(x) NEXT:[] PREV:[r(3)] -l4: +L4: NEXT:[] PREV:[w(x)] error: NEXT:[] PREV:[] sink: NEXT:[] PREV:[, ] -l6: +L6: NEXT:[r(4)] PREV:[] r(4) NEXT:[w(x)] PREV:[] w(x) NEXT:[] PREV:[r(4)] -l7: +L7: NEXT:[] PREV:[w(x)] error: NEXT:[] PREV:[] @@ -362,11 +362,11 @@ fun foo() { x = 3 } --------------------- -l3: +L3: NEXT:[r(3)] PREV:[] r(3) NEXT:[w(x)] PREV:[] w(x) NEXT:[] PREV:[r(3)] -l4: +L4: NEXT:[] PREV:[w(x)] error: NEXT:[] PREV:[] @@ -378,11 +378,11 @@ fun bar() { x = 4 } --------------------- -l6: +L6: NEXT:[r(4)] PREV:[] r(4) NEXT:[w(x)] PREV:[] w(x) NEXT:[] PREV:[r(4)] -l7: +L7: NEXT:[] PREV:[w(x)] error: NEXT:[] PREV:[] diff --git a/compiler/testData/cfg/MultiDecl.instructions b/compiler/testData/cfg/MultiDecl.instructions index 5282e4dc62d..92c44184b99 100644 --- a/compiler/testData/cfg/MultiDecl.instructions +++ b/compiler/testData/cfg/MultiDecl.instructions @@ -4,9 +4,9 @@ class C { fun component2() = 2 } --------------------- -l0: +L0: NEXT:[] PREV:[] -l1: +L1: NEXT:[] PREV:[] error: NEXT:[] PREV:[] @@ -19,7 +19,7 @@ fun test(c: C) { val d = 1 } --------------------- -l0: +L0: NEXT:[v(c: C)] PREV:[] v(c: C) NEXT:[w(c)] PREV:[] w(c) NEXT:[r(c)] PREV:[v(c: C)] @@ -31,7 +31,7 @@ l0: v(val d = 1) NEXT:[r(1)] PREV:[w(b)] r(1) NEXT:[w(d)] PREV:[v(val d = 1)] w(d) NEXT:[] PREV:[r(1)] -l1: +L1: NEXT:[] PREV:[w(d)] error: NEXT:[] PREV:[] diff --git a/compiler/testData/cfg/ObjectExpression.instructions b/compiler/testData/cfg/ObjectExpression.instructions index 05ebfb46f15..3d8736fdf83 100644 --- a/compiler/testData/cfg/ObjectExpression.instructions +++ b/compiler/testData/cfg/ObjectExpression.instructions @@ -3,9 +3,9 @@ trait A { fun foo() : Int } --------------------- -l0: +L0: NEXT:[] PREV:[] -l1: +L1: NEXT:[] PREV:[] error: NEXT:[] PREV:[] @@ -17,10 +17,10 @@ class B : A { override fun foo() = 10 } --------------------- -l0: +L0: NEXT:[unsupported(DELEGATOR_SUPER_CLASS : A)] PREV:[] unsupported(DELEGATOR_SUPER_CLASS : A) NEXT:[] PREV:[] -l1: +L1: NEXT:[] PREV:[unsupported(DELEGATOR_SUPER_CLASS : A)] error: NEXT:[] PREV:[] @@ -33,7 +33,7 @@ fun foo(b: B) : Int { return o.foo() } --------------------- -l0: +L0: NEXT:[v(b: B)] PREV:[] v(b: B) NEXT:[w(b)] PREV:[] w(b) NEXT:[v(val o = object : A by b {})] PREV:[v(b: B)] @@ -44,10 +44,10 @@ l0: r(o) NEXT:[r(foo)] PREV:[w(o)] r(foo) NEXT:[r(foo())] PREV:[r(o)] r(foo()) NEXT:[r(o.foo())] PREV:[r(foo)] - r(o.foo()) NEXT:[ret(*) l1] PREV:[r(foo())] - ret(*) l1 NEXT:[] PREV:[r(o.foo())] -l1: - NEXT:[] PREV:[ret(*) l1] + r(o.foo()) NEXT:[ret(*) L1] PREV:[r(foo())] + ret(*) L1 NEXT:[] PREV:[r(o.foo())] +L1: + NEXT:[] PREV:[ret(*) L1] error: NEXT:[] PREV:[] sink: diff --git a/compiler/testData/cfg/OnlyWhileInFunctionBody.instructions b/compiler/testData/cfg/OnlyWhileInFunctionBody.instructions index 407c49670e5..000accbdbd3 100644 --- a/compiler/testData/cfg/OnlyWhileInFunctionBody.instructions +++ b/compiler/testData/cfg/OnlyWhileInFunctionBody.instructions @@ -5,24 +5,24 @@ fun main() { } } --------------------- -l0: +L0: NEXT:[r(while(1 > 0) { 2 }) ] PREV:[] r(while(1 > 0) { 2 }) NEXT:[r(1)] PREV:[] -l2 [loop entry point]: -l5 [condition entry point]: - r(1) NEXT:[r(0)] PREV:[r(while(1 > 0) { 2 }) , jmp(l2 [loop entry point])] +L2 [loop entry point]: +L5 [condition entry point]: + r(1) NEXT:[r(0)] PREV:[r(while(1 > 0) { 2 }) , jmp(L2 [loop entry point])] r(0) NEXT:[r(>)] PREV:[r(1)] r(>) NEXT:[r(1 > 0)] PREV:[r(0)] - r(1 > 0) NEXT:[jf(l3 [loop exit point])] PREV:[r(>)] - jf(l3 [loop exit point]) NEXT:[read (Unit), r(2)] PREV:[r(1 > 0)] -l4 [body entry point]: - r(2) NEXT:[jmp(l2 [loop entry point])] PREV:[jf(l3 [loop exit point])] - jmp(l2 [loop entry point]) NEXT:[r(1)] PREV:[r(2)] -l3 [loop exit point]: - read (Unit) NEXT:[] PREV:[jf(l3 [loop exit point])] -l1: + r(1 > 0) NEXT:[jf(L3 [loop exit point])] PREV:[r(>)] + jf(L3 [loop exit point]) NEXT:[read (Unit), r(2)] PREV:[r(1 > 0)] +L4 [body entry point]: + r(2) NEXT:[jmp(L2 [loop entry point])] PREV:[jf(L3 [loop exit point])] + jmp(L2 [loop entry point]) NEXT:[r(1)] PREV:[r(2)] +L3 [loop exit point]: + read (Unit) NEXT:[] PREV:[jf(L3 [loop exit point])] +L1: NEXT:[] PREV:[read (Unit)] error: NEXT:[] PREV:[] @@ -35,23 +35,23 @@ fun dowhile() { while(1 > 0) } --------------------- -l0: +L0: NEXT:[r(do {return} while(1 > 0)) ] PREV:[] r(do {return} - while(1 > 0)) NEXT:[ret l1] PREV:[] -l2 [loop entry point]: -l4 [body entry point]: - ret l1 NEXT:[] PREV:[r(do {return} while(1 > 0)) ] -l5 [condition entry point]: + while(1 > 0)) NEXT:[ret L1] PREV:[] +L2 [loop entry point]: +L4 [body entry point]: + ret L1 NEXT:[] PREV:[r(do {return} while(1 > 0)) ] +L5 [condition entry point]: - r(1) NEXT:[r(0)] PREV:[] - r(0) NEXT:[r(>)] PREV:[] - r(>) NEXT:[r(1 > 0)] PREV:[] -- r(1 > 0) NEXT:[jt(l2 [loop entry point])] PREV:[] -- jt(l2 [loop entry point]) NEXT:[read (Unit), ret l1] PREV:[] -l3 [loop exit point]: +- r(1 > 0) NEXT:[jt(L2 [loop entry point])] PREV:[] +- jt(L2 [loop entry point]) NEXT:[read (Unit), ret L1] PREV:[] +L3 [loop exit point]: - read (Unit) NEXT:[] PREV:[] -l1: - NEXT:[] PREV:[ret l1] +L1: + NEXT:[] PREV:[ret L1] error: NEXT:[] PREV:[] sink: diff --git a/compiler/testData/cfg/ReturnFromExpression.instructions b/compiler/testData/cfg/ReturnFromExpression.instructions index be7801a3b2a..3de3387b5d0 100644 --- a/compiler/testData/cfg/ReturnFromExpression.instructions +++ b/compiler/testData/cfg/ReturnFromExpression.instructions @@ -3,17 +3,17 @@ fun blockAndAndMismatch() : Boolean { false || (return false) } --------------------- -l0: +L0: NEXT:[r(false)] PREV:[] - r(false) NEXT:[jt(l2)] PREV:[] - jt(l2) NEXT:[r((return false)), r(false || (return false))] PREV:[r(false)] - r((return false)) NEXT:[r(false)] PREV:[jt(l2)] - r(false) NEXT:[ret(*) l1] PREV:[r((return false))] - ret(*) l1 NEXT:[] PREV:[r(false)] -l2: - r(false || (return false)) NEXT:[] PREV:[jt(l2)] -l1: - NEXT:[] PREV:[ret(*) l1, r(false || (return false))] + r(false) NEXT:[jt(L2)] PREV:[] + jt(L2) NEXT:[r((return false)), r(false || (return false))] PREV:[r(false)] + r((return false)) NEXT:[r(false)] PREV:[jt(L2)] + r(false) NEXT:[ret(*) L1] PREV:[r((return false))] + ret(*) L1 NEXT:[] PREV:[r(false)] +L2: + r(false || (return false)) NEXT:[] PREV:[jt(L2)] +L1: + NEXT:[] PREV:[ret(*) L1, r(false || (return false))] error: NEXT:[] PREV:[] sink: diff --git a/compiler/testData/cfg/ShortFunction.instructions b/compiler/testData/cfg/ShortFunction.instructions index 138afba140a..67dc92e5df8 100644 --- a/compiler/testData/cfg/ShortFunction.instructions +++ b/compiler/testData/cfg/ShortFunction.instructions @@ -1,10 +1,10 @@ == short == fun short() = 1 --------------------- -l0: +L0: NEXT:[r(1)] PREV:[] r(1) NEXT:[] PREV:[] -l1: +L1: NEXT:[] PREV:[r(1)] error: NEXT:[] PREV:[]