diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilder.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilder.java index 17f5bbb2990..0069892a3ce 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilder.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilder.java @@ -81,7 +81,7 @@ public interface JetControlFlowBuilder { void repeatPseudocode(@NotNull Label startLabel, @NotNull Label finishLabel); // Reading values - void readUnit(@NotNull JetExpression expression); + void loadUnit(@NotNull JetExpression expression); void read(@NotNull JetElement element); void write(@NotNull JetElement assignment, @NotNull JetElement lValue); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilderAdapter.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilderAdapter.java index 551936e756d..54761eca22e 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilderAdapter.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilderAdapter.java @@ -33,9 +33,9 @@ public class JetControlFlowBuilderAdapter implements JetControlFlowBuilder { } @Override - public void readUnit(@NotNull JetExpression expression) { + public void loadUnit(@NotNull JetExpression expression) { assert builder != null; - builder.readUnit(expression); + builder.loadUnit(expression); } @Override diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java index 052f36ebb02..5f281e033c1 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java @@ -339,7 +339,7 @@ public class JetControlFlowProcessor { generateInstructions(thenBranch, inCondition); } else { - builder.readUnit(expression); + builder.loadUnit(expression); } Label resultLabel = builder.createUnboundLabel(); builder.jump(resultLabel); @@ -349,7 +349,7 @@ public class JetControlFlowProcessor { generateInstructions(elseBranch, inCondition); } else { - builder.readUnit(expression); + builder.loadUnit(expression); } builder.bindLabel(resultLabel); } @@ -493,7 +493,7 @@ public class JetControlFlowProcessor { } builder.jump(loopInfo.getEntryPoint()); builder.exitLoop(expression); - builder.readUnit(expression); + builder.loadUnit(expression); } @Override @@ -513,7 +513,7 @@ public class JetControlFlowProcessor { } builder.jumpOnTrue(loopInfo.getEntryPoint()); builder.exitLoop(expression); - builder.readUnit(expression); + builder.loadUnit(expression); } @Override @@ -549,7 +549,7 @@ public class JetControlFlowProcessor { builder.nondeterministicJump(loopInfo.getEntryPoint()); builder.exitLoop(expression); - builder.readUnit(expression); + builder.loadUnit(expression); } @Override @@ -644,7 +644,7 @@ public class JetControlFlowProcessor { generateInstructions(statement, false); } if (statements.isEmpty()) { - builder.readUnit(expression); + builder.loadUnit(expression); } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetFlowInformationProvider.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetFlowInformationProvider.java index 8520ee972b2..c7cb2ba2371 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetFlowInformationProvider.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetFlowInformationProvider.java @@ -167,7 +167,7 @@ public class JetFlowInformationProvider { Collection unreachableElements = Lists.newArrayList(); for (Instruction deadInstruction : pseudocode.getDeadInstructions()) { if (deadInstruction instanceof JetElementInstruction && - !(deadInstruction instanceof ReadUnitValueInstruction)) { + !(deadInstruction instanceof LoadUnitValueInstruction)) { unreachableElements.add(((JetElementInstruction) deadInstruction).getElement()); } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/InstructionVisitor.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/InstructionVisitor.java index 0914136b638..e999e3d19c3 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/InstructionVisitor.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/InstructionVisitor.java @@ -84,7 +84,7 @@ public class InstructionVisitor { visitInstructionWithNext(writeValueInstruction); } - public void visitReadUnitValue(ReadUnitValueInstruction instruction) { + public void visitLoadUnitValue(LoadUnitValueInstruction instruction) { visitInstructionWithNext(instruction); } } 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 7ebc9d39c85..c199656516a 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 @@ -257,8 +257,8 @@ public class JetControlFlowInstructionsGenerator extends JetControlFlowBuilderAd } @Override - public void readUnit(@NotNull JetExpression expression) { - add(new ReadUnitValueInstruction(expression)); + public void loadUnit(@NotNull JetExpression expression) { + add(new LoadUnitValueInstruction(expression)); } @Override diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/ReadUnitValueInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LoadUnitValueInstruction.java similarity index 81% rename from compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/ReadUnitValueInstruction.java rename to compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LoadUnitValueInstruction.java index 27543e70be5..e59398f2b12 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/ReadUnitValueInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LoadUnitValueInstruction.java @@ -19,15 +19,15 @@ package org.jetbrains.jet.lang.cfg.pseudocode; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.psi.JetExpression; -public class ReadUnitValueInstruction extends InstructionWithNext { +public class LoadUnitValueInstruction extends InstructionWithNext { - public ReadUnitValueInstruction(@NotNull JetExpression expression) { + public LoadUnitValueInstruction(@NotNull JetExpression expression) { super(expression); } @Override public void accept(InstructionVisitor visitor) { - visitor.visitReadUnitValue(this); + visitor.visitLoadUnitValue(this); } @Override @@ -37,6 +37,6 @@ public class ReadUnitValueInstruction extends InstructionWithNext { @Override protected Instruction createCopy() { - return new ReadUnitValueInstruction((JetExpression) element); + return new LoadUnitValueInstruction((JetExpression) element); } }