Rename method and class
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ public class JetFlowInformationProvider {
|
||||
Collection<JetElement> unreachableElements = Lists.newArrayList();
|
||||
for (Instruction deadInstruction : pseudocode.getDeadInstructions()) {
|
||||
if (deadInstruction instanceof JetElementInstruction &&
|
||||
!(deadInstruction instanceof ReadUnitValueInstruction)) {
|
||||
!(deadInstruction instanceof LoadUnitValueInstruction)) {
|
||||
unreachableElements.add(((JetElementInstruction) deadInstruction).getElement());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class InstructionVisitor {
|
||||
visitInstructionWithNext(writeValueInstruction);
|
||||
}
|
||||
|
||||
public void visitReadUnitValue(ReadUnitValueInstruction instruction) {
|
||||
public void visitLoadUnitValue(LoadUnitValueInstruction instruction) {
|
||||
visitInstructionWithNext(instruction);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+4
-4
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user