mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-12-26 18:29:54 +00:00
Removed unneccesary condition.
This commit is contained in:
parent
f32f44cd92
commit
e2cb37eaf3
@ -102,7 +102,7 @@ public class Pass4CodeGeneration {
|
|||||||
linkScriptBody = linkScriptBody.replace("%_O", outputFileName.toLowerCase());
|
linkScriptBody = linkScriptBody.replace("%_O", outputFileName.toLowerCase());
|
||||||
linkScriptBody = linkScriptBody.replace("%^O", outputFileName.toUpperCase());
|
linkScriptBody = linkScriptBody.replace("%^O", outputFileName.toUpperCase());
|
||||||
final ControlFlowBlock beginBlock = getGraph().getBlock(new LabelRef(SymbolRef.BEGIN_BLOCK_NAME));
|
final ControlFlowBlock beginBlock = getGraph().getBlock(new LabelRef(SymbolRef.BEGIN_BLOCK_NAME));
|
||||||
String entryName = (beginBlock==null)?"main":"__bbegin";
|
String entryName = (beginBlock == null) ? "main" : "__bbegin";
|
||||||
linkScriptBody = linkScriptBody.replace("%E", entryName);
|
linkScriptBody = linkScriptBody.replace("%E", entryName);
|
||||||
asm.addLine(new AsmInlineKickAsm(linkScriptBody, 0L, 0L));
|
asm.addLine(new AsmInlineKickAsm(linkScriptBody, 0L, 0L));
|
||||||
}
|
}
|
||||||
@ -852,13 +852,10 @@ public class Pass4CodeGeneration {
|
|||||||
asm.addInstruction("jsr", AsmAddressingMode.ABS, call.getProcedure().getFullName(), false);
|
asm.addInstruction("jsr", AsmAddressingMode.ABS, call.getProcedure().getFullName(), false);
|
||||||
} else if(statement instanceof StatementCallExecute) {
|
} else if(statement instanceof StatementCallExecute) {
|
||||||
StatementCallExecute call = (StatementCallExecute) statement;
|
StatementCallExecute call = (StatementCallExecute) statement;
|
||||||
Procedure procedure = getScope().getProcedure(call.getProcedure());
|
asm.getCurrentChunk().setFragment("jsr");
|
||||||
if(Procedure.CallingConvention.STACK_CALL.equals(procedure.getCallingConvention())) {
|
asm.addInstruction("jsr", AsmAddressingMode.ABS, call.getProcedure().getFullName(), false);
|
||||||
asm.getCurrentChunk().setFragment("jsr");
|
|
||||||
asm.addInstruction("jsr", AsmAddressingMode.ABS, call.getProcedure().getFullName(), false);
|
|
||||||
}
|
|
||||||
} else if(statement instanceof StatementExprSideEffect) {
|
} else if(statement instanceof StatementExprSideEffect) {
|
||||||
AsmFragmentInstanceSpecFactory asmFragmentInstanceSpecFactory = new AsmFragmentInstanceSpecFactory((StatementExprSideEffect)statement, program);
|
AsmFragmentInstanceSpecFactory asmFragmentInstanceSpecFactory = new AsmFragmentInstanceSpecFactory((StatementExprSideEffect) statement, program);
|
||||||
ensureEncoding(asm, asmFragmentInstanceSpecFactory);
|
ensureEncoding(asm, asmFragmentInstanceSpecFactory);
|
||||||
generateAsm(asm, asmFragmentInstanceSpecFactory.getAsmFragmentInstanceSpec());
|
generateAsm(asm, asmFragmentInstanceSpecFactory.getAsmFragmentInstanceSpec());
|
||||||
} else if(statement instanceof StatementReturn) {
|
} else if(statement instanceof StatementReturn) {
|
||||||
|
Loading…
Reference in New Issue
Block a user