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

Merge branch 'jesper_baseline' into far-call-isolated-#508

# Conflicts:
#	src/main/java/dk/camelot64/kickc/model/symbols/Procedure.java
#	src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java
This commit is contained in:
Flight_Control 2023-04-04 20:03:15 +02:00
commit a6b021aaf0
2 changed files with 12 additions and 1 deletions

View File

@ -136,6 +136,10 @@ public class Procedure extends Scope {
this.segmentCode = segmentCode;
}
public void setCodeSegment(String codeSegment) {
this.codeSegment = codeSegment;
}
public List<String> getParameterNames() {
return parameterNames;
}

View File

@ -865,7 +865,14 @@ public class Pass4CodeGeneration {
if (assignment.getOperator() == null && assignment.getrValue1() == null && isRegisterCopy(lValue, assignment.getrValue2())) {
//asm.addComment(lValue.toString(program) + " = " + assignment.getrValue2().toString(program) + " // register copy " + getRegister(lValue));
} else {
AsmFragmentCodeGenerator.generateAsm(asm, AsmFragmentInstanceSpecBuilder.assignment(assignment, program), program);
// sven - catch this error decently, it sometimes throws an exception!
try {
AsmFragmentCodeGenerator.generateAsm(asm, AsmFragmentInstanceSpecBuilder.assignment(assignment, program), program);
} catch( AsmFragmentTemplateSynthesizer.UnknownFragmentException e) {
throw new AsmFragmentTemplateSynthesizer.UnknownFragmentException(e.getMessage());
} catch( RuntimeException e) {
throw new CompileError("Problem with source, runtime Exception: " + e.getMessage(), statement);
}
}
} else if (statement instanceof StatementConditionalJump) {
AsmFragmentCodeGenerator.generateAsm(asm, AsmFragmentInstanceSpecBuilder.conditionalJump((StatementConditionalJump) statement, block, program), program);