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 c28557ccf4f..616bfad3b82 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 @@ -219,9 +219,9 @@ public class JetControlFlowInstructionsGenerator extends JetControlFlowBuilderAd @Override public Pseudocode exitSubroutine(@NotNull JetElement subroutine) { bindLabel(getExitPoint(subroutine)); - pseudocode.addExitInstruction(new SubroutineExitInstruction(subroutine, "")); + pseudocode.addExitInstruction(new SubroutineExitInstruction(subroutine, false)); bindLabel(error); - pseudocode.addErrorInstruction(new SubroutineExitInstruction(subroutine, "")); + pseudocode.addErrorInstruction(new SubroutineExitInstruction(subroutine, true)); bindLabel(sink); pseudocode.addSinkInstruction(new SubroutineSinkInstruction(subroutine, "")); elementToBlockInfo.remove(subroutine); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/SubroutineExitInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/SubroutineExitInstruction.java index 49b539b933f..7bbd2395009 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/SubroutineExitInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/SubroutineExitInstruction.java @@ -24,18 +24,22 @@ import java.util.Collections; public class SubroutineExitInstruction extends InstructionImpl { private final JetElement subroutine; - private final String debugLabel; + private final boolean isError; private SubroutineSinkInstruction sinkInstruction; - public SubroutineExitInstruction(@NotNull JetElement subroutine, @NotNull String debugLabel) { + public SubroutineExitInstruction(@NotNull JetElement subroutine, boolean isError) { this.subroutine = subroutine; - this.debugLabel = debugLabel; + this.isError = isError; } public JetElement getSubroutine() { return subroutine; } + public boolean isError() { + return isError; + } + public void setSink(SubroutineSinkInstruction instruction) { sinkInstruction = (SubroutineSinkInstruction) outgoingEdgeTo(instruction); } @@ -59,12 +63,12 @@ public class SubroutineExitInstruction extends InstructionImpl { @Override public String toString() { - return debugLabel; + return isError ? "" : ""; } @NotNull @Override protected Instruction createCopy() { - return new SubroutineExitInstruction(subroutine, debugLabel); + return new SubroutineExitInstruction(subroutine, isError); } }