1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-20 02:32:36 +00:00

Renamed fragment system classes in prepararion of graph based solution.

This commit is contained in:
jespergravgaard 2018-01-02 17:09:42 +01:00
parent 3595db56db
commit b29ed11a81
2 changed files with 7 additions and 7 deletions

View File

@ -11,7 +11,7 @@ import org.antlr.v4.runtime.*;
public class AsmFragmentTemplate {
/** true if the fragment was loaded from disk. */
boolean file;
private boolean file;
/** The fragment template signature name. */
private String signature;
/** The fragment template body */

View File

@ -220,8 +220,8 @@ public class Pass4CodeGeneration {
throw new AsmFragmentInstance.AluNotApplicableException();
}
StatementAssignment assignment = (StatementAssignment) statement;
AsmFragmentInstanceSpec signature = new AsmFragmentInstanceSpec(assignment, assignmentAlu, program);
AsmFragmentInstance asmFragmentInstance = AsmFragmentTemplateManager.getFragment(signature, program.getLog());
AsmFragmentInstanceSpec asmFragmentInstanceSpec = new AsmFragmentInstanceSpec(assignment, assignmentAlu, program);
AsmFragmentInstance asmFragmentInstance = AsmFragmentTemplateManager.getFragment(asmFragmentInstanceSpec, program.getLog());
asm.getCurrentSegment().setFragment(asmFragmentInstance.getFragmentName());
asmFragmentInstance.generate(asm);
aluState.clear();
@ -254,8 +254,8 @@ public class Pass4CodeGeneration {
}
}
} else if(statement instanceof StatementConditionalJump) {
AsmFragmentInstanceSpec asmSignature = new AsmFragmentInstanceSpec((StatementConditionalJump) statement, block, program, getGraph());
AsmFragmentInstance asmFragmentInstance = AsmFragmentTemplateManager.getFragment(asmSignature, program.getLog());
AsmFragmentInstanceSpec asmFragmentInstanceSpec = new AsmFragmentInstanceSpec((StatementConditionalJump) statement, block, program, getGraph());
AsmFragmentInstance asmFragmentInstance = AsmFragmentTemplateManager.getFragment(asmFragmentInstanceSpec, program.getLog());
asm.getCurrentSegment().setFragment(asmFragmentInstance.getFragmentName());
asmFragmentInstance.generate(asm);
} else if(statement instanceof StatementCall) {
@ -340,8 +340,8 @@ public class Pass4CodeGeneration {
if(isRegisterCopy(lValue, rValue)) {
asm.getCurrentSegment().setFragment("register_copy");
} else {
AsmFragmentInstanceSpec asmSignature = new AsmFragmentInstanceSpec(lValue, rValue, program, scope);
AsmFragmentInstance asmFragmentInstance = AsmFragmentTemplateManager.getFragment(asmSignature, program.getLog());
AsmFragmentInstanceSpec asmFragmentInstanceSpec = new AsmFragmentInstanceSpec(lValue, rValue, program, scope);
AsmFragmentInstance asmFragmentInstance = AsmFragmentTemplateManager.getFragment(asmFragmentInstanceSpec, program.getLog());
asm.getCurrentSegment().setFragment(asmFragmentInstance.getFragmentName());
asmFragmentInstance.generate(asm);
}