removed duplication of pseudocode in tests

for local functions
This commit is contained in:
Svetlana Isakova
2014-03-04 19:07:45 +04:00
parent ec47821567
commit 1fc4573a8c
7 changed files with 0 additions and 184 deletions
@@ -211,7 +211,6 @@ public abstract class AbstractControlFlowTest extends KotlinTestWithEnvironment
List<Instruction> instructions = pseudocode.getAllInstructions();
Set<Instruction> remainedAfterPostProcessInstructions = Sets.newHashSet(pseudocode.getInstructions());
List<PseudocodeImpl.PseudocodeLabel> labels = pseudocode.getLabels();
List<PseudocodeImpl> locals = new ArrayList<PseudocodeImpl>();
int maxLength = 0;
int maxNextLength = 0;
for (Instruction instruction : instructions) {
@@ -238,10 +237,6 @@ public abstract class AbstractControlFlowTest extends KotlinTestWithEnvironment
}
for (int i = 0; i < instructions.size(); i++) {
Instruction instruction = instructions.get(i);
if (instruction instanceof LocalFunctionDeclarationInstruction) {
LocalFunctionDeclarationInstruction localFunctionDeclarationInstruction = (LocalFunctionDeclarationInstruction) instruction;
locals.add((PseudocodeImpl) localFunctionDeclarationInstruction.getBody());
}
for (PseudocodeImpl.PseudocodeLabel label: labels) {
if (label.getTargetInstructionIndex() == i) {
out.append(label.getName()).append(":\n");
@@ -267,9 +262,6 @@ public abstract class AbstractControlFlowTest extends KotlinTestWithEnvironment
out.append(StringUtil.trimTrailing(line.toString()));
out.append("\n");
}
for (PseudocodeImpl local : locals) {
dumpInstructions(local, out);
}
}
private static boolean sameContents(@Nullable Instruction natural, Collection<Instruction> actual) {