From 97058e628ed888c6063919501c7276eea9a66d6f Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Wed, 12 Dec 2012 18:36:29 +0400 Subject: [PATCH] added names for loop labels updated control flow test data --- .../JetControlFlowInstructionsGenerator.java | 14 +- compiler/testData/cfg/DeadCode.instructions | 18 +- .../testData/cfg/FailFunction.instructions | 22 +- compiler/testData/cfg/Finally.instructions | 480 +++++++++--------- .../testData/cfg/FinallyTestCopy.instructions | 56 +- compiler/testData/cfg/For.instructions | 42 +- .../cfg/OnlyWhileInFunctionBody.instructions | 72 +-- 7 files changed, 350 insertions(+), 354 deletions(-) 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 0af9647a4ba..cbcc08d80f5 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 @@ -113,15 +113,15 @@ public class JetControlFlowInstructionsGenerator extends JetControlFlowBuilderAd } @Override - public final LoopInfo enterLoop(@NotNull JetExpression expression, Label loopExitPoint, Label conditionEntryPoint) { - Label label = createUnboundLabel(); - bindLabel(label); + public final LoopInfo enterLoop(@NotNull JetExpression expression, @Nullable Label loopExitPoint, Label conditionEntryPoint) { + Label loopEntryLabel = createUnboundLabel("loop entry point"); + bindLabel(loopEntryLabel); LoopInfo blockInfo = new LoopInfo( expression, - label, - loopExitPoint != null ? loopExitPoint : createUnboundLabel(), - createUnboundLabel(), - conditionEntryPoint != null ? conditionEntryPoint : createUnboundLabel()); + loopEntryLabel, + loopExitPoint != null ? loopExitPoint : createUnboundLabel("loop exit point"), + createUnboundLabel("body entry point"), + conditionEntryPoint != null ? conditionEntryPoint : createUnboundLabel("condition entry point")); loopInfo.push(blockInfo); elementToBlockInfo.put(expression, blockInfo); allBlocks.push(blockInfo); diff --git a/compiler/testData/cfg/DeadCode.instructions b/compiler/testData/cfg/DeadCode.instructions index ff25e3f0b72..ebfde2fc5c1 100644 --- a/compiler/testData/cfg/DeadCode.instructions +++ b/compiler/testData/cfg/DeadCode.instructions @@ -5,16 +5,16 @@ fun test() { } --------------------- l0: - NEXT:[r(Exception)] PREV:[] - r(Exception) NEXT:[r(Exception())] PREV:[] - r(Exception()) NEXT:[jmp(error)] PREV:[r(Exception)] - jmp(error) NEXT:[] PREV:[r(Exception())] -- r(test) NEXT:[r(test())] PREV:[] -- r(test()) NEXT:[] PREV:[] + 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: - NEXT:[] PREV:[] + NEXT:[] PREV:[] error: - NEXT:[] PREV:[jmp(error)] + NEXT:[] PREV:[throw (throw Exception())] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== diff --git a/compiler/testData/cfg/FailFunction.instructions b/compiler/testData/cfg/FailFunction.instructions index c8a3ab1c608..edb14876dc1 100644 --- a/compiler/testData/cfg/FailFunction.instructions +++ b/compiler/testData/cfg/FailFunction.instructions @@ -4,18 +4,18 @@ fun fail() : Nothing { } --------------------- l0: - NEXT:[r(java)] PREV:[] - r(java) NEXT:[r(lang)] PREV:[] - r(lang) NEXT:[r(java.lang)] PREV:[r(java)] - r(java.lang) NEXT:[r(RuntimeException)] PREV:[r(lang)] - r(RuntimeException) NEXT:[r(RuntimeException())] PREV:[r(java.lang)] - r(RuntimeException()) NEXT:[r(java.lang.RuntimeException())] PREV:[r(RuntimeException)] - r(java.lang.RuntimeException()) NEXT:[jmp(error)] PREV:[r(RuntimeException())] - jmp(error) NEXT:[] PREV:[r(java.lang.RuntimeException())] + NEXT:[r(java)] PREV:[] + r(java) NEXT:[r(lang)] PREV:[] + r(lang) NEXT:[r(java.lang)] PREV:[r(java)] + r(java.lang) NEXT:[r(RuntimeException)] PREV:[r(lang)] + r(RuntimeException) NEXT:[r(RuntimeException())] PREV:[r(java.lang)] + 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: - NEXT:[] PREV:[] + NEXT:[] PREV:[] error: - NEXT:[] PREV:[jmp(error)] + NEXT:[] PREV:[throw (throw java.lang.RuntimeException())] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== diff --git a/compiler/testData/cfg/Finally.instructions b/compiler/testData/cfg/Finally.instructions index 535e521f2e2..95084d29498 100644 --- a/compiler/testData/cfg/Finally.instructions +++ b/compiler/testData/cfg/Finally.instructions @@ -352,10 +352,10 @@ l0: 2 } }) NEXT:[r(true)] PREV:[] -l2: -l5: - r(true) NEXT:[r(try { 1 if (2 > 3) { break..)] PREV:[r(while(true) { try { 1 if (..), jmp(l2)] -l4: +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) { @@ -372,9 +372,9 @@ l4: 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)] PREV:[jf(l7)] + r(2) NEXT:[jmp(l3 [loop exit point])] PREV:[jf(l7)] l9 [finish finally]: - jmp(l3) NEXT:[read (Unit)] PREV:[r(2)] + 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)] @@ -385,11 +385,11 @@ l6 [onExceptionToFinallyBlock]: r(2) NEXT:[jmp(error)] PREV:[jmp?(l6 [onExceptionToFinallyBlock])] jmp(error) NEXT:[] PREV:[r(2)] l11 [skipFinallyToErrorBlock]: - r(2) NEXT:[jmp(l2)] PREV:[jmp(l11 [skipFinallyToErrorBlock])] + r(2) NEXT:[jmp(l2 [loop entry point])] PREV:[jmp(l11 [skipFinallyToErrorBlock])] l12 [stop [d0]]: - jmp(l2) NEXT:[r(true)] PREV:[r(2)] -l3: - read (Unit) NEXT:[] PREV:[jmp(l3)] + 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: @@ -413,7 +413,7 @@ fun t6() { } --------------------- l0: - NEXT:[r(try { @ while(true) { 1 if..)] PREV:[] + NEXT:[r(try { @ while(true) { 1 if..)] PREV:[] r(try { @ while(true) { 1 @@ -424,49 +424,49 @@ 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: -l6: - r(true) NEXT:[r(1)] PREV:[r(while(true) { 1 if (2 > 3)..), jmp(l3)] -l5: - 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)] PREV:[r(2 > 3)] - jmp(l4) NEXT:[read (Unit)] PREV:[jf(l7)] -- jmp(l8) NEXT:[jmp(l3)] PREV:[] + }) 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)] PREV:[jf(l7)] + read (Unit) NEXT:[jmp(l3 [loop entry point])] PREV:[jf(l7)] l8: - jmp(l3) NEXT:[r(true)] PREV:[read (Unit)] -l4: - read (Unit) NEXT:[r(5)] PREV:[jmp(l4)] - r(5) NEXT:[jmp(l9 [skipFinallyToErrorBlock])] PREV:[read (Unit)] + 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)] + jmp(l9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r(5)] l2 [onExceptionToFinallyBlock]: l10 [start finally]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] + r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] l11 [finish finally]: - jmp(error) NEXT:[] PREV:[r(2)] + jmp(error) NEXT:[] PREV:[r(2)] l9 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l9 [skipFinallyToErrorBlock])] + r(2) NEXT:[] PREV:[jmp(l9 [skipFinallyToErrorBlock])] l1: l12 [stop [d0]]: - NEXT:[] PREV:[r(2)] + NEXT:[] PREV:[r(2)] error: - NEXT:[] PREV:[jmp(error)] + NEXT:[] PREV:[jmp(error)] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== == t7 == fun t7() { @@ -483,7 +483,7 @@ fun t7() { } --------------------- l0: - NEXT:[r(try { @ while(true) { 1 if..)] PREV:[] + NEXT:[r(try { @ while(true) { 1 if..)] PREV:[] r(try { @ while(true) { 1 @@ -493,48 +493,48 @@ 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: -l6: - r(true) NEXT:[r(1)] PREV:[r(while(true) { 1 if (2 > 3)..), jmp(l3)] -l5: - 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)] PREV:[r(2 > 3)] - jmp(l4) NEXT:[read (Unit)] PREV:[jf(l7)] -- jmp(l8) NEXT:[jmp(l3)] PREV:[] + }) 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)] PREV:[jf(l7)] + read (Unit) NEXT:[jmp(l3 [loop entry point])] PREV:[jf(l7)] l8: - jmp(l3) NEXT:[r(true)] PREV:[read (Unit)] -l4: - read (Unit) NEXT:[jmp(l9 [skipFinallyToErrorBlock])] PREV:[jmp(l4)] + 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)] + jmp(l9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] l2 [onExceptionToFinallyBlock]: l10 [start finally]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] + r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] l11 [finish finally]: - jmp(error) NEXT:[] PREV:[r(2)] + jmp(error) NEXT:[] PREV:[r(2)] l9 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l9 [skipFinallyToErrorBlock])] + r(2) NEXT:[] PREV:[jmp(l9 [skipFinallyToErrorBlock])] l1: l12 [stop [d0]]: - NEXT:[] PREV:[r(2)] + NEXT:[] PREV:[r(2)] error: - NEXT:[] PREV:[jmp(error)] + NEXT:[] PREV:[jmp(error)] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== == t8 == fun t8(a : Int) { @@ -572,8 +572,8 @@ l0: 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: -l5: +l4 [loop entry point]: +l5 [body entry point]: r(try { 1 if (2 > 3) { @@ -581,7 +581,7 @@ l5: } } finally { 2 - }) NEXT:[jmp?(l6 [onExceptionToFinallyBlock])] PREV:[jmp?(l2), jmp(l4), jmp?(l4)] + }) 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)] @@ -590,9 +590,9 @@ l5: 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)] PREV:[jf(l7)] + r(2) NEXT:[jmp(l4 [loop entry point])] PREV:[jf(l7)] l9 [finish finally]: - jmp(l4) NEXT:[r(try { 1 if (2 > 3) { conti..)] PREV:[r(2)] + 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)] @@ -603,11 +603,11 @@ l6 [onExceptionToFinallyBlock]: r(2) NEXT:[jmp(error)] PREV:[jmp?(l6 [onExceptionToFinallyBlock])] jmp(error) NEXT:[] PREV:[r(2)] l11 [skipFinallyToErrorBlock]: - r(2) NEXT:[jmp?(l4)] PREV:[jmp(l11 [skipFinallyToErrorBlock])] + r(2) NEXT:[jmp?(l4 [loop entry point])] PREV:[jmp(l11 [skipFinallyToErrorBlock])] l12 [stop [d0]]: - jmp?(l4) NEXT:[r(try { 1 if (2 > 3) { conti..), read (Unit)] PREV:[r(2)] + 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)] + read (Unit) NEXT:[] PREV:[jmp?(l2), jmp?(l4 [loop entry point])] l1: NEXT:[] PREV:[read (Unit)] error: @@ -631,9 +631,9 @@ fun t9(a : Int) { } --------------------- 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)] + 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)] r(try { @ for (i in 1..a) { 1 @@ -644,55 +644,55 @@ 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])] - 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)] + }) 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: -l6: - r(1) NEXT:[r(2)] PREV:[jmp?(l3), jmp(l5), jmp?(l5)] - 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)] PREV:[r(2 > 3)] - jmp(l5) NEXT:[r(1)] PREV:[jf(l7)] -- jmp(l8) NEXT:[jmp?(l5)] PREV:[] + 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)] PREV:[jf(l7)] + read (Unit) NEXT:[jmp?(l5 [loop entry point])] PREV:[jf(l7)] l8: - jmp?(l5) NEXT:[r(1), read (Unit)] PREV:[read (Unit)] + jmp?(l5 [loop entry point]) NEXT:[r(1), read (Unit)] PREV:[read (Unit)] l3: - read (Unit) NEXT:[r(5)] PREV:[jmp?(l3), jmp?(l5)] - r(5) NEXT:[jmp(l9 [skipFinallyToErrorBlock])] PREV:[read (Unit)] + 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)] + jmp(l9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r(5)] l2 [onExceptionToFinallyBlock]: l10 [start finally]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] + r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] l11 [finish finally]: - jmp(error) NEXT:[] PREV:[r(2)] + jmp(error) NEXT:[] PREV:[r(2)] l9 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l9 [skipFinallyToErrorBlock])] + r(2) NEXT:[] PREV:[jmp(l9 [skipFinallyToErrorBlock])] l1: l12 [stop [d0]]: - NEXT:[] PREV:[r(2)] + NEXT:[] PREV:[r(2)] error: - NEXT:[] PREV:[jmp(error)] + NEXT:[] PREV:[jmp(error)] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== == t10 == fun t10(a : Int) { @@ -709,9 +709,9 @@ fun t10(a : Int) { } --------------------- 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)] + 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)] r(try { @ for (i in 1..a) { 1 @@ -721,54 +721,54 @@ 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])] - 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)] + }) 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: -l6: - r(1) NEXT:[r(2)] PREV:[jmp?(l3), jmp(l5), jmp?(l5)] - 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)] PREV:[r(2 > 3)] - jmp(l5) NEXT:[r(1)] PREV:[jf(l7)] -- jmp(l8) NEXT:[jmp?(l5)] PREV:[] + 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)] PREV:[jf(l7)] + read (Unit) NEXT:[jmp?(l5 [loop entry point])] PREV:[jf(l7)] l8: - jmp?(l5) NEXT:[r(1), read (Unit)] PREV:[read (Unit)] + 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)] + read (Unit) NEXT:[jmp(l9 [skipFinallyToErrorBlock])] PREV:[jmp?(l3), jmp?(l5 [loop entry point])] d0: - jmp(l9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] + jmp(l9 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] l2 [onExceptionToFinallyBlock]: l10 [start finally]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] + r(2) NEXT:[jmp(error)] PREV:[jmp?(l2 [onExceptionToFinallyBlock])] l11 [finish finally]: - jmp(error) NEXT:[] PREV:[r(2)] + jmp(error) NEXT:[] PREV:[r(2)] l9 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(l9 [skipFinallyToErrorBlock])] + r(2) NEXT:[] PREV:[jmp(l9 [skipFinallyToErrorBlock])] l1: l12 [stop [d0]]: - NEXT:[] PREV:[r(2)] + NEXT:[] PREV:[r(2)] error: - NEXT:[] PREV:[jmp(error)] + NEXT:[] PREV:[jmp(error)] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== == t11 == fun t11() { @@ -871,7 +871,7 @@ fun t13() : Int { } --------------------- l0: - NEXT:[r(try { return 1 } catch (e:..)] PREV:[] + NEXT:[r(try { return 1 } catch (e:..)] PREV:[] r(try { return 1 } @@ -880,45 +880,44 @@ l0: } finally { doSmth(3) - }) NEXT:[jmp?(l2 [onException])] PREV:[] - jmp?(l2 [onException]) NEXT:[jmp?(), 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])] + }) 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)] + 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))] + ret(*) l1 NEXT:[] PREV:[r(doSmth(3))] d0: -- jmp(l6 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] +- jmp(l6 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] l2 [onException]: - jmp?() NEXT:[v(e: UnsupportedOperationException)] PREV:[jmp?(l2 [onException])] - v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?()] - 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)] + 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)] d1: - jmp(l6 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[r(doSmth(2))] + jmp(l6 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[r(doSmth(2))] l6 [afterCatches]: - jmp(l7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[jmp(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))] + 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])] - r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] - r(doSmth(3)) NEXT:[] PREV:[r(doSmth)] + 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))] + NEXT:[] PREV:[ret(*) l1, r(doSmth(3))] error: - NEXT:[] PREV:[jmp(error)] + NEXT:[] PREV:[jmp(error)] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== == t14 == fun t14() : Int { @@ -931,35 +930,34 @@ fun t14() : Int { } --------------------- l0: - NEXT:[r(try { return 1 } catch (e:..)] PREV:[] + 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:[jmp?(), 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:[] +- jmp(l3 [afterCatches]) NEXT:[] PREV:[] l2 [onException]: - jmp?() NEXT:[v(e: UnsupportedOperationException)] PREV:[jmp?(l2 [onException])] - v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?()] - 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)] + 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)] d1: - jmp(l3 [afterCatches]) NEXT:[] PREV:[r(doSmth(2))] + jmp(l3 [afterCatches]) NEXT:[] PREV:[r(doSmth(2))] l1: l3 [afterCatches]: l4 [stop [d0, d1]]: - NEXT:[] PREV:[ret(*) l1, jmp(l3 [afterCatches])] + NEXT:[] PREV:[ret(*) l1, jmp(l3 [afterCatches])] error: - NEXT:[] PREV:[] + NEXT:[] PREV:[] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== == t15 == fun t15() : Int { @@ -975,7 +973,7 @@ fun t15() : Int { } --------------------- l0: - NEXT:[r(try { return 1 } catch (e:..)] PREV:[] + NEXT:[r(try { return 1 } catch (e:..)] PREV:[] r(try { return 1 } @@ -984,47 +982,46 @@ l0: } finally { doSmth(3) - }) NEXT:[jmp?(l2 [onException])] PREV:[] - jmp?(l2 [onException]) NEXT:[jmp?(), 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])] + }) 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)] + 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))] + ret(*) l1 NEXT:[] PREV:[r(doSmth(3))] d0: -- jmp(l6 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] +- jmp(l6 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] l2 [onException]: - jmp?() NEXT:[v(e: UnsupportedOperationException)] PREV:[jmp?(l2 [onException])] - v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?()] - 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))] + 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))] d1: -- jmp(l6 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] +- jmp(l6 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] l6 [afterCatches]: -- jmp(l7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[] +- 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))] + 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:[] -- r(doSmth) NEXT:[r(doSmth(3))] PREV:[] -- r(doSmth(3)) NEXT:[] PREV:[] +- 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] + NEXT:[] PREV:[ret(*) l1, ret(*) l1] error: - NEXT:[] PREV:[jmp(error)] + NEXT:[] PREV:[jmp(error)] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== == t16 == fun t16() : Int { @@ -1040,7 +1037,7 @@ fun t16() : Int { } --------------------- l0: - NEXT:[r(try { doSmth(1) } catch (e..)] PREV:[] + NEXT:[r(try { doSmth(1) } catch (e..)] PREV:[] r(try { doSmth(1) } @@ -1049,45 +1046,44 @@ l0: } finally { doSmth(3) - }) NEXT:[jmp?(l2 [onException])] PREV:[] - jmp?(l2 [onException]) NEXT:[jmp?(), 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)] + }) 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)] d0: - jmp(l4 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[r(doSmth(1))] + jmp(l4 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[r(doSmth(1))] l2 [onException]: - jmp?() NEXT:[v(e: UnsupportedOperationException)] PREV:[jmp?(l2 [onException])] - v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?()] - w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)] - r(2) NEXT:[r(3)] PREV:[w(e)] + 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]: - 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)] + 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))] + ret(*) l1 NEXT:[] PREV:[r(doSmth(3))] d1: -- jmp(l4 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] +- jmp(l4 [afterCatches]) NEXT:[jmp(l7 [skipFinallyToErrorBlock])] PREV:[] l4 [afterCatches]: - jmp(l7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[jmp(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))] + 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])] - r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] - r(doSmth(3)) NEXT:[] PREV:[r(doSmth)] + 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))] + NEXT:[] PREV:[ret(*) l1, r(doSmth(3))] error: - NEXT:[] PREV:[jmp(error)] + NEXT:[] PREV:[jmp(error)] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== == doSmth == fun doSmth(i: Int) { diff --git a/compiler/testData/cfg/FinallyTestCopy.instructions b/compiler/testData/cfg/FinallyTestCopy.instructions index 3aae1c0d8aa..e03bde1cf0a 100644 --- a/compiler/testData/cfg/FinallyTestCopy.instructions +++ b/compiler/testData/cfg/FinallyTestCopy.instructions @@ -104,12 +104,12 @@ l0: else continue } }) NEXT:[r(cond)] PREV:[] -l2: -l5: - r(cond) NEXT:[r(cond())] PREV:[r(while (cond()) { try { doS..), jmp(l2), jmp(l2)] - r(cond()) NEXT:[jf(l3)] PREV:[r(cond)] - jf(l3) NEXT:[read (Unit), r(try { doSmth() } catch (e:..)] PREV:[r(cond())] -l4: +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,7 +122,7 @@ l4: finally { if (cond()) return else continue - }) NEXT:[jmp?(l6 [onException])] PREV:[jf(l3)] + }) 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])] @@ -150,25 +150,25 @@ 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), ret l1] 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) NEXT:[r(cond)] PREV:[jf(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), ret l1] 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) NEXT:[r(cond)] PREV:[jf(copy l12)] + jmp(l2 [loop entry point]) NEXT:[r(cond)] PREV:[jf(copy l12)] l15 [stop [d0, d1, d2]]: -- jmp(l2) NEXT:[r(cond)] PREV:[] -l3: - read (Unit) NEXT:[] PREV:[jf(l3)] +- 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: @@ -232,24 +232,24 @@ l4 [afterCatches]: l3 [onExceptionToFinallyBlock]: l7 [start finally]: r(while (cond())) NEXT:[r(cond)] PREV:[jmp?(l3 [onExceptionToFinallyBlock])] -l8: -l11: - r(cond) NEXT:[r(cond())] PREV:[r(while (cond())), jmp(l8)] - r(cond()) NEXT:[jf(l9)] PREV:[r(cond)] - jf(l9) NEXT:[read (Unit), jmp(l8)] PREV:[r(cond())] -l10: - jmp(l8) NEXT:[r(cond)] PREV:[jf(l9)] -l9: - read (Unit) NEXT:[jmp(error)] PREV:[jf(l9)] +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)] - r(cond()) NEXT:[jf(copy l9)] PREV:[r(cond)] - jf(copy l9) NEXT:[read (Unit), jmp(copy l8)] PREV:[r(cond())] - jmp(copy l8) NEXT:[r(cond)] PREV:[jf(copy l9)] - read (Unit) NEXT:[] PREV:[jf(copy l9)] + 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)] diff --git a/compiler/testData/cfg/For.instructions b/compiler/testData/cfg/For.instructions index f0935934a8b..923a0ec3c0a 100644 --- a/compiler/testData/cfg/For.instructions +++ b/compiler/testData/cfg/For.instructions @@ -6,32 +6,32 @@ fun t1() { } --------------------- l0: - NEXT:[r(for (i in 1..2) { doSmth(i..)] PREV:[] - r(for (i in 1..2) { - doSmth(i) - }) NEXT:[r(1)] PREV:[] - r(1) NEXT:[r(2)] PREV:[r(for (i in 1..2) { doSmth(i..)] - r(2) NEXT:[r(..)] PREV:[r(1)] - 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)] + NEXT:[r(for (i in 1..2) { doSmth(i..)] PREV:[] + r(for (i in 1..2) { + doSmth(i) + }) NEXT:[r(1)] PREV:[] + r(1) NEXT:[r(2)] PREV:[r(for (i in 1..2) { doSmth(i..)] + r(2) NEXT:[r(..)] PREV:[r(1)] + 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: -l5: - r(i) NEXT:[r(doSmth)] PREV:[jmp?(l2), jmp?(l4)] - r(doSmth) NEXT:[r(doSmth(i))] PREV:[r(i)] - r(doSmth(i)) NEXT:[jmp?(l4)] PREV:[r(doSmth)] - jmp?(l4) NEXT:[r(i), read (Unit)] PREV:[r(doSmth(i))] + 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)] + read (Unit) NEXT:[] PREV:[jmp?(l2), jmp?(l4 [loop entry point])] l1: - NEXT:[] PREV:[read (Unit)] + NEXT:[] PREV:[read (Unit)] error: - NEXT:[] PREV:[] + NEXT:[] PREV:[] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== == doSmth == fun doSmth(i: Int) {} diff --git a/compiler/testData/cfg/OnlyWhileInFunctionBody.instructions b/compiler/testData/cfg/OnlyWhileInFunctionBody.instructions index 9d51f4a9e6a..407c49670e5 100644 --- a/compiler/testData/cfg/OnlyWhileInFunctionBody.instructions +++ b/compiler/testData/cfg/OnlyWhileInFunctionBody.instructions @@ -6,28 +6,28 @@ fun main() { } --------------------- l0: - NEXT:[r(while(1 > 0) { 2 }) ] PREV:[] - r(while(1 > 0) { - 2 - }) NEXT:[r(1)] PREV:[] -l2: -l5: - r(1) NEXT:[r(0)] PREV:[r(while(1 > 0) { 2 }) , jmp(l2)] - r(0) NEXT:[r(>)] PREV:[r(1)] - r(>) NEXT:[r(1 > 0)] PREV:[r(0)] - r(1 > 0) NEXT:[jf(l3)] PREV:[r(>)] - jf(l3) NEXT:[read (Unit), r(2)] PREV:[r(1 > 0)] -l4: - r(2) NEXT:[jmp(l2)] PREV:[jf(l3)] - jmp(l2) NEXT:[r(1)] PREV:[r(2)] -l3: - read (Unit) NEXT:[] PREV:[jf(l3)] + 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])] + 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: - NEXT:[] PREV:[read (Unit)] + NEXT:[] PREV:[read (Unit)] error: - NEXT:[] PREV:[] + NEXT:[] PREV:[] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== == dowhile == fun dowhile() { @@ -36,24 +36,24 @@ fun dowhile() { } --------------------- l0: - NEXT:[r(do {return} while(1 > 0)) ] PREV:[] - r(do {return} - while(1 > 0)) NEXT:[ret l1] PREV:[] -l2: -l4: - ret l1 NEXT:[] PREV:[r(do {return} while(1 > 0)) ] -l5: -- r(1) NEXT:[r(0)] PREV:[] -- r(0) NEXT:[r(>)] PREV:[] -- r(>) NEXT:[r(1 > 0)] PREV:[] -- r(1 > 0) NEXT:[jt(l2)] PREV:[] -- jt(l2) NEXT:[read (Unit), ret l1] PREV:[] -l3: -- read (Unit) NEXT:[] PREV:[] + 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]: +- 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]: +- read (Unit) NEXT:[] PREV:[] l1: - NEXT:[] PREV:[ret l1] + NEXT:[] PREV:[ret l1] error: - NEXT:[] PREV:[] + NEXT:[] PREV:[] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] =====================