mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-29 18:49:42 +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:
commit
a6b021aaf0
@ -136,6 +136,10 @@ public class Procedure extends Scope {
|
|||||||
this.segmentCode = segmentCode;
|
this.segmentCode = segmentCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setCodeSegment(String codeSegment) {
|
||||||
|
this.codeSegment = codeSegment;
|
||||||
|
}
|
||||||
|
|
||||||
public List<String> getParameterNames() {
|
public List<String> getParameterNames() {
|
||||||
return parameterNames;
|
return parameterNames;
|
||||||
}
|
}
|
||||||
|
@ -865,7 +865,14 @@ public class Pass4CodeGeneration {
|
|||||||
if (assignment.getOperator() == null && assignment.getrValue1() == null && isRegisterCopy(lValue, assignment.getrValue2())) {
|
if (assignment.getOperator() == null && assignment.getrValue1() == null && isRegisterCopy(lValue, assignment.getrValue2())) {
|
||||||
//asm.addComment(lValue.toString(program) + " = " + assignment.getrValue2().toString(program) + " // register copy " + getRegister(lValue));
|
//asm.addComment(lValue.toString(program) + " = " + assignment.getrValue2().toString(program) + " // register copy " + getRegister(lValue));
|
||||||
} else {
|
} 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) {
|
} else if (statement instanceof StatementConditionalJump) {
|
||||||
AsmFragmentCodeGenerator.generateAsm(asm, AsmFragmentInstanceSpecBuilder.conditionalJump((StatementConditionalJump) statement, block, program), program);
|
AsmFragmentCodeGenerator.generateAsm(asm, AsmFragmentInstanceSpecBuilder.conditionalJump((StatementConditionalJump) statement, block, program), program);
|
||||||
|
Loading…
Reference in New Issue
Block a user