diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/AbstractJumpInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/AbstractJumpInstruction.java index 16cfcca96fe..a37d8f3ad2c 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/AbstractJumpInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/AbstractJumpInstruction.java @@ -54,6 +54,7 @@ public abstract class AbstractJumpInstruction extends InstructionImpl { return updateCopyInfo(createCopy(newLabel)); } + @NotNull @Override protected Instruction createCopy() { return createCopy(targetLabel); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/Instruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/Instruction.java index 232adc96b49..691129c3b8c 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/Instruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/Instruction.java @@ -32,7 +32,7 @@ public interface Instruction { @NotNull Collection getNextInstructions(); - void accept(InstructionVisitor visitor); + void accept(@NotNull InstructionVisitor visitor); @NotNull Collection getCopies(); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/InstructionImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/InstructionImpl.java index 0d9038697aa..f14cfdddbae 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/InstructionImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/InstructionImpl.java @@ -71,6 +71,7 @@ public abstract class InstructionImpl implements Instruction { return updateCopyInfo(createCopy()); } + @NotNull protected abstract Instruction createCopy(); @NotNull diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetElementInstructionImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetElementInstructionImpl.java index e16ac7fefdd..efa4573db75 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetElementInstructionImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetElementInstructionImpl.java @@ -20,6 +20,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.psi.JetElement; public abstract class JetElementInstructionImpl extends InstructionImpl implements JetElementInstruction { + @NotNull protected final JetElement element; public JetElementInstructionImpl(@NotNull JetElement element) { diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LoadUnitValueInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LoadUnitValueInstruction.java index e59398f2b12..278d8e3ef39 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LoadUnitValueInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LoadUnitValueInstruction.java @@ -35,6 +35,7 @@ public class LoadUnitValueInstruction extends InstructionWithNext { return "read (Unit)"; } + @NotNull @Override protected Instruction createCopy() { return new LoadUnitValueInstruction((JetExpression) element); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LocalFunctionDeclarationInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LocalFunctionDeclarationInstruction.java index 5ce9209a1de..0a9ae9a625a 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LocalFunctionDeclarationInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LocalFunctionDeclarationInstruction.java @@ -62,6 +62,7 @@ public class LocalFunctionDeclarationInstruction extends InstructionWithNext { return "d" + "(" + element.getText() + ")"; } + @NotNull @Override protected Instruction createCopy() { return new LocalFunctionDeclarationInstruction(element, body); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/NondeterministicJumpInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/NondeterministicJumpInstruction.java index d1ea7e79cb7..12c6f93a82f 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/NondeterministicJumpInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/NondeterministicJumpInstruction.java @@ -85,6 +85,7 @@ public class NondeterministicJumpInstruction extends InstructionImpl{ return sb.toString(); } + @NotNull @Override protected Instruction createCopy() { return createCopy(getTargetLabels()); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/ReadValueInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/ReadValueInstruction.java index 5d53c78d8d1..7724d8dec77 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/ReadValueInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/ReadValueInstruction.java @@ -35,6 +35,7 @@ public class ReadValueInstruction extends InstructionWithNext { return "r(" + element.getText() + ")"; } + @NotNull @Override protected Instruction createCopy() { return new ReadValueInstruction(element); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/SubroutineEnterInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/SubroutineEnterInstruction.java index d5ded806bee..03dbf34f1b0 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/SubroutineEnterInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/SubroutineEnterInstruction.java @@ -41,6 +41,7 @@ public class SubroutineEnterInstruction extends InstructionWithNext { return ""; } + @NotNull @Override protected Instruction createCopy() { return new SubroutineEnterInstruction(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 395363fd908..076939093d2 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 @@ -57,6 +57,7 @@ public class SubroutineExitInstruction extends InstructionImpl { return debugLabel; } + @NotNull @Override protected Instruction createCopy() { return new SubroutineExitInstruction(subroutine, debugLabel); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/SubroutineSinkInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/SubroutineSinkInstruction.java index 8e16339c34b..d56bd8f0f42 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/SubroutineSinkInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/SubroutineSinkInstruction.java @@ -51,6 +51,7 @@ public class SubroutineSinkInstruction extends InstructionImpl { return debugLabel; } + @NotNull @Override protected Instruction createCopy() { return new SubroutineSinkInstruction(subroutine, debugLabel); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/UnsupportedElementInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/UnsupportedElementInstruction.java index 73c3a8aa9d3..c3fc7b8824d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/UnsupportedElementInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/UnsupportedElementInstruction.java @@ -35,6 +35,7 @@ public class UnsupportedElementInstruction extends InstructionWithNext { return "unsupported(" + element + " : " + element.getText() + ")"; } + @NotNull @Override protected Instruction createCopy() { return new UnsupportedElementInstruction(element); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/VariableDeclarationInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/VariableDeclarationInstruction.java index 3efa43932d7..2ad143591b1 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/VariableDeclarationInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/VariableDeclarationInstruction.java @@ -45,6 +45,7 @@ public class VariableDeclarationInstruction extends InstructionWithNext { return "v(" + element.getText() + ")"; } + @NotNull @Override protected Instruction createCopy() { if (element instanceof JetParameter) { diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/WriteValueInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/WriteValueInstruction.java index 4214ca9adc4..9c8a09a5bba 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/WriteValueInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/WriteValueInstruction.java @@ -35,7 +35,7 @@ public class WriteValueInstruction extends InstructionWithNext { } @Override - public void accept(InstructionVisitor visitor) { + public void accept(@NotNull InstructionVisitor visitor) { visitor.visitWriteValue(this); } @@ -48,6 +48,7 @@ public class WriteValueInstruction extends InstructionWithNext { return "w(" + lValue.getText() + ")"; } + @NotNull @Override protected Instruction createCopy() { return new WriteValueInstruction(element, lValue);