Rename method and class

This commit is contained in:
Andrey Breslav
2013-11-29 15:41:35 +04:00
parent 750390704d
commit f26fe1b71a
7 changed files with 17 additions and 17 deletions
@@ -81,7 +81,7 @@ public interface JetControlFlowBuilder {
void repeatPseudocode(@NotNull Label startLabel, @NotNull Label finishLabel); void repeatPseudocode(@NotNull Label startLabel, @NotNull Label finishLabel);
// Reading values // Reading values
void readUnit(@NotNull JetExpression expression); void loadUnit(@NotNull JetExpression expression);
void read(@NotNull JetElement element); void read(@NotNull JetElement element);
void write(@NotNull JetElement assignment, @NotNull JetElement lValue); void write(@NotNull JetElement assignment, @NotNull JetElement lValue);
@@ -33,9 +33,9 @@ public class JetControlFlowBuilderAdapter implements JetControlFlowBuilder {
} }
@Override @Override
public void readUnit(@NotNull JetExpression expression) { public void loadUnit(@NotNull JetExpression expression) {
assert builder != null; assert builder != null;
builder.readUnit(expression); builder.loadUnit(expression);
} }
@Override @Override
@@ -339,7 +339,7 @@ public class JetControlFlowProcessor {
generateInstructions(thenBranch, inCondition); generateInstructions(thenBranch, inCondition);
} }
else { else {
builder.readUnit(expression); builder.loadUnit(expression);
} }
Label resultLabel = builder.createUnboundLabel(); Label resultLabel = builder.createUnboundLabel();
builder.jump(resultLabel); builder.jump(resultLabel);
@@ -349,7 +349,7 @@ public class JetControlFlowProcessor {
generateInstructions(elseBranch, inCondition); generateInstructions(elseBranch, inCondition);
} }
else { else {
builder.readUnit(expression); builder.loadUnit(expression);
} }
builder.bindLabel(resultLabel); builder.bindLabel(resultLabel);
} }
@@ -493,7 +493,7 @@ public class JetControlFlowProcessor {
} }
builder.jump(loopInfo.getEntryPoint()); builder.jump(loopInfo.getEntryPoint());
builder.exitLoop(expression); builder.exitLoop(expression);
builder.readUnit(expression); builder.loadUnit(expression);
} }
@Override @Override
@@ -513,7 +513,7 @@ public class JetControlFlowProcessor {
} }
builder.jumpOnTrue(loopInfo.getEntryPoint()); builder.jumpOnTrue(loopInfo.getEntryPoint());
builder.exitLoop(expression); builder.exitLoop(expression);
builder.readUnit(expression); builder.loadUnit(expression);
} }
@Override @Override
@@ -549,7 +549,7 @@ public class JetControlFlowProcessor {
builder.nondeterministicJump(loopInfo.getEntryPoint()); builder.nondeterministicJump(loopInfo.getEntryPoint());
builder.exitLoop(expression); builder.exitLoop(expression);
builder.readUnit(expression); builder.loadUnit(expression);
} }
@Override @Override
@@ -644,7 +644,7 @@ public class JetControlFlowProcessor {
generateInstructions(statement, false); generateInstructions(statement, false);
} }
if (statements.isEmpty()) { if (statements.isEmpty()) {
builder.readUnit(expression); builder.loadUnit(expression);
} }
} }
@@ -167,7 +167,7 @@ public class JetFlowInformationProvider {
Collection<JetElement> unreachableElements = Lists.newArrayList(); Collection<JetElement> unreachableElements = Lists.newArrayList();
for (Instruction deadInstruction : pseudocode.getDeadInstructions()) { for (Instruction deadInstruction : pseudocode.getDeadInstructions()) {
if (deadInstruction instanceof JetElementInstruction && if (deadInstruction instanceof JetElementInstruction &&
!(deadInstruction instanceof ReadUnitValueInstruction)) { !(deadInstruction instanceof LoadUnitValueInstruction)) {
unreachableElements.add(((JetElementInstruction) deadInstruction).getElement()); unreachableElements.add(((JetElementInstruction) deadInstruction).getElement());
} }
} }
@@ -84,7 +84,7 @@ public class InstructionVisitor {
visitInstructionWithNext(writeValueInstruction); visitInstructionWithNext(writeValueInstruction);
} }
public void visitReadUnitValue(ReadUnitValueInstruction instruction) { public void visitLoadUnitValue(LoadUnitValueInstruction instruction) {
visitInstructionWithNext(instruction); visitInstructionWithNext(instruction);
} }
} }
@@ -257,8 +257,8 @@ public class JetControlFlowInstructionsGenerator extends JetControlFlowBuilderAd
} }
@Override @Override
public void readUnit(@NotNull JetExpression expression) { public void loadUnit(@NotNull JetExpression expression) {
add(new ReadUnitValueInstruction(expression)); add(new LoadUnitValueInstruction(expression));
} }
@Override @Override
@@ -19,15 +19,15 @@ package org.jetbrains.jet.lang.cfg.pseudocode;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.lang.psi.JetExpression; 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); super(expression);
} }
@Override @Override
public void accept(InstructionVisitor visitor) { public void accept(InstructionVisitor visitor) {
visitor.visitReadUnitValue(this); visitor.visitLoadUnitValue(this);
} }
@Override @Override
@@ -37,6 +37,6 @@ public class ReadUnitValueInstruction extends InstructionWithNext {
@Override @Override
protected Instruction createCopy() { protected Instruction createCopy() {
return new ReadUnitValueInstruction((JetExpression) element); return new LoadUnitValueInstruction((JetExpression) element);
} }
} }