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 92768a4cd75..3b3ef24a9b4 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 @@ -117,8 +117,8 @@ public class JetControlFlowInstructionsGenerator extends JetControlFlowBuilderAd private JetControlFlowInstructionsGeneratorWorker(@NotNull JetElement scopingElement, @NotNull JetElement returnSubroutine) { this.pseudocode = new PseudocodeImpl(scopingElement); - this.error = pseudocode.createLabel("error"); - this.sink = pseudocode.createLabel("sink"); + this.error = pseudocode.createLabel("error", null); + this.sink = pseudocode.createLabel("sink", null); this.returnSubroutine = returnSubroutine; } @@ -133,29 +133,28 @@ public class JetControlFlowInstructionsGenerator extends JetControlFlowBuilderAd @NotNull @Override public final Label createUnboundLabel() { - return pseudocode.createLabel("L" + labelCount++); + return pseudocode.createLabel("L" + labelCount++, null); } @NotNull @Override public Label createUnboundLabel(@NotNull String name) { - return pseudocode.createLabel("L" + labelCount++ + " [" + name + "]"); + return pseudocode.createLabel("L" + labelCount++, name); } @NotNull @Override public final LoopInfo enterLoop(@NotNull JetLoopExpression expression) { - Label loopEntryLabel = createUnboundLabel("loop entry point"); - bindLabel(loopEntryLabel); - LoopInfo blockInfo = new LoopInfo( + LoopInfo info = new LoopInfo( expression, - loopEntryLabel, + createUnboundLabel("loop entry point"), createUnboundLabel("loop exit point"), createUnboundLabel("body entry point"), createUnboundLabel("body exit point"), createUnboundLabel("condition entry point")); - elementToBlockInfo.put(expression, blockInfo); - return blockInfo; + bindLabel(info.getEntryPoint()); + elementToBlockInfo.put(expression, info); + return info; } @Override @@ -181,12 +180,13 @@ public class JetControlFlowInstructionsGenerator extends JetControlFlowBuilderAd @Override public void enterSubroutine(@NotNull JetElement subroutine) { - Label entryPoint = createUnboundLabel(); - BreakableBlockInfo blockInfo = new BreakableBlockInfo(subroutine, entryPoint, createUnboundLabel()); -// subroutineInfo.push(blockInfo); + BreakableBlockInfo blockInfo = new BreakableBlockInfo( + subroutine, + /* entry point */ createUnboundLabel(), + /* exit point */ createUnboundLabel()); elementToBlockInfo.put(subroutine, blockInfo); allBlocks.push(blockInfo); - bindLabel(entryPoint); + bindLabel(blockInfo.getEntryPoint()); add(new SubroutineEnterInstruction(subroutine, getCurrentScope())); } @@ -408,7 +408,7 @@ public class JetControlFlowInstructionsGenerator extends JetControlFlowBuilderAd @Override public void repeatPseudocode(@NotNull Label startLabel, @NotNull Label finishLabel) { - pseudocode.repeatPart(startLabel, finishLabel); + labelCount = pseudocode.repeatPart(startLabel, finishLabel, labelCount); } @NotNull diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/PseudocodeImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/PseudocodeImpl.java index deb950e0cfc..06037af052c 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/PseudocodeImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/PseudocodeImpl.java @@ -23,7 +23,6 @@ import kotlin.KotlinPackage; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.cfg.Label; -import org.jetbrains.jet.lang.cfg.LoopInfo; import org.jetbrains.jet.lang.cfg.pseudocode.instructions.*; import org.jetbrains.jet.lang.cfg.pseudocode.instructions.eval.MergeInstruction; import org.jetbrains.jet.lang.cfg.pseudocode.instructions.jumps.AbstractJumpInstruction; @@ -35,7 +34,6 @@ import org.jetbrains.jet.lang.cfg.pseudocode.instructions.special.SubroutineExit import org.jetbrains.jet.lang.cfg.pseudocode.instructions.special.SubroutineSinkInstruction; import org.jetbrains.jet.lang.cfg.pseudocodeTraverser.PseudocodeTraverserPackage; import org.jetbrains.jet.lang.psi.JetElement; -import org.jetbrains.jet.lang.psi.JetExpression; import java.util.*; @@ -46,11 +44,13 @@ public class PseudocodeImpl implements Pseudocode { public class PseudocodeLabel implements Label { private final String name; + private final String comment; private Integer targetInstructionIndex; - private PseudocodeLabel(String name) { + private PseudocodeLabel(@NotNull String name, @Nullable String comment) { this.name = name; + this.comment = comment; } @NotNull @@ -61,7 +61,7 @@ public class PseudocodeImpl implements Pseudocode { @Override public String toString() { - return name; + return comment == null ? name : (name + " [" + comment + "]"); } public Integer getTargetInstructionIndex() { @@ -83,8 +83,8 @@ public class PseudocodeImpl implements Pseudocode { return mutableInstructionList.get(targetInstructionIndex); } - public Label copy() { - return new PseudocodeLabel("copy " + name); + public PseudocodeLabel copy(int newLabelIndex) { + return new PseudocodeLabel("L" + newLabelIndex, "copy of " + name + ", " + comment); } } @@ -161,8 +161,8 @@ public class PseudocodeImpl implements Pseudocode { return this; } - /*package*/ PseudocodeLabel createLabel(String name) { - PseudocodeLabel label = new PseudocodeLabel(name); + /*package*/ PseudocodeLabel createLabel(@NotNull String name, @Nullable String comment) { + PseudocodeLabel label = new PseudocodeLabel(name, comment); labels.add(label); return label; } @@ -454,7 +454,7 @@ public class PseudocodeImpl implements Pseudocode { return mutableInstructionList.get(targetPosition); } - public void repeatPart(@NotNull Label startLabel, @NotNull Label finishLabel) { + public int repeatPart(@NotNull Label startLabel, @NotNull Label finishLabel, int labelCount) { Integer startIndex = ((PseudocodeLabel) startLabel).getTargetInstructionIndex(); assert startIndex != null; Integer finishIndex = ((PseudocodeLabel) finishLabel).getTargetInstructionIndex(); @@ -468,7 +468,7 @@ public class PseudocodeImpl implements Pseudocode { if (label == startLabel || label == finishLabel) continue; if (startIndex <= index && index <= finishIndex) { - originalToCopy.put(label, label.copy()); + originalToCopy.put(label, label.copy(labelCount++)); originalLabelsForInstruction.put(getJumpTarget(label), label); } } @@ -478,6 +478,7 @@ public class PseudocodeImpl implements Pseudocode { addInstruction(copyInstruction(originalInstruction, originalToCopy)); } repeatLabelsBindingForInstruction(mutableInstructionList.get(finishIndex), originalToCopy, originalLabelsForInstruction); + return labelCount; } private void repeatLabelsBindingForInstruction( diff --git a/compiler/testData/cfg-variables/basic/IfWithUninitialized.instructions b/compiler/testData/cfg-variables/basic/IfWithUninitialized.instructions index 0a97ac8e605..1acb1c96283 100644 --- a/compiler/testData/cfg-variables/basic/IfWithUninitialized.instructions +++ b/compiler/testData/cfg-variables/basic/IfWithUninitialized.instructions @@ -18,12 +18,12 @@ L0: r(2) -> mark(1 < 2) call(1 < 2, compareTo|, ) -> - jf(L2 [else branch]|) + jf(L2|) 3 mark({ use(b) }) USE: in: {b=READ} out: {b=READ} r(b) -> USE: in: {} out: {b=READ} mark(use(b)) call(use(b), use|) -> - 2 jmp(L3 ['if' expression result]) USE: in: {} out: {} + 2 jmp(L3) USE: in: {} out: {} L2 [else branch]: 3 mark({ b = true }) r(true) -> USE: in: {b=ONLY_WRITTEN_NEVER_READ} out: {b=ONLY_WRITTEN_NEVER_READ} diff --git a/compiler/testData/cfg-variables/basic/InitializedNotDeclared.instructions b/compiler/testData/cfg-variables/basic/InitializedNotDeclared.instructions index a716a24cddd..c754a9b528c 100644 --- a/compiler/testData/cfg-variables/basic/InitializedNotDeclared.instructions +++ b/compiler/testData/cfg-variables/basic/InitializedNotDeclared.instructions @@ -19,4 +19,4 @@ error: INIT: in: {} out: {} sink: INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {} -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.instructions b/compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.instructions index 592a7c93e87..9fdc0fd55f3 100644 --- a/compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.instructions +++ b/compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.instructions @@ -15,7 +15,7 @@ L0: w(a|) INIT: in: {a=D} out: {a=ID} v(val f = { (x: Int) -> val y = x + a use(a) }) INIT: in: {a=ID} out: {a=ID, f=D} mark({ (x: Int) -> val y = x + a use(a) }) INIT: in: {a=ID, f=D} out: {a=ID, f=D} - jmp?(L2 [after local declaration]) + jmp?(L2) d({ (x: Int) -> val y = x + a use(a) }) USE: in: {a=READ} out: {a=READ} L2 [after local declaration]: r({ (x: Int) -> val y = x + a use(a) }) -> @@ -72,4 +72,4 @@ error: INIT: in: {} out: {} sink: INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg-variables/basic/VariablesInitialization.instructions b/compiler/testData/cfg-variables/basic/VariablesInitialization.instructions index f30c28f4fe3..9774487df54 100644 --- a/compiler/testData/cfg-variables/basic/VariablesInitialization.instructions +++ b/compiler/testData/cfg-variables/basic/VariablesInitialization.instructions @@ -64,4 +64,4 @@ error: INIT: in: {} out: {} sink: INIT: in: {c=D} out: {c=D} USE: in: {} out: {} -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg-variables/basic/VariablesUsage.instructions b/compiler/testData/cfg-variables/basic/VariablesUsage.instructions index cf94aadd51c..a6c1c962f94 100644 --- a/compiler/testData/cfg-variables/basic/VariablesUsage.instructions +++ b/compiler/testData/cfg-variables/basic/VariablesUsage.instructions @@ -62,4 +62,4 @@ error: INIT: in: {} out: {} sink: INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.instructions b/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.instructions index c10ec23117f..16562437bce 100644 --- a/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.instructions +++ b/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.instructions @@ -9,7 +9,7 @@ L0: 1 INIT: in: {} out: {} v(val sum: (Int)->Int = { (x: Int) -> sum(x - 1) + x }) INIT: in: {} out: {sum=D} mark({ (x: Int) -> sum(x - 1) + x }) INIT: in: {sum=D} out: {sum=D} - jmp?(L2 [after local declaration]) + jmp?(L2) d({ (x: Int) -> sum(x - 1) + x }) USE: in: {sum=READ} out: {sum=READ} L2 [after local declaration]: r({ (x: Int) -> sum(x - 1) + x }) -> @@ -91,7 +91,7 @@ L0: magic[IMPLICIT_RECEIVER](obj) -> INIT: in: {obj=D, x=D} out: {obj=D, x=D} r(obj|) -> w(x|) INIT: in: {obj=D, x=D} out: {obj=D, x=ID} - 1 jmp?(L2 [after local declaration]) INIT: in: {obj=D} out: {obj=D} + 1 jmp?(L2) INIT: in: {obj=D} out: {obj=D} d(fun foo() { val y = obj }) USE: in: {obj=READ} out: {obj=READ} L2 [after local declaration]: r(object: A(obj) { { val x = obj } fun foo() { val y = obj } }) -> diff --git a/compiler/testData/cfg-variables/bugs/varInitializationInIf.instructions b/compiler/testData/cfg-variables/bugs/varInitializationInIf.instructions index c3a21f6a552..ab95855399b 100644 --- a/compiler/testData/cfg-variables/bugs/varInitializationInIf.instructions +++ b/compiler/testData/cfg-variables/bugs/varInitializationInIf.instructions @@ -19,11 +19,11 @@ L0: r(2) -> mark(1 < 2) call(1 < 2, compareTo|, ) -> - jf(L2 [else branch]|) + jf(L2|) 3 mark({ b = false }) r(false) -> USE: in: {b=WRITTEN_AFTER_READ} out: {b=WRITTEN_AFTER_READ} w(b|) INIT: in: {b=D} out: {b=ID} USE: in: {b=READ} out: {b=WRITTEN_AFTER_READ} - 2 jmp(L3 ['if' expression result]) INIT: in: {b=ID} out: {b=ID} USE: in: {b=READ} out: {b=READ} + 2 jmp(L3) INIT: in: {b=ID} out: {b=ID} USE: in: {b=READ} out: {b=READ} L2 [else branch]: 3 mark({ b = true }) INIT: in: {b=D} out: {b=D} r(true) -> USE: in: {b=WRITTEN_AFTER_READ} out: {b=WRITTEN_AFTER_READ} diff --git a/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.instructions b/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.instructions index a85a657be01..078d0b43fde 100644 --- a/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.instructions +++ b/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.instructions @@ -23,7 +23,7 @@ L0: v(i) INIT: in: {numbers=ID} out: {i=D, numbers=ID} L2 [loop entry point]: L6 [condition entry point]: - jmp?(L3 [loop exit point]) INIT: in: {i=D, numbers=ID} out: {i=D, numbers=ID} + jmp?(L3) INIT: in: {i=D, numbers=ID} out: {i=D, numbers=ID} magic[LOOP_RANGE_ITERATION](numbers|) -> w(i|) INIT: in: {i=D, numbers=ID} out: {i=ID, numbers=ID} mark(for (i in numbers) { val b: Boolean if (1 < 2) { b = false } else { b = true } use(b) continue }) INIT: in: {i=ID, numbers=ID} out: {i=ID, numbers=ID} USE: in: {} out: {} @@ -35,11 +35,11 @@ L4 [body entry point]: r(2) -> mark(1 < 2) call(1 < 2, compareTo|, ) -> - jf(L7 [else branch]|) + jf(L7|) 5 mark({ b = false }) r(false) -> USE: in: {b=WRITTEN_AFTER_READ} out: {b=WRITTEN_AFTER_READ} w(b|) INIT: in: {b=D, i=ID, numbers=ID} out: {b=ID, i=ID, numbers=ID} USE: in: {b=READ} out: {b=WRITTEN_AFTER_READ} - 4 jmp(L8 ['if' expression result]) INIT: in: {b=ID, i=ID, numbers=ID} out: {b=ID, i=ID, numbers=ID} USE: in: {b=READ} out: {b=READ} + 4 jmp(L8) INIT: in: {b=ID, i=ID, numbers=ID} out: {b=ID, i=ID, numbers=ID} USE: in: {b=READ} out: {b=READ} L7 [else branch]: 5 mark({ b = true }) INIT: in: {b=D, i=ID, numbers=ID} out: {b=D, i=ID, numbers=ID} r(true) -> USE: in: {b=WRITTEN_AFTER_READ} out: {b=WRITTEN_AFTER_READ} @@ -49,8 +49,8 @@ L8 ['if' expression result]: r(b) -> USE: in: {} out: {b=READ} mark(use(b)) call(use(b), use|) -> - jmp(L6 [condition entry point]) USE: in: {} out: {} -- 3 jmp(L2 [loop entry point]) + jmp(L6) USE: in: {} out: {} +- 3 jmp(L2) L3 [loop exit point]: L5 [body exit point]: read (Unit) INIT: in: {i=D, numbers=ID} out: {i=D, numbers=ID} @@ -77,4 +77,4 @@ error: INIT: in: {} out: {} sink: INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg-variables/lexicalScopes/doWhileScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/doWhileScope.instructions index f3965e3df93..a44472d92e5 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/doWhileScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/doWhileScope.instructions @@ -25,7 +25,7 @@ L6 [condition entry point]: r(0) -> mark(a > 0) call(a > 0, compareTo|, ) -> - jt(L2 [loop entry point]|) USE: in: {a=READ} out: {a=READ} + jt(L2|) USE: in: {a=READ} out: {a=READ} L3 [loop exit point]: read (Unit) 2 mark("after") INIT: in: {} out: {} @@ -36,4 +36,4 @@ error: sink: USE: in: {} out: {} -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg-variables/lexicalScopes/forScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/forScope.instructions index 27852061171..f18bb5957c0 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/forScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/forScope.instructions @@ -19,7 +19,7 @@ L0: v(i) INIT: in: {} out: {i=D} L2 [loop entry point]: L6 [condition entry point]: - jmp?(L3 [loop exit point]) INIT: in: {i=D} out: {i=D} + jmp?(L3) INIT: in: {i=D} out: {i=D} magic[LOOP_RANGE_ITERATION](1..10|) -> w(i|) INIT: in: {i=D} out: {i=ID} mark(for (i in 1..10) { val a = i }) INIT: in: {i=ID} out: {i=ID} @@ -28,7 +28,7 @@ L4 [body entry point]: v(val a = i) INIT: in: {i=ID} out: {a=D, i=ID} r(i) -> INIT: in: {a=D, i=ID} out: {a=D, i=ID} w(a|) INIT: in: {a=D, i=ID} out: {a=ID, i=ID} - 3 jmp(L2 [loop entry point]) INIT: in: {i=ID} out: {i=ID} USE: in: {i=READ} out: {i=READ} + 3 jmp(L2) INIT: in: {i=ID} out: {i=ID} USE: in: {i=READ} out: {i=READ} L3 [loop exit point]: L5 [body exit point]: read (Unit) INIT: in: {i=D} out: {i=D} @@ -40,4 +40,4 @@ error: sink: USE: in: {} out: {} -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.instructions index 6ced0cf95be..aaa61c9a96d 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.instructions @@ -18,7 +18,7 @@ L0: w(b|) INIT: in: {b=D} out: {b=ID} v(val f = { (x: Int) -> val a = x + b }) INIT: in: {b=ID} out: {b=ID, f=D} mark({ (x: Int) -> val a = x + b }) INIT: in: {b=ID, f=D} out: {b=ID, f=D} - jmp?(L2 [after local declaration]) + jmp?(L2) d({ (x: Int) -> val a = x + b }) USE: in: {b=READ} out: {b=READ} L2 [after local declaration]: r({ (x: Int) -> val a = x + b }) -> diff --git a/compiler/testData/cfg-variables/lexicalScopes/ifScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/ifScope.instructions index 6b7aa8e7871..2485377a635 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/ifScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/ifScope.instructions @@ -17,12 +17,12 @@ L0: r("before") -> mark(if (true) { val a = 1 } else { val b = 2 }) r(true) -> - jf(L2 [else branch]|) + jf(L2|) 3 mark({ val a = 1 }) v(val a = 1) INIT: in: {} out: {a=D} r(1) -> INIT: in: {a=D} out: {a=D} w(a|) INIT: in: {a=D} out: {a=ID} - 2 jmp(L3 ['if' expression result]) INIT: in: {} out: {} + 2 jmp(L3) INIT: in: {} out: {} L2 [else branch]: 3 mark({ val b = 2 }) v(val b = 2) INIT: in: {} out: {b=D} diff --git a/compiler/testData/cfg-variables/lexicalScopes/localClass.instructions b/compiler/testData/cfg-variables/lexicalScopes/localClass.instructions index feeacd53864..faa4819f5ab 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localClass.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/localClass.instructions @@ -25,7 +25,7 @@ L0: magic[IMPLICIT_RECEIVER](x) -> INIT: in: {a=D, x=ID} out: {a=D, x=ID} r(x|) -> w(a|) INIT: in: {a=D, x=ID} out: {a=ID, x=ID} - 2 jmp?(L2 [after local declaration]) INIT: in: {x=ID} out: {x=ID} + 2 jmp?(L2) INIT: in: {x=ID} out: {x=ID} d(fun foo() { val b = x }) USE: in: {x=READ} out: {x=READ} L2 [after local declaration]: mark("after") diff --git a/compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.instructions index 96313534b7e..cd3682a6d9d 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.instructions @@ -16,7 +16,7 @@ L0: v(val b = 1) INIT: in: {} out: {b=D} r(1) -> INIT: in: {b=D} out: {b=D} w(b|) INIT: in: {b=D} out: {b=ID} - jmp?(L2 [after local declaration]) INIT: in: {b=ID} out: {b=ID} + jmp?(L2) INIT: in: {b=ID} out: {b=ID} d(fun local(x: Int) { val a = x + b }) USE: in: {b=READ} out: {b=READ} L2 [after local declaration]: mark("after") diff --git a/compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.instructions b/compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.instructions index 3c738f6b0bc..0fad9e0baef 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.instructions @@ -14,7 +14,7 @@ L0: v(val b = 1) INIT: in: {} out: {b=D} r(1) -> INIT: in: {b=D} out: {b=D} w(b|) INIT: in: {b=D} out: {b=ID} - jmp?(L2 [after local declaration]) INIT: in: {b=ID} out: {b=ID} + jmp?(L2) INIT: in: {b=ID} out: {b=ID} d(fun local(x: Int) = x + b) USE: in: {b=READ} out: {b=READ} L2 [after local declaration]: mark("after") diff --git a/compiler/testData/cfg-variables/lexicalScopes/localObject.instructions b/compiler/testData/cfg-variables/lexicalScopes/localObject.instructions index b44fbaa1c29..58c888b158a 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localObject.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/localObject.instructions @@ -21,7 +21,7 @@ L0: v(val a = 1) INIT: in: {} out: {a=D} r(1) -> INIT: in: {a=D} out: {a=D} w(a|) INIT: in: {a=D} out: {a=ID} - 2 jmp?(L2 [after local declaration]) INIT: in: {} out: {} + 2 jmp?(L2) INIT: in: {} out: {} d(fun foo() { val b = 2 }) L2 [after local declaration]: mark("after") diff --git a/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.instructions index 150ed53d2aa..d4dfc6ebf1d 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.instructions @@ -23,7 +23,7 @@ L0: v(val x = 1) INIT: in: {bar=D} out: {bar=D, x=D} r(1) -> INIT: in: {bar=D, x=D} out: {bar=D, x=D} w(x|) INIT: in: {bar=D, x=D} out: {bar=D, x=ID} - 2 jmp?(L2 [after local declaration]) INIT: in: {bar=D} out: {bar=D} + 2 jmp?(L2) INIT: in: {bar=D} out: {bar=D} d(fun foo() { val a = 2 }) L2 [after local declaration]: r(object { { val x = 1 } fun foo() { val a = 2 } }) -> diff --git a/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.instructions index 5925262cce0..3d0e5b18854 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.instructions @@ -15,10 +15,10 @@ L0: 1 INIT: in: {} out: {} USE: in: {} out: {} 2 mark({ class A { var a : Int get() { return $a } set(v: Int) { $a = v } } }) v(var a : Int get() { return $a } set(v: Int) { $a = v }) INIT: in: {} out: {a=D} - jmp?(L2 [after local declaration]) INIT: in: {a=D} out: {a=D} + jmp?(L2) INIT: in: {a=D} out: {a=D} d(get() { return $a }) USE: in: {a=READ} out: {a=READ} L2 [after local declaration]: - jmp?(L5 [after local declaration]) + jmp?(L5) d(set(v: Int) { $a = v }) USE: in: {a=ONLY_WRITTEN_NEVER_READ} out: {a=ONLY_WRITTEN_NEVER_READ} L1: L5 [after local declaration]: diff --git a/compiler/testData/cfg-variables/lexicalScopes/tryScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/tryScope.instructions index 8b2f83a5577..8abb8e4d393 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/tryScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/tryScope.instructions @@ -19,12 +19,12 @@ L0: mark("before") r("before") -> mark(try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 }) - jmp?(L2 [onException]) - jmp?(L3 [onExceptionToFinallyBlock]) + jmp?(L2) + jmp?(L3) 3 mark({ foo() }) mark(foo()) call(foo(), foo) -> - 2 jmp(L4 [afterCatches]) USE: in: {} out: {} + 2 jmp(L4) USE: in: {} out: {} L2 [onException]: 3 v(e: Exception) INIT: in: {} out: {e=D} magic[FAKE_INITIALIZER](e: Exception) -> INIT: in: {e=D} out: {e=D} @@ -33,9 +33,9 @@ L2 [onException]: v(val a = e) INIT: in: {e=ID} out: {a=D, e=ID} USE: in: {e=READ} out: {e=READ} r(e) -> INIT: in: {a=D, e=ID} out: {a=D, e=ID} USE: in: {} out: {e=READ} w(a|) INIT: in: {a=D, e=ID} out: {a=ID, e=ID} - 3 jmp(L4 [afterCatches]) INIT: in: {e=ID} out: {e=ID} + 3 jmp(L4) INIT: in: {e=ID} out: {e=ID} L4 [afterCatches]: - 2 jmp(L5 [skipFinallyToErrorBlock]) INIT: in: {} out: {} + 2 jmp(L5) INIT: in: {} out: {} L3 [onExceptionToFinallyBlock]: L6 [start finally]: 3 mark({ val a = 1 }) @@ -45,6 +45,7 @@ L6 [start finally]: L7 [finish finally]: 2 jmp(error) INIT: in: {} out: {} L5 [skipFinallyToErrorBlock]: +L8 [copy of L3, onExceptionToFinallyBlock]: 3 mark({ val a = 1 }) v(val a = 1) INIT: in: {} out: {a=D} r(1) -> INIT: in: {a=D} out: {a=D} @@ -58,4 +59,4 @@ error: sink: USE: in: {} out: {} -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg-variables/lexicalScopes/whileScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/whileScope.instructions index f960fa6b02e..12302d0d514 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/whileScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/whileScope.instructions @@ -20,7 +20,7 @@ L6 [condition entry point]: L4 [body entry point]: 3 mark({ val a: Int }) v(val a: Int) INIT: in: {} out: {a=D} - 2 jmp(L2 [loop entry point]) INIT: in: {} out: {} USE: in: {} out: {} + 2 jmp(L2) INIT: in: {} out: {} USE: in: {} out: {} L3 [loop exit point]: L5 [body exit point]: - read (Unit) @@ -32,4 +32,4 @@ error: sink: USE: in: {} out: {} -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/arrays/ArrayAccess.instructions b/compiler/testData/cfg/arrays/ArrayAccess.instructions index f9a62ea22ec..d0a9fad7a73 100644 --- a/compiler/testData/cfg/arrays/ArrayAccess.instructions +++ b/compiler/testData/cfg/arrays/ArrayAccess.instructions @@ -46,4 +46,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/arrays/ArrayOfFunctions.instructions b/compiler/testData/cfg/arrays/ArrayOfFunctions.instructions index 9321af73d8d..c45e57c80b4 100644 --- a/compiler/testData/cfg/arrays/ArrayOfFunctions.instructions +++ b/compiler/testData/cfg/arrays/ArrayOfFunctions.instructions @@ -23,4 +23,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/arrays/arrayAccessExpression.instructions b/compiler/testData/cfg/arrays/arrayAccessExpression.instructions index 9b926590263..c748ad07067 100644 --- a/compiler/testData/cfg/arrays/arrayAccessExpression.instructions +++ b/compiler/testData/cfg/arrays/arrayAccessExpression.instructions @@ -49,4 +49,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/arrays/arrayInc.instructions b/compiler/testData/cfg/arrays/arrayInc.instructions index 71af73e6dde..69b5a912ff9 100644 --- a/compiler/testData/cfg/arrays/arrayInc.instructions +++ b/compiler/testData/cfg/arrays/arrayInc.instructions @@ -25,4 +25,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/arrays/arraySet.instructions b/compiler/testData/cfg/arrays/arraySet.instructions index 56104d57a8a..b823f70675b 100644 --- a/compiler/testData/cfg/arrays/arraySet.instructions +++ b/compiler/testData/cfg/arrays/arraySet.instructions @@ -20,4 +20,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/arrays/arraySetPlusAssign.instructions b/compiler/testData/cfg/arrays/arraySetPlusAssign.instructions index 8c8202a5e67..f28cb5fb535 100644 --- a/compiler/testData/cfg/arrays/arraySetPlusAssign.instructions +++ b/compiler/testData/cfg/arrays/arraySetPlusAssign.instructions @@ -26,4 +26,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/basic/Basic.instructions b/compiler/testData/cfg/basic/Basic.instructions index 62a0ca99cfe..2a2c1dc3ae6 100644 --- a/compiler/testData/cfg/basic/Basic.instructions +++ b/compiler/testData/cfg/basic/Basic.instructions @@ -36,10 +36,10 @@ L0: mark(genfun()) call(genfun(), genfun) -> mark({1}) - jmp?(L2 [after local declaration]) NEXT:[r({1}) -> , d({1})] + jmp?(L2) NEXT:[r({1}) -> , d({1})] d({1}) NEXT:[] L2 [after local declaration]: - r({1}) -> PREV:[jmp?(L2 [after local declaration])] + r({1}) -> PREV:[jmp?(L2)] mark(flfun {1}) call(flfun {1}, flfun|) -> mark(3.equals(4)) @@ -56,15 +56,15 @@ L2 [after local declaration]: mark(1 + 2) call(1 + 2, plus|, ) -> r(a) -> - jf(L5 [result of boolean operation]|) NEXT:[magic[AND](a && true|, ) -> , r(true) -> ] + jf(L5|) NEXT:[magic[AND](a && true|, ) -> , r(true) -> ] r(true) -> L5 [result of boolean operation]: - magic[AND](a && true|, ) -> PREV:[jf(L5 [result of boolean operation]|), r(true) -> ] + magic[AND](a && true|, ) -> PREV:[jf(L5|), r(true) -> ] r(a) -> - jt(L6 [result of boolean operation]|) NEXT:[r(false) -> , magic[OR](a || false|, ) -> ] + jt(L6|) NEXT:[r(false) -> , magic[OR](a || false|, ) -> ] r(false) -> L6 [result of boolean operation]: - magic[OR](a || false|, ) -> PREV:[jt(L6 [result of boolean operation]|), r(false) -> ] + magic[OR](a || false|, ) -> PREV:[jt(L6|), r(false) -> ] L1: 1 NEXT:[] error: @@ -137,4 +137,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/basic/EmptyFunction.instructions b/compiler/testData/cfg/basic/EmptyFunction.instructions index 5e36cf614ed..c0521ff0108 100644 --- a/compiler/testData/cfg/basic/EmptyFunction.instructions +++ b/compiler/testData/cfg/basic/EmptyFunction.instructions @@ -11,4 +11,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/basic/ShortFunction.instructions b/compiler/testData/cfg/basic/ShortFunction.instructions index 8d24604e233..382f11043df 100644 --- a/compiler/testData/cfg/basic/ShortFunction.instructions +++ b/compiler/testData/cfg/basic/ShortFunction.instructions @@ -11,4 +11,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/bugs/jumpToOuterScope.instructions b/compiler/testData/cfg/bugs/jumpToOuterScope.instructions index e077521d6ad..aa59afa5146 100644 --- a/compiler/testData/cfg/bugs/jumpToOuterScope.instructions +++ b/compiler/testData/cfg/bugs/jumpToOuterScope.instructions @@ -17,21 +17,21 @@ L0: v(e) L2 [loop entry point]: L6 [condition entry point]: - jmp?(L3 [loop exit point]) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](c|) -> ] PREV:[v(e), jmp(L2 [loop entry point])] + jmp?(L3) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](c|) -> ] PREV:[v(e), jmp(L2)] magic[LOOP_RANGE_ITERATION](c|) -> w(e|) mark(for (e in c) { { break } }) L4 [body entry point]: 4 mark({ { break } }) mark({ break }) - jmp?(L7 [after local declaration]) NEXT:[r({ break }) -> , d({ break })] + jmp?(L7) NEXT:[r({ break }) -> , d({ break })] d({ break }) NEXT:[] L7 [after local declaration]: - r({ break }) -> PREV:[jmp?(L7 [after local declaration])] - 3 jmp(L2 [loop entry point]) NEXT:[jmp?(L3 [loop exit point])] + r({ break }) -> PREV:[jmp?(L7)] + 3 jmp(L2) NEXT:[jmp?(L3)] L3 [loop exit point]: L5 [body exit point]: - read (Unit) PREV:[jmp?(L3 [loop exit point]), jmp(L3 [loop exit point])] + read (Unit) PREV:[jmp?(L3), jmp(L3)] L1: 1 NEXT:[] error: @@ -47,12 +47,12 @@ sink: L8: 5 6 mark(break) - jmp(L3 [loop exit point]) NEXT:[read (Unit)] -- 5 ret(*|!) L9 PREV:[] + jmp(L3) NEXT:[read (Unit)] +- 5 ret(*|!) L9 PREV:[] L9: - NEXT:[] PREV:[] + NEXT:[] PREV:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] -===================== + PREV:[, ] +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/controlStructures/Finally.instructions b/compiler/testData/cfg/controlStructures/Finally.instructions index f354828e818..e4071060a54 100644 --- a/compiler/testData/cfg/controlStructures/Finally.instructions +++ b/compiler/testData/cfg/controlStructures/Finally.instructions @@ -11,18 +11,18 @@ L0: 1 2 mark({ try { 1 } finally { 2 } }) mark(try { 1 } finally { 2 }) - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ 1 })] + jmp?(L2) NEXT:[mark({ 2 }), mark({ 1 })] 3 mark({ 1 }) r(1) -> - 2 jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })] + 2 jmp(L3) NEXT:[mark({ 2 })] L2 [onExceptionToFinallyBlock]: L4 [start finally]: - 3 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + 3 mark({ 2 }) PREV:[jmp?(L2)] r(2) -> L5 [finish finally]: 2 jmp(error) NEXT:[] L3 [skipFinallyToErrorBlock]: - 3 mark({ 2 }) PREV:[jmp(L3 [skipFinallyToErrorBlock])] + 3 mark({ 2 }) PREV:[jmp(L3)] r(2) -> 2 merge(try { 1 } finally { 2 }|) -> L1: @@ -48,7 +48,7 @@ L0: 1 2 mark({ try { 1 if (2 > 3) { return } } finally { 2 } }) mark(try { 1 if (2 > 3) { return } } finally { 2 }) - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ 1 if (2 > 3) { return } })] + jmp?(L2) NEXT:[mark({ 2 }), mark({ 1 if (2 > 3) { return } })] 3 mark({ 1 if (2 > 3) { return } }) r(1) -> mark(if (2 > 3) { return }) @@ -56,25 +56,25 @@ L0: r(3) -> mark(2 > 3) call(2 > 3, compareTo|, ) -> - jf(L3 [else branch]|) NEXT:[read (Unit), mark({ return })] + jf(L3|) NEXT:[read (Unit), mark({ return })] 4 mark({ return }) L4 [start finally]: 5 mark({ 2 }) r(2) -> L5 [finish finally]: 4 ret L1 NEXT:[] -- 3 jmp(L6 ['if' expression result]) NEXT:[merge(if (2 > 3) { return }|!) -> ] PREV:[] +- 3 jmp(L6) NEXT:[merge(if (2 > 3) { return }|!) -> ] PREV:[] L3 [else branch]: - read (Unit) PREV:[jf(L3 [else branch]|)] + read (Unit) PREV:[jf(L3|)] L6 ['if' expression result]: merge(if (2 > 3) { return }|!) -> - 2 jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })] + 2 jmp(L7) NEXT:[mark({ 2 })] L2 [onExceptionToFinallyBlock]: - 5 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + 5 mark({ 2 }) PREV:[jmp?(L2)] r(2) -> 2 jmp(error) NEXT:[] L7 [skipFinallyToErrorBlock]: - 5 mark({ 2 }) PREV:[jmp(L7 [skipFinallyToErrorBlock])] + 5 mark({ 2 }) PREV:[jmp(L7)] r(2) -> 2 merge(try { 1 if (2 > 3) { return } } finally { 2 }|) -> L1: @@ -102,24 +102,24 @@ L0: 1 2 mark({ try { 1 @l{ () -> if (2 > 3) { return@l } } } finally { 2 } }) mark(try { 1 @l{ () -> if (2 > 3) { return@l } } } finally { 2 }) - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ 1 @l{ () -> if (2 > 3) { return@l } } })] + jmp?(L2) NEXT:[mark({ 2 }), mark({ 1 @l{ () -> if (2 > 3) { return@l } } })] 3 mark({ 1 @l{ () -> if (2 > 3) { return@l } } }) r(1) -> mark(@l{ () -> if (2 > 3) { return@l } }) mark({ () -> if (2 > 3) { return@l } }) - jmp?(L3 [after local declaration]) NEXT:[r({ () -> if (2 > 3) { return@l } }) -> , d({ () -> if (2 > 3) { return@l } })] + jmp?(L3) NEXT:[r({ () -> if (2 > 3) { return@l } }) -> , d({ () -> if (2 > 3) { return@l } })] d({ () -> if (2 > 3) { return@l } }) NEXT:[] L3 [after local declaration]: - r({ () -> if (2 > 3) { return@l } }) -> PREV:[jmp?(L3 [after local declaration])] - 2 jmp(L8 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })] + r({ () -> if (2 > 3) { return@l } }) -> PREV:[jmp?(L3)] + 2 jmp(L8) NEXT:[mark({ 2 })] L2 [onExceptionToFinallyBlock]: L9 [start finally]: - 3 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + 3 mark({ 2 }) PREV:[jmp?(L2)] r(2) -> L10 [finish finally]: 2 jmp(error) NEXT:[] L8 [skipFinallyToErrorBlock]: - 3 mark({ 2 }) PREV:[jmp(L8 [skipFinallyToErrorBlock])] + 3 mark({ 2 }) PREV:[jmp(L8)] r(2) -> 2 merge(try { 1 @l{ () -> if (2 > 3) { return@l } } } finally { 2 }|) -> L1: @@ -144,12 +144,12 @@ L4: r(3) -> mark(2 > 3) call(2 > 3, compareTo|, ) -> - jf(L6 [else branch]|) NEXT:[read (Unit), mark({ return@l })] + jf(L6|) NEXT:[read (Unit), mark({ return@l })] 6 mark({ return@l }) ret L5 NEXT:[] -- 5 jmp(L7 ['if' expression result]) NEXT:[merge(if (2 > 3) { return@l }|!) -> ] PREV:[] +- 5 jmp(L7) NEXT:[merge(if (2 > 3) { return@l }|!) -> ] PREV:[] L6 [else branch]: - read (Unit) PREV:[jf(L6 [else branch]|)] + read (Unit) PREV:[jf(L6|)] L7 ['if' expression result]: merge(if (2 > 3) { return@l }|!) -> L5: @@ -178,10 +178,10 @@ L0: 2 mark({ @l{ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } } }) mark(@l{ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) mark({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) - jmp?(L2 [after local declaration]) NEXT:[r({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) -> , d({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } })] + jmp?(L2) NEXT:[r({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) -> , d({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } })] d({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) NEXT:[] L2 [after local declaration]: - r({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) -> PREV:[jmp?(L2 [after local declaration])] + r({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) -> PREV:[jmp?(L2)] L1: 1 NEXT:[] error: @@ -205,7 +205,7 @@ L3: 3 4 mark(try { 1 if (2 > 3) { return@l } } finally { 2 }) mark(try { 1 if (2 > 3) { return@l } } finally { 2 }) - jmp?(L5 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ 1 if (2 > 3) { return@l } })] + jmp?(L5) NEXT:[mark({ 2 }), mark({ 1 if (2 > 3) { return@l } })] 5 mark({ 1 if (2 > 3) { return@l } }) r(1) -> mark(if (2 > 3) { return@l }) @@ -213,25 +213,25 @@ L3: r(3) -> mark(2 > 3) call(2 > 3, compareTo|, ) -> - jf(L6 [else branch]|) NEXT:[read (Unit), mark({ return@l })] + jf(L6|) NEXT:[read (Unit), mark({ return@l })] 6 mark({ return@l }) L7 [start finally]: 7 mark({ 2 }) r(2) -> L8 [finish finally]: 6 ret L4 NEXT:[] -- 5 jmp(L9 ['if' expression result]) NEXT:[merge(if (2 > 3) { return@l }|!) -> ] PREV:[] +- 5 jmp(L9) NEXT:[merge(if (2 > 3) { return@l }|!) -> ] PREV:[] L6 [else branch]: - read (Unit) PREV:[jf(L6 [else branch]|)] + read (Unit) PREV:[jf(L6|)] L9 ['if' expression result]: merge(if (2 > 3) { return@l }|!) -> - 4 jmp(L10 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })] + 4 jmp(L10) NEXT:[mark({ 2 })] L5 [onExceptionToFinallyBlock]: - 7 mark({ 2 }) PREV:[jmp?(L5 [onExceptionToFinallyBlock])] + 7 mark({ 2 }) PREV:[jmp?(L5)] r(2) -> 4 jmp(error) NEXT:[] L10 [skipFinallyToErrorBlock]: - 7 mark({ 2 }) PREV:[jmp(L10 [skipFinallyToErrorBlock])] + 7 mark({ 2 }) PREV:[jmp(L10)] r(2) -> 4 merge(try { 1 if (2 > 3) { return@l } } finally { 2 }|) -> L4: @@ -261,13 +261,13 @@ L0: mark(@l while(true) { try { 1 if (2 > 3) { break @l } } finally { 2 } }) L2 [loop entry point]: L6 [condition entry point]: - r(true) -> PREV:[mark(@l while(true) { try { 1 if (2 > 3) { break @l } } finally { 2 } }), jmp(L2 [loop entry point])] + r(true) -> PREV:[mark(@l while(true) { try { 1 if (2 > 3) { break @l } } finally { 2 } }), jmp(L2)] mark(while(true) { try { 1 if (2 > 3) { break @l } } finally { 2 } }) magic[VALUE_CONSUMER](true|) -> L4 [body entry point]: 3 mark({ try { 1 if (2 > 3) { break @l } } finally { 2 } }) mark(try { 1 if (2 > 3) { break @l } } finally { 2 }) - jmp?(L7 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ 1 if (2 > 3) { break @l } })] + jmp?(L7) NEXT:[mark({ 2 }), mark({ 1 if (2 > 3) { break @l } })] 4 mark({ 1 if (2 > 3) { break @l } }) r(1) -> mark(if (2 > 3) { break @l }) @@ -275,31 +275,31 @@ L4 [body entry point]: r(3) -> mark(2 > 3) call(2 > 3, compareTo|, ) -> - jf(L8 [else branch]|) NEXT:[read (Unit), mark({ break @l })] + jf(L8|) NEXT:[read (Unit), mark({ break @l })] 5 mark({ break @l }) L9 [start finally]: 6 mark({ 2 }) r(2) -> L10 [finish finally]: - 5 jmp(L3 [loop exit point]) NEXT:[read (Unit)] -- 4 jmp(L11 ['if' expression result]) NEXT:[merge(if (2 > 3) { break @l }|!) -> ] PREV:[] + 5 jmp(L3) NEXT:[read (Unit)] +- 4 jmp(L11) NEXT:[merge(if (2 > 3) { break @l }|!) -> ] PREV:[] L8 [else branch]: - read (Unit) PREV:[jf(L8 [else branch]|)] + read (Unit) PREV:[jf(L8|)] L11 ['if' expression result]: merge(if (2 > 3) { break @l }|!) -> - 3 jmp(L12 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })] + 3 jmp(L12) NEXT:[mark({ 2 })] L7 [onExceptionToFinallyBlock]: - 6 mark({ 2 }) PREV:[jmp?(L7 [onExceptionToFinallyBlock])] + 6 mark({ 2 }) PREV:[jmp?(L7)] r(2) -> 3 jmp(error) NEXT:[] L12 [skipFinallyToErrorBlock]: - 6 mark({ 2 }) PREV:[jmp(L12 [skipFinallyToErrorBlock])] + 6 mark({ 2 }) PREV:[jmp(L12)] r(2) -> 3 merge(try { 1 if (2 > 3) { break @l } } finally { 2 }|) -> - 2 jmp(L2 [loop entry point]) NEXT:[r(true) -> ] + 2 jmp(L2) NEXT:[r(true) -> ] L3 [loop exit point]: L5 [body exit point]: - read (Unit) PREV:[jmp(L3 [loop exit point])] + read (Unit) PREV:[jmp(L3)] L1: 1 NEXT:[] error: @@ -326,12 +326,12 @@ L0: 1 2 mark({ try { @l while(true) { 1 if (2 > 3) { break @l } } 5 } finally { 2 } }) mark(try { @l while(true) { 1 if (2 > 3) { break @l } } 5 } finally { 2 }) - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ @l while(true) { 1 if (2 > 3) { break @l } } 5 })] + jmp?(L2) NEXT:[mark({ 2 }), mark({ @l while(true) { 1 if (2 > 3) { break @l } } 5 })] 3 mark({ @l while(true) { 1 if (2 > 3) { break @l } } 5 }) mark(@l while(true) { 1 if (2 > 3) { break @l } }) L3 [loop entry point]: L7 [condition entry point]: - r(true) -> PREV:[mark(@l while(true) { 1 if (2 > 3) { break @l } }), jmp(L3 [loop entry point])] + r(true) -> PREV:[mark(@l while(true) { 1 if (2 > 3) { break @l } }), jmp(L3)] mark(while(true) { 1 if (2 > 3) { break @l } }) magic[VALUE_CONSUMER](true|) -> L5 [body entry point]: @@ -342,28 +342,28 @@ L5 [body entry point]: r(3) -> mark(2 > 3) call(2 > 3, compareTo|, ) -> - jf(L8 [else branch]|) NEXT:[read (Unit), mark({ break @l })] + jf(L8|) NEXT:[read (Unit), mark({ break @l })] 5 mark({ break @l }) - jmp(L4 [loop exit point]) NEXT:[read (Unit)] -- 4 jmp(L9 ['if' expression result]) NEXT:[merge(if (2 > 3) { break @l }|!) -> ] PREV:[] + jmp(L4) NEXT:[read (Unit)] +- 4 jmp(L9) NEXT:[merge(if (2 > 3) { break @l }|!) -> ] PREV:[] L8 [else branch]: - read (Unit) PREV:[jf(L8 [else branch]|)] + read (Unit) PREV:[jf(L8|)] L9 ['if' expression result]: merge(if (2 > 3) { break @l }|!) -> - 3 jmp(L3 [loop entry point]) NEXT:[r(true) -> ] + 3 jmp(L3) NEXT:[r(true) -> ] L4 [loop exit point]: L6 [body exit point]: - read (Unit) PREV:[jmp(L4 [loop exit point])] + read (Unit) PREV:[jmp(L4)] r(5) -> - 2 jmp(L10 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })] + 2 jmp(L10) NEXT:[mark({ 2 })] L2 [onExceptionToFinallyBlock]: L11 [start finally]: - 3 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + 3 mark({ 2 }) PREV:[jmp?(L2)] r(2) -> L12 [finish finally]: 2 jmp(error) NEXT:[] L10 [skipFinallyToErrorBlock]: - 3 mark({ 2 }) PREV:[jmp(L10 [skipFinallyToErrorBlock])] + 3 mark({ 2 }) PREV:[jmp(L10)] r(2) -> 2 merge(try { @l while(true) { 1 if (2 > 3) { break @l } } 5 } finally { 2 }|) -> L1: @@ -391,12 +391,12 @@ L0: 1 2 mark({ try { @l while(true) { 1 if (2 > 3) { break @l } } } finally { 2 } }) mark(try { @l while(true) { 1 if (2 > 3) { break @l } } } finally { 2 }) - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ @l while(true) { 1 if (2 > 3) { break @l } } })] + jmp?(L2) NEXT:[mark({ 2 }), mark({ @l while(true) { 1 if (2 > 3) { break @l } } })] 3 mark({ @l while(true) { 1 if (2 > 3) { break @l } } }) mark(@l while(true) { 1 if (2 > 3) { break @l } }) L3 [loop entry point]: L7 [condition entry point]: - r(true) -> PREV:[mark(@l while(true) { 1 if (2 > 3) { break @l } }), jmp(L3 [loop entry point])] + r(true) -> PREV:[mark(@l while(true) { 1 if (2 > 3) { break @l } }), jmp(L3)] mark(while(true) { 1 if (2 > 3) { break @l } }) magic[VALUE_CONSUMER](true|) -> L5 [body entry point]: @@ -407,27 +407,27 @@ L5 [body entry point]: r(3) -> mark(2 > 3) call(2 > 3, compareTo|, ) -> - jf(L8 [else branch]|) NEXT:[read (Unit), mark({ break @l })] + jf(L8|) NEXT:[read (Unit), mark({ break @l })] 5 mark({ break @l }) - jmp(L4 [loop exit point]) NEXT:[read (Unit)] -- 4 jmp(L9 ['if' expression result]) NEXT:[merge(if (2 > 3) { break @l }|!) -> ] PREV:[] + jmp(L4) NEXT:[read (Unit)] +- 4 jmp(L9) NEXT:[merge(if (2 > 3) { break @l }|!) -> ] PREV:[] L8 [else branch]: - read (Unit) PREV:[jf(L8 [else branch]|)] + read (Unit) PREV:[jf(L8|)] L9 ['if' expression result]: merge(if (2 > 3) { break @l }|!) -> - 3 jmp(L3 [loop entry point]) NEXT:[r(true) -> ] + 3 jmp(L3) NEXT:[r(true) -> ] L4 [loop exit point]: L6 [body exit point]: - read (Unit) PREV:[jmp(L4 [loop exit point])] - 2 jmp(L10 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })] + read (Unit) PREV:[jmp(L4)] + 2 jmp(L10) NEXT:[mark({ 2 })] L2 [onExceptionToFinallyBlock]: L11 [start finally]: - 3 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + 3 mark({ 2 }) PREV:[jmp?(L2)] r(2) -> L12 [finish finally]: 2 jmp(error) NEXT:[] L10 [skipFinallyToErrorBlock]: - 3 mark({ 2 }) PREV:[jmp(L10 [skipFinallyToErrorBlock])] + 3 mark({ 2 }) PREV:[jmp(L10)] r(2) -> 2 merge(try { @l while(true) { 1 if (2 > 3) { break @l } } } finally { 2 }|!) -> L1: @@ -465,14 +465,14 @@ L0: v(i) L2 [loop entry point]: L6 [condition entry point]: - jmp?(L3 [loop exit point]) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|) -> ] PREV:[v(i), jmp(L6 [condition entry point]), jmp(L2 [loop entry point])] + jmp?(L3) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|) -> ] PREV:[v(i), jmp(L6), jmp(L2)] magic[LOOP_RANGE_ITERATION](1..a|) -> w(i|) mark(for (i in 1..a) { try { 1 if (2 > 3) { continue @l } } finally { 2 } }) L4 [body entry point]: 4 mark({ try { 1 if (2 > 3) { continue @l } } finally { 2 } }) mark(try { 1 if (2 > 3) { continue @l } } finally { 2 }) - jmp?(L7 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ 1 if (2 > 3) { continue @l } })] + jmp?(L7) NEXT:[mark({ 2 }), mark({ 1 if (2 > 3) { continue @l } })] 5 mark({ 1 if (2 > 3) { continue @l } }) r(1) -> mark(if (2 > 3) { continue @l }) @@ -480,31 +480,31 @@ L4 [body entry point]: r(3) -> mark(2 > 3) call(2 > 3, compareTo|, ) -> - jf(L8 [else branch]|) NEXT:[read (Unit), mark({ continue @l })] + jf(L8|) NEXT:[read (Unit), mark({ continue @l })] 6 mark({ continue @l }) L9 [start finally]: 7 mark({ 2 }) r(2) -> L10 [finish finally]: - 6 jmp(L6 [condition entry point]) NEXT:[jmp?(L3 [loop exit point])] -- 5 jmp(L11 ['if' expression result]) NEXT:[merge(if (2 > 3) { continue @l }|!) -> ] PREV:[] + 6 jmp(L6) NEXT:[jmp?(L3)] +- 5 jmp(L11) NEXT:[merge(if (2 > 3) { continue @l }|!) -> ] PREV:[] L8 [else branch]: - read (Unit) PREV:[jf(L8 [else branch]|)] + read (Unit) PREV:[jf(L8|)] L11 ['if' expression result]: merge(if (2 > 3) { continue @l }|!) -> - 4 jmp(L12 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })] + 4 jmp(L12) NEXT:[mark({ 2 })] L7 [onExceptionToFinallyBlock]: - 7 mark({ 2 }) PREV:[jmp?(L7 [onExceptionToFinallyBlock])] + 7 mark({ 2 }) PREV:[jmp?(L7)] r(2) -> 4 jmp(error) NEXT:[] L12 [skipFinallyToErrorBlock]: - 7 mark({ 2 }) PREV:[jmp(L12 [skipFinallyToErrorBlock])] + 7 mark({ 2 }) PREV:[jmp(L12)] r(2) -> 4 merge(try { 1 if (2 > 3) { continue @l } } finally { 2 }|) -> - 3 jmp(L2 [loop entry point]) NEXT:[jmp?(L3 [loop exit point])] + 3 jmp(L2) NEXT:[jmp?(L3)] L3 [loop exit point]: L5 [body exit point]: - read (Unit) PREV:[jmp?(L3 [loop exit point])] + read (Unit) PREV:[jmp?(L3)] L1: 1 NEXT:[] error: @@ -534,7 +534,7 @@ L0: w(a|) 2 mark({ try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 } finally { 2 } }) mark(try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 } finally { 2 }) - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 })] + jmp?(L2) NEXT:[mark({ 2 }), mark({ @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 })] 3 mark({ @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 }) mark(@l for (i in 1..a) { 1 if (2 > 3) { continue @l } }) 4 r(1) -> @@ -544,7 +544,7 @@ L0: v(i) L3 [loop entry point]: L7 [condition entry point]: - jmp?(L4 [loop exit point]) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|) -> ] PREV:[v(i), jmp(L7 [condition entry point]), jmp(L3 [loop entry point])] + jmp?(L4) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|) -> ] PREV:[v(i), jmp(L7), jmp(L3)] magic[LOOP_RANGE_ITERATION](1..a|) -> w(i|) mark(for (i in 1..a) { 1 if (2 > 3) { continue @l } }) @@ -556,28 +556,28 @@ L5 [body entry point]: r(3) -> mark(2 > 3) call(2 > 3, compareTo|, ) -> - jf(L8 [else branch]|) NEXT:[read (Unit), mark({ continue @l })] + jf(L8|) NEXT:[read (Unit), mark({ continue @l })] 6 mark({ continue @l }) - jmp(L7 [condition entry point]) NEXT:[jmp?(L4 [loop exit point])] -- 5 jmp(L9 ['if' expression result]) NEXT:[merge(if (2 > 3) { continue @l }|!) -> ] PREV:[] + jmp(L7) NEXT:[jmp?(L4)] +- 5 jmp(L9) NEXT:[merge(if (2 > 3) { continue @l }|!) -> ] PREV:[] L8 [else branch]: - read (Unit) PREV:[jf(L8 [else branch]|)] + read (Unit) PREV:[jf(L8|)] L9 ['if' expression result]: merge(if (2 > 3) { continue @l }|!) -> - 4 jmp(L3 [loop entry point]) NEXT:[jmp?(L4 [loop exit point])] + 4 jmp(L3) NEXT:[jmp?(L4)] L4 [loop exit point]: L6 [body exit point]: - read (Unit) PREV:[jmp?(L4 [loop exit point])] + read (Unit) PREV:[jmp?(L4)] 3 r(5) -> - 2 jmp(L10 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })] + 2 jmp(L10) NEXT:[mark({ 2 })] L2 [onExceptionToFinallyBlock]: L11 [start finally]: - 3 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + 3 mark({ 2 }) PREV:[jmp?(L2)] r(2) -> L12 [finish finally]: 2 jmp(error) NEXT:[] L10 [skipFinallyToErrorBlock]: - 3 mark({ 2 }) PREV:[jmp(L10 [skipFinallyToErrorBlock])] + 3 mark({ 2 }) PREV:[jmp(L10)] r(2) -> 2 merge(try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 } finally { 2 }|) -> L1: @@ -608,7 +608,7 @@ L0: w(a|) 2 mark({ try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } } finally { 2 } }) mark(try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } } finally { 2 }) - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } })] + jmp?(L2) NEXT:[mark({ 2 }), mark({ @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } })] 3 mark({ @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } }) mark(@l for (i in 1..a) { 1 if (2 > 3) { continue @l } }) 4 r(1) -> @@ -618,7 +618,7 @@ L0: v(i) L3 [loop entry point]: L7 [condition entry point]: - jmp?(L4 [loop exit point]) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|) -> ] PREV:[v(i), jmp(L7 [condition entry point]), jmp(L3 [loop entry point])] + jmp?(L4) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|) -> ] PREV:[v(i), jmp(L7), jmp(L3)] magic[LOOP_RANGE_ITERATION](1..a|) -> w(i|) mark(for (i in 1..a) { 1 if (2 > 3) { continue @l } }) @@ -630,27 +630,27 @@ L5 [body entry point]: r(3) -> mark(2 > 3) call(2 > 3, compareTo|, ) -> - jf(L8 [else branch]|) NEXT:[read (Unit), mark({ continue @l })] + jf(L8|) NEXT:[read (Unit), mark({ continue @l })] 6 mark({ continue @l }) - jmp(L7 [condition entry point]) NEXT:[jmp?(L4 [loop exit point])] -- 5 jmp(L9 ['if' expression result]) NEXT:[merge(if (2 > 3) { continue @l }|!) -> ] PREV:[] + jmp(L7) NEXT:[jmp?(L4)] +- 5 jmp(L9) NEXT:[merge(if (2 > 3) { continue @l }|!) -> ] PREV:[] L8 [else branch]: - read (Unit) PREV:[jf(L8 [else branch]|)] + read (Unit) PREV:[jf(L8|)] L9 ['if' expression result]: merge(if (2 > 3) { continue @l }|!) -> - 4 jmp(L3 [loop entry point]) NEXT:[jmp?(L4 [loop exit point])] + 4 jmp(L3) NEXT:[jmp?(L4)] L4 [loop exit point]: L6 [body exit point]: - read (Unit) PREV:[jmp?(L4 [loop exit point])] - 2 jmp(L10 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })] + read (Unit) PREV:[jmp?(L4)] + 2 jmp(L10) NEXT:[mark({ 2 })] L2 [onExceptionToFinallyBlock]: L11 [start finally]: - 3 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + 3 mark({ 2 }) PREV:[jmp?(L2)] r(2) -> L12 [finish finally]: 2 jmp(error) NEXT:[] L10 [skipFinallyToErrorBlock]: - 3 mark({ 2 }) PREV:[jmp(L10 [skipFinallyToErrorBlock])] + 3 mark({ 2 }) PREV:[jmp(L10)] r(2) -> 2 merge(try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } } finally { 2 }|!) -> L1: @@ -674,7 +674,7 @@ L0: 1 2 mark({ try { return 1 } finally { return 2 } }) mark(try { return 1 } finally { return 2 }) - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ return 2 }), mark({ return 1 })] + jmp?(L2) NEXT:[mark({ return 2 }), mark({ return 1 })] 3 mark({ return 1 }) r(1) -> L3 [start finally]: @@ -683,9 +683,9 @@ L3 [start finally]: ret(*|) L1 NEXT:[] L4 [finish finally]: - 3 ret(*|) L1 NEXT:[] PREV:[] -- 2 jmp(L5 [skipFinallyToErrorBlock]) NEXT:[mark({ return 2 })] PREV:[] +- 2 jmp(L5) NEXT:[mark({ return 2 })] PREV:[] L2 [onExceptionToFinallyBlock]: - 4 mark({ return 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + 4 mark({ return 2 }) PREV:[jmp?(L2)] r(2) -> ret(*|) L1 NEXT:[] - 2 jmp(error) NEXT:[] PREV:[] @@ -715,7 +715,7 @@ L0: 1 2 mark({ try { return 1 } finally { doSmth(3) } }) mark(try { return 1 } finally { doSmth(3) }) - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ doSmth(3) }), mark({ return 1 })] + jmp?(L2) NEXT:[mark({ doSmth(3) }), mark({ return 1 })] 3 mark({ return 1 }) r(1) -> L3 [start finally]: @@ -725,9 +725,9 @@ L3 [start finally]: call(doSmth(3), doSmth|) -> L4 [finish finally]: 3 ret(*|) L1 NEXT:[] -- 2 jmp(L5 [skipFinallyToErrorBlock]) NEXT:[mark({ doSmth(3) })] PREV:[] +- 2 jmp(L5) NEXT:[mark({ doSmth(3) })] PREV:[] L2 [onExceptionToFinallyBlock]: - 4 mark({ doSmth(3) }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + 4 mark({ doSmth(3) }) PREV:[jmp?(L2)] r(3) -> mark(doSmth(3)) call(doSmth(3), doSmth|) -> @@ -762,8 +762,8 @@ L0: 1 2 mark({ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) } }) mark(try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) }) - jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])] - jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ doSmth(3) }), mark({ return 1 })] + jmp?(L2) NEXT:[v(e: UnsupportedOperationException), jmp?(L3)] + jmp?(L3) NEXT:[mark({ doSmth(3) }), mark({ return 1 })] 3 mark({ return 1 }) r(1) -> L4 [start finally]: @@ -773,26 +773,26 @@ L4 [start finally]: call(doSmth(3), doSmth|) -> L5 [finish finally]: 3 ret(*|) L1 NEXT:[] -- 2 jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[] +- 2 jmp(L6) NEXT:[jmp(L7)] PREV:[] L2 [onException]: - 3 v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])] + 3 v(e: UnsupportedOperationException) PREV:[jmp?(L2)] magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> w(e|) 4 mark({ doSmth(2) }) r(2) -> mark(doSmth(2)) call(doSmth(2), doSmth|) -> - 3 jmp(L6 [afterCatches]) + 3 jmp(L6) L6 [afterCatches]: - 2 jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ doSmth(3) })] + 2 jmp(L7) NEXT:[mark({ doSmth(3) })] L3 [onExceptionToFinallyBlock]: - 4 mark({ doSmth(3) }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])] + 4 mark({ doSmth(3) }) PREV:[jmp?(L3)] r(3) -> mark(doSmth(3)) call(doSmth(3), doSmth|) -> 2 jmp(error) NEXT:[] L7 [skipFinallyToErrorBlock]: - 4 mark({ doSmth(3) }) PREV:[jmp(L7 [skipFinallyToErrorBlock])] + 4 mark({ doSmth(3) }) PREV:[jmp(L7)] r(3) -> mark(doSmth(3)) call(doSmth(3), doSmth|) -> @@ -818,20 +818,20 @@ L0: 1 2 mark({ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } }) mark(try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) }) - jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), mark({ return 1 })] + jmp?(L2) NEXT:[v(e: UnsupportedOperationException), mark({ return 1 })] 3 mark({ return 1 }) r(1) -> ret(*|) L1 NEXT:[] -- 2 jmp(L3 [afterCatches]) NEXT:[merge(try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) }|!, ) -> ] PREV:[] +- 2 jmp(L3) NEXT:[merge(try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) }|!, ) -> ] PREV:[] L2 [onException]: - 3 v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])] + 3 v(e: UnsupportedOperationException) PREV:[jmp?(L2)] magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> w(e|) 4 mark({ doSmth(2) }) r(2) -> mark(doSmth(2)) call(doSmth(2), doSmth|) -> - 3 jmp(L3 [afterCatches]) + 3 jmp(L3) L3 [afterCatches]: 2 merge(try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) }|!, ) -> L1: @@ -858,8 +858,8 @@ L0: 1 2 mark({ try { return 1 } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } }) mark(try { return 1 } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) }) - jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])] - jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ doSmth(3) }), mark({ return 1 })] + jmp?(L2) NEXT:[v(e: UnsupportedOperationException), jmp?(L3)] + jmp?(L3) NEXT:[mark({ doSmth(3) }), mark({ return 1 })] 3 mark({ return 1 }) r(1) -> L4 [start finally]: @@ -869,9 +869,9 @@ L4 [start finally]: call(doSmth(3), doSmth|) -> L5 [finish finally]: 3 ret(*|) L1 NEXT:[] -- 2 jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[] +- 2 jmp(L6) NEXT:[jmp(L7)] PREV:[] L2 [onException]: - 3 v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])] + 3 v(e: UnsupportedOperationException) PREV:[jmp?(L2)] magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> w(e|) 4 mark({ return 2 }) @@ -881,11 +881,11 @@ L2 [onException]: mark(doSmth(3)) call(doSmth(3), doSmth|) -> ret(*|) L1 NEXT:[] -- 3 jmp(L6 [afterCatches]) PREV:[] +- 3 jmp(L6) PREV:[] L6 [afterCatches]: -- 2 jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ doSmth(3) })] PREV:[] +- 2 jmp(L7) NEXT:[mark({ doSmth(3) })] PREV:[] L3 [onExceptionToFinallyBlock]: - 4 mark({ doSmth(3) }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])] + 4 mark({ doSmth(3) }) PREV:[jmp?(L3)] r(3) -> mark(doSmth(3)) call(doSmth(3), doSmth|) -> @@ -920,15 +920,15 @@ L0: 1 2 mark({ try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } }) mark(try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) }) - jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])] - jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ doSmth(3) }), mark({ doSmth(1) })] + jmp?(L2) NEXT:[v(e: UnsupportedOperationException), jmp?(L3)] + jmp?(L3) NEXT:[mark({ doSmth(3) }), mark({ doSmth(1) })] 3 mark({ doSmth(1) }) r(1) -> mark(doSmth(1)) call(doSmth(1), doSmth|) -> - 2 jmp(L4 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] + 2 jmp(L4) NEXT:[jmp(L7)] L2 [onException]: - 3 v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])] + 3 v(e: UnsupportedOperationException) PREV:[jmp?(L2)] magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> w(e|) 4 mark({ return 2 }) @@ -940,17 +940,17 @@ L5 [start finally]: call(doSmth(3), doSmth|) -> L6 [finish finally]: 4 ret(*|) L1 NEXT:[] -- 3 jmp(L4 [afterCatches]) PREV:[] +- 3 jmp(L4) PREV:[] L4 [afterCatches]: - 2 jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ doSmth(3) })] PREV:[jmp(L4 [afterCatches])] + 2 jmp(L7) NEXT:[mark({ doSmth(3) })] PREV:[jmp(L4)] L3 [onExceptionToFinallyBlock]: - 5 mark({ doSmth(3) }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])] + 5 mark({ doSmth(3) }) PREV:[jmp?(L3)] r(3) -> mark(doSmth(3)) call(doSmth(3), doSmth|) -> 2 jmp(error) NEXT:[] L7 [skipFinallyToErrorBlock]: - 5 mark({ doSmth(3) }) PREV:[jmp(L7 [skipFinallyToErrorBlock])] + 5 mark({ doSmth(3) }) PREV:[jmp(L7)] r(3) -> mark(doSmth(3)) call(doSmth(3), doSmth|) -> @@ -979,4 +979,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/controlStructures/FinallyTestCopy.instructions b/compiler/testData/cfg/controlStructures/FinallyTestCopy.instructions index bee4e228cf3..8d016253a6f 100644 --- a/compiler/testData/cfg/controlStructures/FinallyTestCopy.instructions +++ b/compiler/testData/cfg/controlStructures/FinallyTestCopy.instructions @@ -74,40 +74,40 @@ L0: 1 2 mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 } }) mark(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 }) - jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])] - jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ return 1 }), mark({ doSmth() })] + jmp?(L2) NEXT:[jmp?(L5), jmp?(L3)] + jmp?(L3) NEXT:[mark({ return 1 }), mark({ doSmth() })] 3 mark({ doSmth() }) mark(doSmth()) call(doSmth(), doSmth) -> - 2 jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] + 2 jmp(L4) NEXT:[jmp(L6)] L2 [onException]: - jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])] + jmp?(L5) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2)] 3 v(e: NullPointerException) magic[FAKE_INITIALIZER](e: NullPointerException) -> w(e|) 4 mark({ doSmth1() }) mark(doSmth1()) call(doSmth1(), doSmth1) -> - 3 jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] + 3 jmp(L4) NEXT:[jmp(L6)] L5 [catch 0]: - v(e: Exception) PREV:[jmp?(L5 [catch 0])] + v(e: Exception) PREV:[jmp?(L5)] magic[FAKE_INITIALIZER](e: Exception) -> w(e|) 4 mark({ doSmth2() }) mark(doSmth2()) call(doSmth2(), doSmth2) -> - 3 jmp(L4 [afterCatches]) + 3 jmp(L4) L4 [afterCatches]: - 2 jmp(L6 [skipFinallyToErrorBlock]) NEXT:[mark({ return 1 })] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])] + 2 jmp(L6) NEXT:[mark({ return 1 })] PREV:[jmp(L4), jmp(L4), jmp(L4)] L3 [onExceptionToFinallyBlock]: L7 [start finally]: - 3 mark({ return 1 }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])] + 3 mark({ return 1 }) PREV:[jmp?(L3)] r(1) -> ret(*|) L1 NEXT:[] L8 [finish finally]: - 2 jmp(error) NEXT:[] PREV:[] L6 [skipFinallyToErrorBlock]: - 3 mark({ return 1 }) PREV:[jmp(L6 [skipFinallyToErrorBlock])] + 3 mark({ return 1 }) PREV:[jmp(L6)] r(1) -> ret(*|) L1 NEXT:[] - 2 merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 }|, , ) -> PREV:[] @@ -142,68 +142,68 @@ L0: 2 mark({ while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } }) L2 [loop entry point]: L6 [condition entry point]: - mark(cond()) PREV:[mark({ while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } }), jmp(L6 [condition entry point]), jmp(L6 [condition entry point])] + mark(cond()) PREV:[mark({ while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } }), jmp(L6), jmp(L6)] call(cond(), cond) -> mark(while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } }) - jf(L3 [loop exit point]|) NEXT:[read (Unit), mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } })] + jf(L3|) NEXT:[read (Unit), mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } })] L4 [body entry point]: 3 mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } }) mark(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue }) - jmp?(L7 [onException]) NEXT:[jmp?(L10 [catch 0]), jmp?(L8 [onExceptionToFinallyBlock])] - jmp?(L8 [onExceptionToFinallyBlock]) NEXT:[mark({ if (cond()) return else continue }), mark({ doSmth() })] + jmp?(L7) NEXT:[jmp?(L10), jmp?(L8)] + jmp?(L8) NEXT:[mark({ if (cond()) return else continue }), mark({ doSmth() })] 4 mark({ doSmth() }) mark(doSmth()) call(doSmth(), doSmth) -> - 3 jmp(L9 [afterCatches]) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] + 3 jmp(L9) NEXT:[jmp(L11)] L7 [onException]: - jmp?(L10 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L7 [onException])] + jmp?(L10) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L7)] 4 v(e: NullPointerException) magic[FAKE_INITIALIZER](e: NullPointerException) -> w(e|) 5 mark({ doSmth1() }) mark(doSmth1()) call(doSmth1(), doSmth1) -> - 4 jmp(L9 [afterCatches]) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] + 4 jmp(L9) NEXT:[jmp(L11)] L10 [catch 0]: - v(e: Exception) PREV:[jmp?(L10 [catch 0])] + v(e: Exception) PREV:[jmp?(L10)] magic[FAKE_INITIALIZER](e: Exception) -> w(e|) 5 mark({ doSmth2() }) mark(doSmth2()) call(doSmth2(), doSmth2) -> - 4 jmp(L9 [afterCatches]) + 4 jmp(L9) L9 [afterCatches]: - 3 jmp(L11 [skipFinallyToErrorBlock]) NEXT:[mark({ if (cond()) return else continue })] PREV:[jmp(L9 [afterCatches]), jmp(L9 [afterCatches]), jmp(L9 [afterCatches])] + 3 jmp(L11) NEXT:[mark({ if (cond()) return else continue })] PREV:[jmp(L9), jmp(L9), jmp(L9)] L8 [onExceptionToFinallyBlock]: L12 [start finally]: - 4 mark({ if (cond()) return else continue }) PREV:[jmp?(L8 [onExceptionToFinallyBlock])] + 4 mark({ if (cond()) return else continue }) PREV:[jmp?(L8)] mark(if (cond()) return else continue) mark(cond()) call(cond(), cond) -> - jf(L13 [else branch]|) NEXT:[jmp(L6 [condition entry point]), ret L1] + jf(L13|) NEXT:[jmp(L6), ret L1] ret L1 NEXT:[] -- jmp(L14 ['if' expression result]) NEXT:[merge(if (cond()) return else continue|!, !) -> ] PREV:[] +- jmp(L14) NEXT:[merge(if (cond()) return else continue|!, !) -> ] PREV:[] L13 [else branch]: - jmp(L6 [condition entry point]) NEXT:[mark(cond())] PREV:[jf(L13 [else branch]|)] + jmp(L6) NEXT:[mark(cond())] PREV:[jf(L13|)] L14 ['if' expression result]: - merge(if (cond()) return else continue|!, !) -> PREV:[] L15 [finish finally]: - 3 jmp(error) NEXT:[] PREV:[] L11 [skipFinallyToErrorBlock]: - 4 mark({ if (cond()) return else continue }) PREV:[jmp(L11 [skipFinallyToErrorBlock])] + 4 mark({ if (cond()) return else continue }) PREV:[jmp(L11)] mark(if (cond()) return else continue) mark(cond()) call(cond(), cond) -> - jf(copy L13 [else branch]|) NEXT:[jmp(L6 [condition entry point]), ret L1] + jf(L17|) NEXT:[jmp(L6), ret L1] ret L1 NEXT:[] -- jmp(copy L14 ['if' expression result]) NEXT:[merge(if (cond()) return else continue|!, !) -> ] PREV:[] - jmp(L6 [condition entry point]) NEXT:[mark(cond())] PREV:[jf(copy L13 [else branch]|)] +- jmp(L18) NEXT:[merge(if (cond()) return else continue|!, !) -> ] PREV:[] + jmp(L6) NEXT:[mark(cond())] PREV:[jf(L17|)] - merge(if (cond()) return else continue|!, !) -> PREV:[] - 3 merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue }|, , ) -> PREV:[] -- 2 jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[] +- 2 jmp(L2) NEXT:[mark(cond())] PREV:[] L3 [loop exit point]: L5 [body exit point]: - read (Unit) PREV:[jf(L3 [loop exit point]|)] + read (Unit) PREV:[jf(L3|)] L1: 1 NEXT:[] PREV:[ret L1, ret L1, read (Unit)] error: @@ -231,55 +231,55 @@ L0: 1 2 mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); } }) mark(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); }) - jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])] - jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ while (cond()); }), mark({ doSmth() })] + jmp?(L2) NEXT:[jmp?(L5), jmp?(L3)] + jmp?(L3) NEXT:[mark({ while (cond()); }), mark({ doSmth() })] 3 mark({ doSmth() }) mark(doSmth()) call(doSmth(), doSmth) -> - 2 jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] + 2 jmp(L4) NEXT:[jmp(L6)] L2 [onException]: - jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])] + jmp?(L5) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2)] 3 v(e: NullPointerException) magic[FAKE_INITIALIZER](e: NullPointerException) -> w(e|) 4 mark({ doSmth1() }) mark(doSmth1()) call(doSmth1(), doSmth1) -> - 3 jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] + 3 jmp(L4) NEXT:[jmp(L6)] L5 [catch 0]: - v(e: Exception) PREV:[jmp?(L5 [catch 0])] + v(e: Exception) PREV:[jmp?(L5)] magic[FAKE_INITIALIZER](e: Exception) -> w(e|) 4 mark({ doSmth2() }) mark(doSmth2()) call(doSmth2(), doSmth2) -> - 3 jmp(L4 [afterCatches]) + 3 jmp(L4) L4 [afterCatches]: - 2 jmp(L6 [skipFinallyToErrorBlock]) NEXT:[mark({ while (cond()); })] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])] + 2 jmp(L6) NEXT:[mark({ while (cond()); })] PREV:[jmp(L4), jmp(L4), jmp(L4)] L3 [onExceptionToFinallyBlock]: L7 [start finally]: - 3 mark({ while (cond()); }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])] + 3 mark({ while (cond()); }) PREV:[jmp?(L3)] L8 [loop entry point]: L12 [condition entry point]: - mark(cond()) PREV:[mark({ while (cond()); }), jmp(L8 [loop entry point])] + mark(cond()) PREV:[mark({ while (cond()); }), jmp(L8)] call(cond(), cond) -> mark(while (cond())) - jf(L9 [loop exit point]|) NEXT:[read (Unit), jmp(L8 [loop entry point])] + jf(L9|) NEXT:[read (Unit), jmp(L8)] L10 [body entry point]: - jmp(L8 [loop entry point]) NEXT:[mark(cond())] + jmp(L8) NEXT:[mark(cond())] L9 [loop exit point]: L11 [body exit point]: - read (Unit) PREV:[jf(L9 [loop exit point]|)] + read (Unit) PREV:[jf(L9|)] L13 [finish finally]: 2 jmp(error) NEXT:[] L6 [skipFinallyToErrorBlock]: - 3 mark({ while (cond()); }) PREV:[jmp(L6 [skipFinallyToErrorBlock])] - mark(cond()) PREV:[mark({ while (cond()); }), jmp(copy L8 [loop entry point])] + 3 mark({ while (cond()); }) PREV:[jmp(L6)] + mark(cond()) PREV:[mark({ while (cond()); }), jmp(L15)] call(cond(), cond) -> mark(while (cond())) - jf(copy L9 [loop exit point]|) NEXT:[read (Unit), jmp(copy L8 [loop entry point])] - jmp(copy L8 [loop entry point]) NEXT:[mark(cond())] - read (Unit) PREV:[jf(copy L9 [loop exit point]|)] + jf(L16|) NEXT:[read (Unit), jmp(L15)] + jmp(L15) NEXT:[mark(cond())] + read (Unit) PREV:[jf(L16|)] 2 merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); }|, , ) -> L1: 1 NEXT:[] @@ -306,42 +306,42 @@ L0: w(list|) 2 mark({ try { doSmth() } finally { if(list != null) { } } }) mark(try { doSmth() } finally { if(list != null) { } }) - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ if(list != null) { } }), mark({ doSmth() })] + jmp?(L2) NEXT:[mark({ if(list != null) { } }), mark({ doSmth() })] 3 mark({ doSmth() }) mark(doSmth()) call(doSmth(), doSmth) -> - 2 jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ if(list != null) { } })] + 2 jmp(L3) NEXT:[mark({ if(list != null) { } })] L2 [onExceptionToFinallyBlock]: L4 [start finally]: - 3 mark({ if(list != null) { } }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + 3 mark({ if(list != null) { } }) PREV:[jmp?(L2)] mark(if(list != null) { }) r(list) -> r(null) -> mark(list != null) call(list != null, equals|, ) -> - jf(L5 [else branch]|) NEXT:[read (Unit), mark({ })] + jf(L5|) NEXT:[read (Unit), mark({ })] 4 mark({ }) read (Unit) - 3 jmp(L6 ['if' expression result]) NEXT:[merge(if(list != null) { }|!) -> ] + 3 jmp(L6) NEXT:[merge(if(list != null) { }|!) -> ] L5 [else branch]: - read (Unit) PREV:[jf(L5 [else branch]|)] + read (Unit) PREV:[jf(L5|)] L6 ['if' expression result]: - merge(if(list != null) { }|!) -> PREV:[jmp(L6 ['if' expression result]), read (Unit)] + merge(if(list != null) { }|!) -> PREV:[jmp(L6), read (Unit)] L7 [finish finally]: 2 jmp(error) NEXT:[] L3 [skipFinallyToErrorBlock]: - 3 mark({ if(list != null) { } }) PREV:[jmp(L3 [skipFinallyToErrorBlock])] + 3 mark({ if(list != null) { } }) PREV:[jmp(L3)] mark(if(list != null) { }) r(list) -> r(null) -> mark(list != null) call(list != null, equals|, ) -> - jf(copy L5 [else branch]|) NEXT:[read (Unit), mark({ })] + jf(L9|) NEXT:[read (Unit), mark({ })] 4 mark({ }) read (Unit) - 3 jmp(copy L6 ['if' expression result]) NEXT:[merge(if(list != null) { }|!) -> ] - read (Unit) PREV:[jf(copy L5 [else branch]|)] - merge(if(list != null) { }|!) -> PREV:[jmp(copy L6 ['if' expression result]), read (Unit)] + 3 jmp(L10) NEXT:[merge(if(list != null) { }|!) -> ] + read (Unit) PREV:[jf(L9|)] + merge(if(list != null) { }|!) -> PREV:[jmp(L10), read (Unit)] 2 merge(try { doSmth() } finally { if(list != null) { } }|) -> L1: 1 NEXT:[] @@ -349,4 +349,4 @@ error: PREV:[jmp(error)] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/controlStructures/For.instructions b/compiler/testData/cfg/controlStructures/For.instructions index 926b6ddef28..a211a7a9789 100644 --- a/compiler/testData/cfg/controlStructures/For.instructions +++ b/compiler/testData/cfg/controlStructures/For.instructions @@ -15,7 +15,7 @@ L0: v(i) L2 [loop entry point]: L6 [condition entry point]: - jmp?(L3 [loop exit point]) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..2|) -> ] PREV:[v(i), jmp(L2 [loop entry point])] + jmp?(L3) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..2|) -> ] PREV:[v(i), jmp(L2)] magic[LOOP_RANGE_ITERATION](1..2|) -> w(i|) mark(for (i in 1..2) { doSmth(i) }) @@ -24,10 +24,10 @@ L4 [body entry point]: r(i) -> mark(doSmth(i)) call(doSmth(i), doSmth|) -> - 3 jmp(L2 [loop entry point]) NEXT:[jmp?(L3 [loop exit point])] + 3 jmp(L2) NEXT:[jmp?(L3)] L3 [loop exit point]: L5 [body exit point]: - read (Unit) PREV:[jmp?(L3 [loop exit point])] + read (Unit) PREV:[jmp?(L3)] L1: 1 NEXT:[] error: @@ -51,4 +51,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/controlStructures/If.instructions b/compiler/testData/cfg/controlStructures/If.instructions index 134f834b8fc..4e72bec175b 100644 --- a/compiler/testData/cfg/controlStructures/If.instructions +++ b/compiler/testData/cfg/controlStructures/If.instructions @@ -25,35 +25,35 @@ L0: v(var u: String) mark(if (b) { u = "s" }) r(b) -> - jf(L2 [else branch]|) NEXT:[read (Unit), mark({ u = "s" })] + jf(L2|) NEXT:[read (Unit), mark({ u = "s" })] 3 mark({ u = "s" }) mark("s") r("s") -> w(u|) - 2 jmp(L3 ['if' expression result]) NEXT:[merge(if (b) { u = "s" }|!) -> ] + 2 jmp(L3) NEXT:[merge(if (b) { u = "s" }|!) -> ] L2 [else branch]: - read (Unit) PREV:[jf(L2 [else branch]|)] + read (Unit) PREV:[jf(L2|)] L3 ['if' expression result]: - merge(if (b) { u = "s" }|!) -> PREV:[jmp(L3 ['if' expression result]), read (Unit)] + merge(if (b) { u = "s" }|!) -> PREV:[jmp(L3), read (Unit)] r(u) -> mark(doSmth(u)) call(doSmth(u), doSmth|) -> v(var r: String) mark(if (b) { r = "s" } else { r = "t" }) r(b) -> - jf(L4 [else branch]|) NEXT:[mark({ r = "t" }), mark({ r = "s" })] + jf(L4|) NEXT:[mark({ r = "t" }), mark({ r = "s" })] 3 mark({ r = "s" }) mark("s") r("s") -> w(r|) - 2 jmp(L5 ['if' expression result]) NEXT:[merge(if (b) { r = "s" } else { r = "t" }|!, !) -> ] + 2 jmp(L5) NEXT:[merge(if (b) { r = "s" } else { r = "t" }|!, !) -> ] L4 [else branch]: - 3 mark({ r = "t" }) PREV:[jf(L4 [else branch]|)] + 3 mark({ r = "t" }) PREV:[jf(L4|)] mark("t") r("t") -> w(r|) L5 ['if' expression result]: - 2 merge(if (b) { r = "s" } else { r = "t" }|!, !) -> PREV:[jmp(L5 ['if' expression result]), w(r|)] + 2 merge(if (b) { r = "s" } else { r = "t" }|!, !) -> PREV:[jmp(L5), w(r|)] r(r) -> mark(doSmth(r)) call(doSmth(r), doSmth|) -> @@ -87,12 +87,12 @@ L0: w(i|) mark(if (b) { return; }) r(b) -> - jf(L2 [else branch]|) NEXT:[read (Unit), mark({ return; })] + jf(L2|) NEXT:[read (Unit), mark({ return; })] 3 mark({ return; }) ret L1 NEXT:[] -- 2 jmp(L3 ['if' expression result]) NEXT:[merge(if (b) { return; }|!) -> ] PREV:[] +- 2 jmp(L3) NEXT:[merge(if (b) { return; }|!) -> ] PREV:[] L2 [else branch]: - read (Unit) PREV:[jf(L2 [else branch]|)] + read (Unit) PREV:[jf(L2|)] L3 ['if' expression result]: merge(if (b) { return; }|!) -> r(i) -> @@ -102,12 +102,12 @@ L3 ['if' expression result]: mark(i is Int) r(i) -> magic[IS](i is Int|) -> - jf(L4 [else branch]|) NEXT:[read (Unit), mark({ return; })] + jf(L4|) NEXT:[read (Unit), mark({ return; })] 3 mark({ return; }) ret L1 NEXT:[] -- 2 jmp(L5 ['if' expression result]) NEXT:[merge(if (i is Int) { return; }|!) -> ] PREV:[] +- 2 jmp(L5) NEXT:[merge(if (i is Int) { return; }|!) -> ] PREV:[] L4 [else branch]: - read (Unit) PREV:[jf(L4 [else branch]|)] + read (Unit) PREV:[jf(L4|)] L5 ['if' expression result]: merge(if (i is Int) { return; }|!) -> L1: diff --git a/compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.instructions b/compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.instructions index 877cf7b743e..6913077c504 100644 --- a/compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.instructions +++ b/compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.instructions @@ -10,19 +10,19 @@ L0: 2 mark({ while(0 > 1) { 2 } }) L2 [loop entry point]: L6 [condition entry point]: - r(0) -> PREV:[mark({ while(0 > 1) { 2 } }), jmp(L2 [loop entry point])] + r(0) -> PREV:[mark({ while(0 > 1) { 2 } }), jmp(L2)] r(1) -> mark(0 > 1) call(0 > 1, compareTo|, ) -> mark(while(0 > 1) { 2 }) - jf(L3 [loop exit point]|) NEXT:[read (Unit), mark({ 2 })] + jf(L3|) NEXT:[read (Unit), mark({ 2 })] L4 [body entry point]: 3 mark({ 2 }) r(2) -> - 2 jmp(L2 [loop entry point]) NEXT:[r(0) -> ] + 2 jmp(L2) NEXT:[r(0) -> ] L3 [loop exit point]: L5 [body exit point]: - read (Unit) PREV:[jf(L3 [loop exit point]|)] + read (Unit) PREV:[jf(L3|)] L1: 1 NEXT:[] error: @@ -50,7 +50,7 @@ L6 [condition entry point]: - r(1) -> PREV:[] - mark(0 > 1) PREV:[] - call(0 > 1, compareTo|, ) -> PREV:[] -- jt(L2 [loop entry point]|) NEXT:[read (Unit), mark({return})] PREV:[] +- jt(L2|) NEXT:[read (Unit), mark({return})] PREV:[] L3 [loop exit point]: - read (Unit) PREV:[] L1: @@ -59,4 +59,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/controlStructures/continueInDoWhile.instructions b/compiler/testData/cfg/controlStructures/continueInDoWhile.instructions index 5b986327efb..abf81b4f3d5 100644 --- a/compiler/testData/cfg/controlStructures/continueInDoWhile.instructions +++ b/compiler/testData/cfg/controlStructures/continueInDoWhile.instructions @@ -15,27 +15,27 @@ L0: 3 mark(do { if (b) break; continue; } while (true)) L2 [loop entry point]: L4 [body entry point]: - mark({ if (b) break; continue; }) PREV:[mark(do { if (b) break; continue; } while (true)), jt(L2 [loop entry point]|)] + mark({ if (b) break; continue; }) PREV:[mark(do { if (b) break; continue; } while (true)), jt(L2|)] mark(if (b) break) r(b) -> - jf(L7 [else branch]|) NEXT:[read (Unit), jmp(L3 [loop exit point])] - jmp(L3 [loop exit point]) NEXT:[read (Unit)] -- jmp(L8 ['if' expression result]) NEXT:[merge(if (b) break|!) -> ] PREV:[] + jf(L7|) NEXT:[read (Unit), jmp(L3)] + jmp(L3) NEXT:[read (Unit)] +- jmp(L8) NEXT:[merge(if (b) break|!) -> ] PREV:[] L7 [else branch]: - read (Unit) PREV:[jf(L7 [else branch]|)] + read (Unit) PREV:[jf(L7|)] L8 ['if' expression result]: merge(if (b) break|!) -> - jmp(L6 [condition entry point]) + jmp(L6) L5 [body exit point]: L6 [condition entry point]: r(true) -> - jt(L2 [loop entry point]|) NEXT:[read (Unit), mark({ if (b) break; continue; })] + jt(L2|) NEXT:[read (Unit), mark({ if (b) break; continue; })] L3 [loop exit point]: - read (Unit) PREV:[jmp(L3 [loop exit point]), jt(L2 [loop entry point]|)] + read (Unit) PREV:[jmp(L3), jt(L2|)] L1: 1 NEXT:[] error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/controlStructures/continueInFor.instructions b/compiler/testData/cfg/controlStructures/continueInFor.instructions index 3df3f3223b0..cf2e7d7cb6e 100644 --- a/compiler/testData/cfg/controlStructures/continueInFor.instructions +++ b/compiler/testData/cfg/controlStructures/continueInFor.instructions @@ -19,7 +19,7 @@ L0: v(i) L2 [loop entry point]: L6 [condition entry point]: - jmp?(L3 [loop exit point]) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..10|) -> ] PREV:[v(i), jmp(L6 [condition entry point])] + jmp?(L3) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..10|) -> ] PREV:[v(i), jmp(L6)] magic[LOOP_RANGE_ITERATION](1..10|) -> w(i|) mark(for (i in 1..10) { if (b) break; continue; }) @@ -27,22 +27,22 @@ L4 [body entry point]: 4 mark({ if (b) break; continue; }) mark(if (b) break) r(b) -> - jf(L7 [else branch]|) NEXT:[read (Unit), jmp(L3 [loop exit point])] - jmp(L3 [loop exit point]) NEXT:[read (Unit)] -- jmp(L8 ['if' expression result]) NEXT:[merge(if (b) break|!) -> ] PREV:[] + jf(L7|) NEXT:[read (Unit), jmp(L3)] + jmp(L3) NEXT:[read (Unit)] +- jmp(L8) NEXT:[merge(if (b) break|!) -> ] PREV:[] L7 [else branch]: - read (Unit) PREV:[jf(L7 [else branch]|)] + read (Unit) PREV:[jf(L7|)] L8 ['if' expression result]: merge(if (b) break|!) -> - jmp(L6 [condition entry point]) NEXT:[jmp?(L3 [loop exit point])] -- 3 jmp(L2 [loop entry point]) NEXT:[jmp?(L3 [loop exit point])] PREV:[] + jmp(L6) NEXT:[jmp?(L3)] +- 3 jmp(L2) NEXT:[jmp?(L3)] PREV:[] L3 [loop exit point]: L5 [body exit point]: - read (Unit) PREV:[jmp?(L3 [loop exit point]), jmp(L3 [loop exit point])] + read (Unit) PREV:[jmp?(L3), jmp(L3)] L1: 1 NEXT:[] error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/controlStructures/continueInWhile.instructions b/compiler/testData/cfg/controlStructures/continueInWhile.instructions index fff0aef56cd..642a7dc91ab 100644 --- a/compiler/testData/cfg/controlStructures/continueInWhile.instructions +++ b/compiler/testData/cfg/controlStructures/continueInWhile.instructions @@ -14,29 +14,29 @@ L0: 2 mark({ while (true) { if (b) break; continue; } }) L2 [loop entry point]: L6 [condition entry point]: - r(true) -> PREV:[mark({ while (true) { if (b) break; continue; } }), jmp(L6 [condition entry point])] + r(true) -> PREV:[mark({ while (true) { if (b) break; continue; } }), jmp(L6)] mark(while (true) { if (b) break; continue; }) magic[VALUE_CONSUMER](true|) -> L4 [body entry point]: 3 mark({ if (b) break; continue; }) mark(if (b) break) r(b) -> - jf(L7 [else branch]|) NEXT:[read (Unit), jmp(L3 [loop exit point])] - jmp(L3 [loop exit point]) NEXT:[read (Unit)] -- jmp(L8 ['if' expression result]) NEXT:[merge(if (b) break|!) -> ] PREV:[] + jf(L7|) NEXT:[read (Unit), jmp(L3)] + jmp(L3) NEXT:[read (Unit)] +- jmp(L8) NEXT:[merge(if (b) break|!) -> ] PREV:[] L7 [else branch]: - read (Unit) PREV:[jf(L7 [else branch]|)] + read (Unit) PREV:[jf(L7|)] L8 ['if' expression result]: merge(if (b) break|!) -> - jmp(L6 [condition entry point]) NEXT:[r(true) -> ] -- 2 jmp(L2 [loop entry point]) NEXT:[r(true) -> ] PREV:[] + jmp(L6) NEXT:[r(true) -> ] +- 2 jmp(L2) NEXT:[r(true) -> ] PREV:[] L3 [loop exit point]: L5 [body exit point]: - read (Unit) PREV:[jmp(L3 [loop exit point])] + read (Unit) PREV:[jmp(L3)] L1: 1 NEXT:[] error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/controlStructures/returnsInWhen.instructions b/compiler/testData/cfg/controlStructures/returnsInWhen.instructions index 3b9cbb1b238..ae587588b7d 100644 --- a/compiler/testData/cfg/controlStructures/returnsInWhen.instructions +++ b/compiler/testData/cfg/controlStructures/returnsInWhen.instructions @@ -16,14 +16,14 @@ L0: mark(is Int -> return a) mark(is Int) magic[IS](is Int|) -> - jmp?(L4 [next 'when' entry]|) NEXT:[merge(when(a) { is Int -> return a }|!) -> , r(a) -> ] + jmp?(L4|) NEXT:[merge(when(a) { is Int -> return a }|!) -> , r(a) -> ] L3 ['when' entry body]: r(a) -> ret(*|) L1 NEXT:[] -- jmp(L2 [after 'when' expression]) PREV:[] +- jmp(L2) PREV:[] L2 [after 'when' expression]: L4 [next 'when' entry]: - merge(when(a) { is Int -> return a }|!) -> PREV:[jmp?(L4 [next 'when' entry]|)] + merge(when(a) { is Int -> return a }|!) -> PREV:[jmp?(L4|)] L1: 1 NEXT:[] PREV:[ret(*|) L1, merge(when(a) { is Int -> return a }|!) -> ] error: diff --git a/compiler/testData/cfg/controlStructures/whenConditions.instructions b/compiler/testData/cfg/controlStructures/whenConditions.instructions index 3acb34eef05..839713ce39f 100644 --- a/compiler/testData/cfg/controlStructures/whenConditions.instructions +++ b/compiler/testData/cfg/controlStructures/whenConditions.instructions @@ -23,62 +23,62 @@ L0: mark(1) r(1) -> magic[EQUALS_IN_WHEN_CONDITION](1|, ) -> - jmp?(L4 [next 'when' entry]|) NEXT:[mark(in Collections.singleton(2) -> "2"), mark("1")] + jmp?(L4|) NEXT:[mark(in Collections.singleton(2) -> "2"), mark("1")] L3 ['when' entry body]: mark("1") r("1") -> - jmp(L2 [after 'when' expression]) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] + jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] L4 [next 'when' entry]: - mark(in Collections.singleton(2) -> "2") PREV:[jmp?(L4 [next 'when' entry]|)] + mark(in Collections.singleton(2) -> "2") PREV:[jmp?(L4|)] mark(Collections.singleton(2)) r(2) -> mark(singleton(2)) call(singleton(2), singleton|) -> mark(in Collections.singleton(2)) call(in Collections.singleton(2), contains|, ) -> - jmp?(L6 [next 'when' entry]|) NEXT:[mark(is Int -> "Int"), mark("2")] + jmp?(L6|) NEXT:[mark(is Int -> "Int"), mark("2")] L5 ['when' entry body]: mark("2") r("2") -> - jmp(L2 [after 'when' expression]) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] + jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] L6 [next 'when' entry]: - mark(is Int -> "Int") PREV:[jmp?(L6 [next 'when' entry]|)] + mark(is Int -> "Int") PREV:[jmp?(L6|)] mark(is Int) magic[IS](is Int|) -> - jmp?(L8 [next 'when' entry]|) NEXT:[mark(!in Collections.singleton(3) -> "!3"), mark("Int")] + jmp?(L8|) NEXT:[mark(!in Collections.singleton(3) -> "!3"), mark("Int")] L7 ['when' entry body]: mark("Int") r("Int") -> - jmp(L2 [after 'when' expression]) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] + jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] L8 [next 'when' entry]: - mark(!in Collections.singleton(3) -> "!3") PREV:[jmp?(L8 [next 'when' entry]|)] + mark(!in Collections.singleton(3) -> "!3") PREV:[jmp?(L8|)] mark(Collections.singleton(3)) r(3) -> mark(singleton(3)) call(singleton(3), singleton|) -> mark(!in Collections.singleton(3)) call(!in Collections.singleton(3), contains|, ) -> - jmp?(L10 [next 'when' entry]|) NEXT:[mark(!is Number -> "!Number"), mark("!3")] + jmp?(L10|) NEXT:[mark(!is Number -> "!Number"), mark("!3")] L9 ['when' entry body]: mark("!3") r("!3") -> - jmp(L2 [after 'when' expression]) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] + jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] L10 [next 'when' entry]: - mark(!is Number -> "!Number") PREV:[jmp?(L10 [next 'when' entry]|)] + mark(!is Number -> "!Number") PREV:[jmp?(L10|)] mark(!is Number) magic[IS](!is Number|) -> - jmp?(L12 [next 'when' entry]|) NEXT:[mark(else -> null), mark("!Number")] + jmp?(L12|) NEXT:[mark(else -> null), mark("!Number")] L11 ['when' entry body]: mark("!Number") r("!Number") -> - jmp(L2 [after 'when' expression]) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] + jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] L12 [next 'when' entry]: - mark(else -> null) PREV:[jmp?(L12 [next 'when' entry]|)] + mark(else -> null) PREV:[jmp?(L12|)] L13 ['when' entry body]: r(null) -> - jmp(L2 [after 'when' expression]) + jmp(L2) L2 [after 'when' expression]: - merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> PREV:[jmp(L2 [after 'when' expression]), jmp(L2 [after 'when' expression]), jmp(L2 [after 'when' expression]), jmp(L2 [after 'when' expression]), jmp(L2 [after 'when' expression]), jmp(L2 [after 'when' expression])] + merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> PREV:[jmp(L2), jmp(L2), jmp(L2), jmp(L2), jmp(L2), jmp(L2)] w(t|) L1: 1 NEXT:[] diff --git a/compiler/testData/cfg/conventions/bothReceivers.instructions b/compiler/testData/cfg/conventions/bothReceivers.instructions index 1790e1a3cf9..d42a92a9758 100644 --- a/compiler/testData/cfg/conventions/bothReceivers.instructions +++ b/compiler/testData/cfg/conventions/bothReceivers.instructions @@ -62,4 +62,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/conventions/equals.instructions b/compiler/testData/cfg/conventions/equals.instructions index 3c6bdac3e27..714ebdc43bb 100644 --- a/compiler/testData/cfg/conventions/equals.instructions +++ b/compiler/testData/cfg/conventions/equals.instructions @@ -18,14 +18,14 @@ L0: r(b) -> mark(a == b) call(a == b, equals|, ) -> - jf(L2 [else branch]|) NEXT:[read (Unit), mark({ })] + jf(L2|) NEXT:[read (Unit), mark({ })] 3 mark({ }) read (Unit) - 2 jmp(L3 ['if' expression result]) NEXT:[merge(if (a == b) { }|!) -> ] + 2 jmp(L3) NEXT:[merge(if (a == b) { }|!) -> ] L2 [else branch]: - read (Unit) PREV:[jf(L2 [else branch]|)] + read (Unit) PREV:[jf(L2|)] L3 ['if' expression result]: - merge(if (a == b) { }|!) -> PREV:[jmp(L3 ['if' expression result]), read (Unit)] + merge(if (a == b) { }|!) -> PREV:[jmp(L3), read (Unit)] L1: 1 NEXT:[] error: diff --git a/compiler/testData/cfg/conventions/incrementAtTheEnd.instructions b/compiler/testData/cfg/conventions/incrementAtTheEnd.instructions index c8b7072ce91..c79e508291a 100644 --- a/compiler/testData/cfg/conventions/incrementAtTheEnd.instructions +++ b/compiler/testData/cfg/conventions/incrementAtTheEnd.instructions @@ -20,4 +20,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/conventions/invoke.instructions b/compiler/testData/cfg/conventions/invoke.instructions index 84e30b6cce8..302bd93d56b 100644 --- a/compiler/testData/cfg/conventions/invoke.instructions +++ b/compiler/testData/cfg/conventions/invoke.instructions @@ -18,4 +18,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/conventions/notEqual.instructions b/compiler/testData/cfg/conventions/notEqual.instructions index 0c9c39d8c29..8cd6247a7ca 100644 --- a/compiler/testData/cfg/conventions/notEqual.instructions +++ b/compiler/testData/cfg/conventions/notEqual.instructions @@ -17,14 +17,14 @@ L0: r(b) -> mark(a != b) call(a != b, equals|, ) -> - jf(L2 [else branch]|) NEXT:[read (Unit), mark({})] + jf(L2|) NEXT:[read (Unit), mark({})] 3 mark({}) read (Unit) - 2 jmp(L3 ['if' expression result]) NEXT:[merge(if (a != b) {}|!) -> ] + 2 jmp(L3) NEXT:[merge(if (a != b) {}|!) -> ] L2 [else branch]: - read (Unit) PREV:[jf(L2 [else branch]|)] + read (Unit) PREV:[jf(L2|)] L3 ['if' expression result]: - merge(if (a != b) {}|!) -> PREV:[jmp(L3 ['if' expression result]), read (Unit)] + merge(if (a != b) {}|!) -> PREV:[jmp(L3), read (Unit)] L1: 1 NEXT:[] error: diff --git a/compiler/testData/cfg/deadCode/DeadCode.instructions b/compiler/testData/cfg/deadCode/DeadCode.instructions index d2f50e1096e..3f963fd725c 100644 --- a/compiler/testData/cfg/deadCode/DeadCode.instructions +++ b/compiler/testData/cfg/deadCode/DeadCode.instructions @@ -19,4 +19,4 @@ error: PREV:[throw (throw Exception()|)] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/deadCode/returnInElvis.instructions b/compiler/testData/cfg/deadCode/returnInElvis.instructions index 39214e81f6e..5aa30893454 100644 --- a/compiler/testData/cfg/deadCode/returnInElvis.instructions +++ b/compiler/testData/cfg/deadCode/returnInElvis.instructions @@ -8,7 +8,7 @@ L0: 2 mark({ return ?: null }) ret L1 NEXT:[] - mark(return ?: null) PREV:[] -- jt(L2 [after elvis operator]) NEXT:[r(null) -> , merge(return ?: null|!, ) -> ] PREV:[] +- jt(L2) NEXT:[r(null) -> , merge(return ?: null|!, ) -> ] PREV:[] - r(null) -> PREV:[] L2 [after elvis operator]: - merge(return ?: null|!, ) -> PREV:[] @@ -18,4 +18,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/deadCode/stringTemplate.instructions b/compiler/testData/cfg/deadCode/stringTemplate.instructions index 2ecdd940ba3..a5df716e614 100644 --- a/compiler/testData/cfg/deadCode/stringTemplate.instructions +++ b/compiler/testData/cfg/deadCode/stringTemplate.instructions @@ -19,4 +19,4 @@ error: PREV:[throw (throw Exception()|)] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.instructions b/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.instructions index 5033d258a64..6e89c5fb0a8 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.instructions +++ b/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.instructions @@ -36,4 +36,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.instructions b/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.instructions index 2045d3927fd..b2917e4afd8 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.instructions +++ b/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.instructions @@ -56,4 +56,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.instructions b/compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.instructions index d207130ef9a..79e2d5ae1cb 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.instructions +++ b/compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.instructions @@ -43,4 +43,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.instructions b/compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.instructions index f119f491772..bcc95cb7294 100644 --- a/compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.instructions +++ b/compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.instructions @@ -7,16 +7,16 @@ L0: 1 2 mark({ {} }) mark({}) - jmp?(L2 [after local declaration]) NEXT:[r({}) -> , d({})] - d({}) NEXT:[] + jmp?(L2) NEXT:[r({}) -> , d({})] + d({}) NEXT:[] L2 [after local declaration]: - r({}) -> PREV:[jmp?(L2 [after local declaration])] + r({}) -> PREV:[jmp?(L2)] L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, , d({})] + PREV:[, , d({})] ===================== == anonymous_0 == {} diff --git a/compiler/testData/cfg/declarations/functions/FailFunction.instructions b/compiler/testData/cfg/declarations/functions/FailFunction.instructions index e122701c675..255a1c389d0 100644 --- a/compiler/testData/cfg/declarations/functions/FailFunction.instructions +++ b/compiler/testData/cfg/declarations/functions/FailFunction.instructions @@ -17,4 +17,4 @@ error: PREV:[throw (throw java.lang.RuntimeException()|)] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/functions/typeParameter.instructions b/compiler/testData/cfg/declarations/functions/typeParameter.instructions index 941b6dc7445..3193e8e3b10 100644 --- a/compiler/testData/cfg/declarations/functions/typeParameter.instructions +++ b/compiler/testData/cfg/declarations/functions/typeParameter.instructions @@ -14,4 +14,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions b/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions index 3c1cbd42cd2..732cec5d147 100644 --- a/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions +++ b/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions @@ -141,10 +141,10 @@ L0: v(val a = object { val y : Int fun inner_bar() { y = 10 } }) mark(object { val y : Int fun inner_bar() { y = 10 } }) v(val y : Int) - jmp?(L2 [after local declaration]) NEXT:[r(object { val y : Int fun inner_bar() { y = 10 } }) -> , d(fun inner_bar() { y = 10 })] + jmp?(L2) NEXT:[r(object { val y : Int fun inner_bar() { y = 10 } }) -> , d(fun inner_bar() { y = 10 })] d(fun inner_bar() { y = 10 }) NEXT:[] L2 [after local declaration]: - r(object { val y : Int fun inner_bar() { y = 10 } }) -> PREV:[jmp?(L2 [after local declaration])] + r(object { val y : Int fun inner_bar() { y = 10 } }) -> PREV:[jmp?(L2)] w(a|) L1: 1 NEXT:[] @@ -196,10 +196,10 @@ L0: magic[IMPLICIT_RECEIVER]($x) -> r(1) -> w($x|, ) - 2 jmp?(L2 [after local declaration]) NEXT:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> , d(fun ggg() { y = 10 })] + 2 jmp?(L2) NEXT:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> , d(fun ggg() { y = 10 })] d(fun ggg() { y = 10 }) NEXT:[] L2 [after local declaration]: - r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> PREV:[jmp?(L2 [after local declaration])] + r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> PREV:[jmp?(L2)] w(a|) L1: 1 NEXT:[] @@ -254,13 +254,13 @@ L0: magic[IMPLICIT_RECEIVER]($x) -> r(2) -> w($x|, ) - 2 jmp?(L2 [after local declaration]) NEXT:[jmp?(L5 [after local declaration]), d(fun foo() { x = 3 })] + 2 jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })] d(fun foo() { x = 3 }) NEXT:[] L2 [after local declaration]: - jmp?(L5 [after local declaration]) NEXT:[r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> , d(fun bar() { x = 4 })] PREV:[jmp?(L2 [after local declaration])] + jmp?(L5) NEXT:[r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> , d(fun bar() { x = 4 })] PREV:[jmp?(L2)] d(fun bar() { x = 4 }) NEXT:[] L5 [after local declaration]: - r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> PREV:[jmp?(L5 [after local declaration])] + r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> PREV:[jmp?(L5)] w(a|) L1: 1 NEXT:[] diff --git a/compiler/testData/cfg/declarations/local/ObjectExpression.instructions b/compiler/testData/cfg/declarations/local/ObjectExpression.instructions index 9b5064482a0..33e977e7794 100644 --- a/compiler/testData/cfg/declarations/local/ObjectExpression.instructions +++ b/compiler/testData/cfg/declarations/local/ObjectExpression.instructions @@ -81,4 +81,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/local/localClass.instructions b/compiler/testData/cfg/declarations/local/localClass.instructions index d037e0d3a68..ea7ec9ebaee 100644 --- a/compiler/testData/cfg/declarations/local/localClass.instructions +++ b/compiler/testData/cfg/declarations/local/localClass.instructions @@ -14,11 +14,11 @@ fun f() { L0: 1 2 mark({ class LocalClass() { fun f() { val x = "" fun loc() { val x3 = "" } } } }) - jmp?(L2 [after local declaration]) NEXT:[, d(fun f() { val x = "" fun loc() { val x3 = "" } })] + jmp?(L2) NEXT:[, d(fun f() { val x = "" fun loc() { val x3 = "" } })] d(fun f() { val x = "" fun loc() { val x3 = "" } }) NEXT:[] L1: L2 [after local declaration]: - 1 NEXT:[] PREV:[jmp?(L2 [after local declaration])] + 1 NEXT:[] PREV:[jmp?(L2)] error: PREV:[] sink: @@ -40,11 +40,11 @@ L3: mark("") r("") -> w(x|) - jmp?(L5 [after local declaration]) NEXT:[, d(fun loc() { val x3 = "" })] + jmp?(L5) NEXT:[, d(fun loc() { val x3 = "" })] d(fun loc() { val x3 = "" }) NEXT:[] L4: L5 [after local declaration]: - 3 NEXT:[] PREV:[jmp?(L5 [after local declaration])] + 3 NEXT:[] PREV:[jmp?(L5)] error: PREV:[] sink: diff --git a/compiler/testData/cfg/declarations/local/localProperty.instructions b/compiler/testData/cfg/declarations/local/localProperty.instructions index 97e4308a411..ba91e1ed178 100644 --- a/compiler/testData/cfg/declarations/local/localProperty.instructions +++ b/compiler/testData/cfg/declarations/local/localProperty.instructions @@ -13,11 +13,11 @@ L0: 1 2 mark({ class B { val a: Int get() { val b: Int return b } } }) v(val a: Int get() { val b: Int return b }) - jmp?(L2 [after local declaration]) NEXT:[, d(get() { val b: Int return b })] + jmp?(L2) NEXT:[, d(get() { val b: Int return b })] d(get() { val b: Int return b }) NEXT:[] L1: L2 [after local declaration]: - 1 NEXT:[] PREV:[jmp?(L2 [after local declaration])] + 1 NEXT:[] PREV:[jmp?(L2)] error: PREV:[] sink: diff --git a/compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.instructions b/compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.instructions index 8f98c9214dd..2a2f4727e3f 100644 --- a/compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.instructions +++ b/compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.instructions @@ -69,4 +69,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.instructions b/compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.instructions index 5777f20e318..5c4d63ed170 100644 --- a/compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.instructions +++ b/compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.instructions @@ -24,4 +24,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/properties/DelegatedProperty.instructions b/compiler/testData/cfg/declarations/properties/DelegatedProperty.instructions index c113a2ea28a..3313b2454a8 100644 --- a/compiler/testData/cfg/declarations/properties/DelegatedProperty.instructions +++ b/compiler/testData/cfg/declarations/properties/DelegatedProperty.instructions @@ -62,4 +62,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/properties/backingFieldAccess.instructions b/compiler/testData/cfg/declarations/properties/backingFieldAccess.instructions index bfd6adf4cfd..e4bca8ff7dd 100644 --- a/compiler/testData/cfg/declarations/properties/backingFieldAccess.instructions +++ b/compiler/testData/cfg/declarations/properties/backingFieldAccess.instructions @@ -20,4 +20,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/properties/backingFieldQualifiedWithThis.instructions b/compiler/testData/cfg/declarations/properties/backingFieldQualifiedWithThis.instructions index 5a01240d9c4..e2d652d107a 100644 --- a/compiler/testData/cfg/declarations/properties/backingFieldQualifiedWithThis.instructions +++ b/compiler/testData/cfg/declarations/properties/backingFieldQualifiedWithThis.instructions @@ -33,4 +33,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/Assignments.instructions b/compiler/testData/cfg/expressions/Assignments.instructions index c70a8cbf74e..6e562377eea 100644 --- a/compiler/testData/cfg/expressions/Assignments.instructions +++ b/compiler/testData/cfg/expressions/Assignments.instructions @@ -44,27 +44,27 @@ L0: w(x|) mark(if (true) 1 else 2) r(true) -> - jf(L2 [else branch]|) NEXT:[r(2) -> , r(1) -> ] + jf(L2|) NEXT:[r(2) -> , r(1) -> ] r(1) -> - jmp(L3 ['if' expression result]) NEXT:[merge(if (true) 1 else 2|, ) -> ] + jmp(L3) NEXT:[merge(if (true) 1 else 2|, ) -> ] L2 [else branch]: - r(2) -> PREV:[jf(L2 [else branch]|)] + r(2) -> PREV:[jf(L2|)] L3 ['if' expression result]: - merge(if (true) 1 else 2|, ) -> PREV:[jmp(L3 ['if' expression result]), r(2) -> ] + merge(if (true) 1 else 2|, ) -> PREV:[jmp(L3), r(2) -> ] w(x|) v(val y = true && false) r(true) -> - jf(L4 [result of boolean operation]|) NEXT:[magic[AND](true && false|, ) -> , r(false) -> ] + jf(L4|) NEXT:[magic[AND](true && false|, ) -> , r(false) -> ] r(false) -> L4 [result of boolean operation]: - magic[AND](true && false|, ) -> PREV:[jf(L4 [result of boolean operation]|), r(false) -> ] + magic[AND](true && false|, ) -> PREV:[jf(L4|), r(false) -> ] w(y|) v(val z = false && true) r(false) -> - jf(L5 [result of boolean operation]|) NEXT:[magic[AND](false && true|, ) -> , r(true) -> ] + jf(L5|) NEXT:[magic[AND](false && true|, ) -> , r(true) -> ] r(true) -> L5 [result of boolean operation]: - magic[AND](false && true|, ) -> PREV:[jf(L5 [result of boolean operation]|), r(true) -> ] + magic[AND](false && true|, ) -> PREV:[jf(L5|), r(true) -> ] w(z|) v(val t = Test()) mark(Test()) diff --git a/compiler/testData/cfg/expressions/LazyBooleans.instructions b/compiler/testData/cfg/expressions/LazyBooleans.instructions index 611e3155be9..2207f282924 100644 --- a/compiler/testData/cfg/expressions/LazyBooleans.instructions +++ b/compiler/testData/cfg/expressions/LazyBooleans.instructions @@ -28,63 +28,63 @@ L0: 2 mark({ if (a) { 1 } else { 2 } 3 if (a && b) 5 else 6 7 if (a || b) 8 else 9 10 if (a) 11 12 if (a) else 13 14 }) mark(if (a) { 1 } else { 2 }) r(a) -> - jf(L2 [else branch]|) NEXT:[mark({ 2 }), mark({ 1 })] + jf(L2|) NEXT:[mark({ 2 }), mark({ 1 })] 3 mark({ 1 }) r(1) -> - 2 jmp(L3 ['if' expression result]) NEXT:[merge(if (a) { 1 } else { 2 }|, ) -> ] + 2 jmp(L3) NEXT:[merge(if (a) { 1 } else { 2 }|, ) -> ] L2 [else branch]: - 3 mark({ 2 }) PREV:[jf(L2 [else branch]|)] + 3 mark({ 2 }) PREV:[jf(L2|)] r(2) -> L3 ['if' expression result]: - 2 merge(if (a) { 1 } else { 2 }|, ) -> PREV:[jmp(L3 ['if' expression result]), r(2) -> ] + 2 merge(if (a) { 1 } else { 2 }|, ) -> PREV:[jmp(L3), r(2) -> ] r(3) -> mark(if (a && b) 5 else 6) r(a) -> - jf(L4 [result of boolean operation]|) NEXT:[magic[AND](a && b|, ) -> , r(b) -> ] + jf(L4|) NEXT:[magic[AND](a && b|, ) -> , r(b) -> ] r(b) -> L4 [result of boolean operation]: - magic[AND](a && b|, ) -> PREV:[jf(L4 [result of boolean operation]|), r(b) -> ] - jf(L5 [else branch]|) NEXT:[r(6) -> , r(5) -> ] + magic[AND](a && b|, ) -> PREV:[jf(L4|), r(b) -> ] + jf(L5|) NEXT:[r(6) -> , r(5) -> ] r(5) -> - jmp(L6 ['if' expression result]) NEXT:[merge(if (a && b) 5 else 6|, ) -> ] + jmp(L6) NEXT:[merge(if (a && b) 5 else 6|, ) -> ] L5 [else branch]: - r(6) -> PREV:[jf(L5 [else branch]|)] + r(6) -> PREV:[jf(L5|)] L6 ['if' expression result]: - merge(if (a && b) 5 else 6|, ) -> PREV:[jmp(L6 ['if' expression result]), r(6) -> ] + merge(if (a && b) 5 else 6|, ) -> PREV:[jmp(L6), r(6) -> ] r(7) -> mark(if (a || b) 8 else 9) r(a) -> - jt(L7 [result of boolean operation]|) NEXT:[r(b) -> , magic[OR](a || b|, ) -> ] + jt(L7|) NEXT:[r(b) -> , magic[OR](a || b|, ) -> ] r(b) -> L7 [result of boolean operation]: - magic[OR](a || b|, ) -> PREV:[jt(L7 [result of boolean operation]|), r(b) -> ] - jf(L8 [else branch]|) NEXT:[r(9) -> , r(8) -> ] + magic[OR](a || b|, ) -> PREV:[jt(L7|), r(b) -> ] + jf(L8|) NEXT:[r(9) -> , r(8) -> ] r(8) -> - jmp(L9 ['if' expression result]) NEXT:[merge(if (a || b) 8 else 9|, ) -> ] + jmp(L9) NEXT:[merge(if (a || b) 8 else 9|, ) -> ] L8 [else branch]: - r(9) -> PREV:[jf(L8 [else branch]|)] + r(9) -> PREV:[jf(L8|)] L9 ['if' expression result]: - merge(if (a || b) 8 else 9|, ) -> PREV:[jmp(L9 ['if' expression result]), r(9) -> ] + merge(if (a || b) 8 else 9|, ) -> PREV:[jmp(L9), r(9) -> ] r(10) -> mark(if (a) 11) r(a) -> - jf(L10 [else branch]|) NEXT:[read (Unit), r(11) -> ] + jf(L10|) NEXT:[read (Unit), r(11) -> ] r(11) -> - jmp(L11 ['if' expression result]) NEXT:[merge(if (a) 11|) -> ] + jmp(L11) NEXT:[merge(if (a) 11|) -> ] L10 [else branch]: - read (Unit) PREV:[jf(L10 [else branch]|)] + read (Unit) PREV:[jf(L10|)] L11 ['if' expression result]: - merge(if (a) 11|) -> PREV:[jmp(L11 ['if' expression result]), read (Unit)] + merge(if (a) 11|) -> PREV:[jmp(L11), read (Unit)] r(12) -> mark(if (a) else 13) r(a) -> - jf(L12 [else branch]|) NEXT:[r(13) -> , read (Unit)] + jf(L12|) NEXT:[r(13) -> , read (Unit)] read (Unit) - jmp(L13 ['if' expression result]) NEXT:[merge(if (a) else 13|) -> ] + jmp(L13) NEXT:[merge(if (a) else 13|) -> ] L12 [else branch]: - r(13) -> PREV:[jf(L12 [else branch]|)] + r(13) -> PREV:[jf(L12|)] L13 ['if' expression result]: - merge(if (a) else 13|) -> PREV:[jmp(L13 ['if' expression result]), r(13) -> ] + merge(if (a) else 13|) -> PREV:[jmp(L13), r(13) -> ] r(14) -> L1: 1 NEXT:[] diff --git a/compiler/testData/cfg/expressions/ReturnFromExpression.instructions b/compiler/testData/cfg/expressions/ReturnFromExpression.instructions index 9404f720979..73a287c3a03 100644 --- a/compiler/testData/cfg/expressions/ReturnFromExpression.instructions +++ b/compiler/testData/cfg/expressions/ReturnFromExpression.instructions @@ -7,12 +7,12 @@ L0: 1 2 mark({ false || (return false) }) r(false) -> - jt(L2 [result of boolean operation]|) NEXT:[mark((return false)), magic[OR](false || (return false)|, !) -> ] + jt(L2|) NEXT:[mark((return false)), magic[OR](false || (return false)|, !) -> ] mark((return false)) r(false) -> ret(*|) L1 NEXT:[] L2 [result of boolean operation]: - magic[OR](false || (return false)|, !) -> PREV:[jt(L2 [result of boolean operation]|)] + magic[OR](false || (return false)|, !) -> PREV:[jt(L2|)] L1: 1 NEXT:[] PREV:[ret(*|) L1, magic[OR](false || (return false)|, !) -> ] error: diff --git a/compiler/testData/cfg/expressions/assignmentToThis.instructions b/compiler/testData/cfg/expressions/assignmentToThis.instructions index b0bca6f7a78..1252b97f023 100644 --- a/compiler/testData/cfg/expressions/assignmentToThis.instructions +++ b/compiler/testData/cfg/expressions/assignmentToThis.instructions @@ -17,4 +17,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/callableReferences.instructions b/compiler/testData/cfg/expressions/callableReferences.instructions index b1b613a9824..eb8a426ed25 100644 --- a/compiler/testData/cfg/expressions/callableReferences.instructions +++ b/compiler/testData/cfg/expressions/callableReferences.instructions @@ -26,4 +26,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/chainedQualifiedExpression.instructions b/compiler/testData/cfg/expressions/chainedQualifiedExpression.instructions index c091344fd31..52ef716fd77 100644 --- a/compiler/testData/cfg/expressions/chainedQualifiedExpression.instructions +++ b/compiler/testData/cfg/expressions/chainedQualifiedExpression.instructions @@ -573,4 +573,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/expressionAsFunction.instructions b/compiler/testData/cfg/expressions/expressionAsFunction.instructions index a933a3c976f..5eebf891b77 100644 --- a/compiler/testData/cfg/expressions/expressionAsFunction.instructions +++ b/compiler/testData/cfg/expressions/expressionAsFunction.instructions @@ -19,4 +19,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/incdec.instructions b/compiler/testData/cfg/expressions/incdec.instructions index 993ac589dd6..74e648a7891 100644 --- a/compiler/testData/cfg/expressions/incdec.instructions +++ b/compiler/testData/cfg/expressions/incdec.instructions @@ -62,4 +62,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/nothingExpr.instructions b/compiler/testData/cfg/expressions/nothingExpr.instructions index a9e0a73f99b..46ecc12559b 100644 --- a/compiler/testData/cfg/expressions/nothingExpr.instructions +++ b/compiler/testData/cfg/expressions/nothingExpr.instructions @@ -55,4 +55,4 @@ error: PREV:[jmp(error)] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/parenthesizedSelector.instructions b/compiler/testData/cfg/expressions/parenthesizedSelector.instructions index 235a4589c47..c42e07ca2c3 100644 --- a/compiler/testData/cfg/expressions/parenthesizedSelector.instructions +++ b/compiler/testData/cfg/expressions/parenthesizedSelector.instructions @@ -49,10 +49,10 @@ L0: 2 mark({ with(1) { "".(foo)() } }) r(1) -> mark({ "".(foo)() }) - jmp?(L2 [after local declaration]) NEXT:[r({ "".(foo)() }) -> , d({ "".(foo)() })] + jmp?(L2) NEXT:[r({ "".(foo)() }) -> , d({ "".(foo)() })] d({ "".(foo)() }) NEXT:[] L2 [after local declaration]: - r({ "".(foo)() }) -> PREV:[jmp?(L2 [after local declaration])] + r({ "".(foo)() }) -> PREV:[jmp?(L2)] mark(with(1) { "".(foo)() }) call(with(1) { "".(foo)() }, with|, ) -> L1: diff --git a/compiler/testData/cfg/expressions/propertySafeCall.instructions b/compiler/testData/cfg/expressions/propertySafeCall.instructions index f4be858ac32..56a9f456e9a 100644 --- a/compiler/testData/cfg/expressions/propertySafeCall.instructions +++ b/compiler/testData/cfg/expressions/propertySafeCall.instructions @@ -18,4 +18,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.instructions b/compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.instructions index f9dff87e9cf..2dfaf5dad7b 100644 --- a/compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.instructions +++ b/compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.instructions @@ -18,4 +18,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/thisExpression.instructions b/compiler/testData/cfg/expressions/thisExpression.instructions index 14075064b94..9dd52b56176 100644 --- a/compiler/testData/cfg/expressions/thisExpression.instructions +++ b/compiler/testData/cfg/expressions/thisExpression.instructions @@ -14,4 +14,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/unresolvedCall.instructions b/compiler/testData/cfg/expressions/unresolvedCall.instructions index d4dfb765cb0..720df77239b 100644 --- a/compiler/testData/cfg/expressions/unresolvedCall.instructions +++ b/compiler/testData/cfg/expressions/unresolvedCall.instructions @@ -21,4 +21,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/unresolvedProperty.instructions b/compiler/testData/cfg/expressions/unresolvedProperty.instructions index bf28f30c1e0..7ebe5f55591 100644 --- a/compiler/testData/cfg/expressions/unresolvedProperty.instructions +++ b/compiler/testData/cfg/expressions/unresolvedProperty.instructions @@ -19,4 +19,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/unresolvedWriteLHS.instructions b/compiler/testData/cfg/expressions/unresolvedWriteLHS.instructions index fb7f381dd94..7a929be8f3f 100644 --- a/compiler/testData/cfg/expressions/unresolvedWriteLHS.instructions +++ b/compiler/testData/cfg/expressions/unresolvedWriteLHS.instructions @@ -15,4 +15,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/expressions/unusedExpressionSimpleName.instructions b/compiler/testData/cfg/expressions/unusedExpressionSimpleName.instructions index 2b43e7499a8..2eaf5af0244 100644 --- a/compiler/testData/cfg/expressions/unusedExpressionSimpleName.instructions +++ b/compiler/testData/cfg/expressions/unusedExpressionSimpleName.instructions @@ -17,4 +17,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/functions/DefaultValuesForArguments.instructions b/compiler/testData/cfg/functions/DefaultValuesForArguments.instructions index ece941690a2..7a3a6c6a86e 100644 --- a/compiler/testData/cfg/functions/DefaultValuesForArguments.instructions +++ b/compiler/testData/cfg/functions/DefaultValuesForArguments.instructions @@ -4,10 +4,10 @@ fun foo(i: Int = 1, j: Int) = i + j L0: 1 v(i: Int = 1) - jmp?(L2 [after default value for parameter i]) NEXT:[magic[FAKE_INITIALIZER](i: Int = 1) -> , r(1) -> ] + jmp?(L2) NEXT:[magic[FAKE_INITIALIZER](i: Int = 1) -> , r(1) -> ] r(1) -> L2 [after default value for parameter i]: - magic[FAKE_INITIALIZER](i: Int = 1) -> PREV:[jmp?(L2 [after default value for parameter i]), r(1) -> ] + magic[FAKE_INITIALIZER](i: Int = 1) -> PREV:[jmp?(L2), r(1) -> ] merge(i: Int = 1|, ) -> w(i|) v(j: Int) @@ -19,9 +19,9 @@ L2 [after default value for parameter i]: call(i + j, plus|, ) -> ret(*|) L1 L1: - NEXT:[] + NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] -===================== + PREV:[, ] +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/tailCalls/finally.instructions b/compiler/testData/cfg/tailCalls/finally.instructions index 7f81127342d..66951e726e1 100644 --- a/compiler/testData/cfg/tailCalls/finally.instructions +++ b/compiler/testData/cfg/tailCalls/finally.instructions @@ -11,19 +11,19 @@ L0: 1 2 mark({ try { // do nothing } finally { test() } }) mark(try { // do nothing } finally { test() }) - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ test() }), mark({ // do nothing })] + jmp?(L2) NEXT:[mark({ test() }), mark({ // do nothing })] 3 mark({ // do nothing }) read (Unit) - 2 jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ test() })] + 2 jmp(L3) NEXT:[mark({ test() })] L2 [onExceptionToFinallyBlock]: L4 [start finally]: - 3 mark({ test() }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + 3 mark({ test() }) PREV:[jmp?(L2)] mark(test()) call(test(), test) -> L5 [finish finally]: 2 jmp(error) NEXT:[] L3 [skipFinallyToErrorBlock]: - 3 mark({ test() }) PREV:[jmp(L3 [skipFinallyToErrorBlock])] + 3 mark({ test() }) PREV:[jmp(L3)] mark(test()) call(test(), test) -> 2 merge(try { // do nothing } finally { test() }|!) -> @@ -33,4 +33,4 @@ error: PREV:[jmp(error)] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/tailCalls/finallyWithReturn.instructions b/compiler/testData/cfg/tailCalls/finallyWithReturn.instructions index c9985a45cfc..4ccff7c5e4f 100644 --- a/compiler/testData/cfg/tailCalls/finallyWithReturn.instructions +++ b/compiler/testData/cfg/tailCalls/finallyWithReturn.instructions @@ -11,20 +11,20 @@ L0: 1 2 mark({ try { // do nothing } finally { return test() } }) mark(try { // do nothing } finally { return test() }) - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ return test() }), mark({ // do nothing })] + jmp?(L2) NEXT:[mark({ return test() }), mark({ // do nothing })] 3 mark({ // do nothing }) read (Unit) - 2 jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ return test() })] + 2 jmp(L3) NEXT:[mark({ return test() })] L2 [onExceptionToFinallyBlock]: L4 [start finally]: - 3 mark({ return test() }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + 3 mark({ return test() }) PREV:[jmp?(L2)] mark(test()) call(test(), test) -> ret(*|) L1 NEXT:[] L5 [finish finally]: - 2 jmp(error) NEXT:[] PREV:[] L3 [skipFinallyToErrorBlock]: - 3 mark({ return test() }) PREV:[jmp(L3 [skipFinallyToErrorBlock])] + 3 mark({ return test() }) PREV:[jmp(L3)] mark(test()) call(test(), test) -> ret(*|) L1 NEXT:[] @@ -35,4 +35,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/tailCalls/sum.instructions b/compiler/testData/cfg/tailCalls/sum.instructions index 956392f5985..41c04a83b62 100644 --- a/compiler/testData/cfg/tailCalls/sum.instructions +++ b/compiler/testData/cfg/tailCalls/sum.instructions @@ -21,12 +21,12 @@ L0: call(toLong(), toLong|) -> mark(x == 0.toLong()) call(x == 0.toLong(), equals|, ) -> - jf(L2 [else branch]|) NEXT:[read (Unit), r(sum) -> ] + jf(L2|) NEXT:[read (Unit), r(sum) -> ] r(sum) -> ret(*|) L1 NEXT:[] -- jmp(L3 ['if' expression result]) NEXT:[merge(if (x == 0.toLong()) return sum|!) -> ] PREV:[] +- jmp(L3) NEXT:[merge(if (x == 0.toLong()) return sum|!) -> ] PREV:[] L2 [else branch]: - read (Unit) PREV:[jf(L2 [else branch]|)] + read (Unit) PREV:[jf(L2|)] L3 ['if' expression result]: merge(if (x == 0.toLong()) return sum|!) -> r(x) -> diff --git a/compiler/testData/cfg/tailCalls/try.instructions b/compiler/testData/cfg/tailCalls/try.instructions index f850733ee47..cb82c5d952a 100644 --- a/compiler/testData/cfg/tailCalls/try.instructions +++ b/compiler/testData/cfg/tailCalls/try.instructions @@ -11,19 +11,19 @@ L0: 1 2 mark({ try { return foo() } catch (e: Throwable) { } }) mark(try { return foo() } catch (e: Throwable) { }) - jmp?(L2 [onException]) NEXT:[v(e: Throwable), mark({ return foo() })] + jmp?(L2) NEXT:[v(e: Throwable), mark({ return foo() })] 3 mark({ return foo() }) mark(foo()) call(foo(), foo) -> ret(*|) L1 NEXT:[] -- 2 jmp(L3 [afterCatches]) NEXT:[merge(try { return foo() } catch (e: Throwable) { }|!, !) -> ] PREV:[] +- 2 jmp(L3) NEXT:[merge(try { return foo() } catch (e: Throwable) { }|!, !) -> ] PREV:[] L2 [onException]: - 3 v(e: Throwable) PREV:[jmp?(L2 [onException])] + 3 v(e: Throwable) PREV:[jmp?(L2)] magic[FAKE_INITIALIZER](e: Throwable) -> w(e|) 4 mark({ }) read (Unit) - 3 jmp(L3 [afterCatches]) + 3 jmp(L3) L3 [afterCatches]: 2 merge(try { return foo() } catch (e: Throwable) { }|!, !) -> L1: @@ -32,4 +32,4 @@ error: PREV:[] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/testData/cfg/tailCalls/tryCatchFinally.instructions b/compiler/testData/cfg/tailCalls/tryCatchFinally.instructions index 099a3458352..12083fdaee1 100644 --- a/compiler/testData/cfg/tailCalls/tryCatchFinally.instructions +++ b/compiler/testData/cfg/tailCalls/tryCatchFinally.instructions @@ -13,31 +13,31 @@ L0: 1 2 mark({ try { test() } catch (any : Exception) { test() } finally { test() } }) mark(try { test() } catch (any : Exception) { test() } finally { test() }) - jmp?(L2 [onException]) NEXT:[v(any : Exception), jmp?(L3 [onExceptionToFinallyBlock])] - jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ test() }), mark({ test() })] + jmp?(L2) NEXT:[v(any : Exception), jmp?(L3)] + jmp?(L3) NEXT:[mark({ test() }), mark({ test() })] 3 mark({ test() }) mark(test()) call(test(), test) -> - 2 jmp(L4 [afterCatches]) NEXT:[jmp(L5 [skipFinallyToErrorBlock])] + 2 jmp(L4) NEXT:[jmp(L5)] L2 [onException]: - 3 v(any : Exception) PREV:[jmp?(L2 [onException])] + 3 v(any : Exception) PREV:[jmp?(L2)] magic[FAKE_INITIALIZER](any : Exception) -> w(any|) 4 mark({ test() }) mark(test()) call(test(), test) -> - 3 jmp(L4 [afterCatches]) + 3 jmp(L4) L4 [afterCatches]: - 2 jmp(L5 [skipFinallyToErrorBlock]) NEXT:[mark({ test() })] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches])] + 2 jmp(L5) NEXT:[mark({ test() })] PREV:[jmp(L4), jmp(L4)] L3 [onExceptionToFinallyBlock]: L6 [start finally]: - 3 mark({ test() }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])] + 3 mark({ test() }) PREV:[jmp?(L3)] mark(test()) call(test(), test) -> L7 [finish finally]: 2 jmp(error) NEXT:[] L5 [skipFinallyToErrorBlock]: - 3 mark({ test() }) PREV:[jmp(L5 [skipFinallyToErrorBlock])] + 3 mark({ test() }) PREV:[jmp(L5)] mark(test()) call(test(), test) -> 2 merge(try { test() } catch (any : Exception) { test() } finally { test() }|, ) -> @@ -47,4 +47,4 @@ error: PREV:[jmp(error)] sink: PREV:[, ] -===================== +===================== \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/cfg/AbstractPseudocodeTest.java b/compiler/tests/org/jetbrains/jet/cfg/AbstractPseudocodeTest.java index 734e4c4d512..5f3aadd3fad 100644 --- a/compiler/tests/org/jetbrains/jet/cfg/AbstractPseudocodeTest.java +++ b/compiler/tests/org/jetbrains/jet/cfg/AbstractPseudocodeTest.java @@ -188,7 +188,7 @@ public abstract class AbstractPseudocodeTest extends KotlinTestWithEnvironment { Instruction instruction = instructions.get(i); for (PseudocodeImpl.PseudocodeLabel label: labels) { if (label.getTargetInstructionIndex() == i) { - out.append(label.getName()).append(":\n"); + out.append(label).append(":\n"); } }