1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-24 04:31:02 +00:00

Removed a bit of unused code.

This commit is contained in:
jespergravgaard 2018-02-13 12:46:35 +01:00
parent c8a2d03550
commit aec15a3125
5 changed files with 2 additions and 33 deletions

View File

@ -38,21 +38,6 @@ public class ControlFlowBlock {
this.conditionalSuccessor = null;
}
public ControlFlowBlock(
LabelRef label,
ScopeRef scope,
List<Statement> statements,
LabelRef defaultSuccessor,
LabelRef conditionalSuccessor,
LabelRef callSuccessor) {
this.label = label;
this.scope = scope;
this.statements = statements;
this.defaultSuccessor = defaultSuccessor;
this.conditionalSuccessor = conditionalSuccessor;
this.callSuccessor = callSuccessor;
}
public LabelRef getLabel() {
return label;
}
@ -166,9 +151,7 @@ public class ControlFlowBlock {
public boolean equals(Object o) {
if(this == o) return true;
if(o == null || getClass() != o.getClass()) return false;
ControlFlowBlock that = (ControlFlowBlock) o;
if(!label.equals(that.label)) return false;
if(statements != null ? !statements.equals(that.statements) : that.statements != null) return false;
if(defaultSuccessor != null ? !defaultSuccessor.equals(that.defaultSuccessor) : that.defaultSuccessor != null)

View File

@ -21,15 +21,6 @@ public class ControlFlowGraph {
this.firstBlockRef = firstBlockRef;
}
public ControlFlowGraph(
Map<LabelRef, ControlFlowBlock> blocks,
LabelRef firstBlockRef,
List<LabelRef> sequence) {
this.blocks = blocks;
this.firstBlockRef = firstBlockRef;
this.sequence = sequence;
}
public ControlFlowBlock getBlock(LabelRef symbol) {
return blocks.get(symbol);
}

View File

@ -7,6 +7,7 @@ public interface LValue extends RValue {
* Singleton signalling that an RValue is never assigned and can safely be discarded as rvalue in phi-functions.
*/
public static RValue VOID = new RValue() {
@Override
public String toString() {
return toString(null);

View File

@ -17,12 +17,6 @@ public class Label implements Symbol {
this.intermediate = intermediate;
}
public Label( String name, boolean intermediate) {
this.name = name;
this.scope = null;
this.intermediate = intermediate;
}
@Override
public String getLocalName() {
return name;

View File

@ -588,7 +588,7 @@ public class TestPrograms {
int asmRes = KickAssembler.main2(new String[]{asmFile.getAbsolutePath(), "-log", asmLogFile.getAbsolutePath(), "-o", asmPrgFile.getAbsolutePath(), "-vicesymbols", "-showmem"});
System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
if(asmRes!=0) {
fail("KickAssembling file failed!");
fail("KickAssembling file failed! "+kickAssOut.toString());
}
}