Fix program entrypoint not generating correctly

This commit is contained in:
Henry 2019-12-20 16:46:59 +00:00
parent 8d5879bb51
commit d2a3c50935
3 changed files with 6 additions and 6 deletions

View file

@ -15,8 +15,8 @@ public class CodegenImpl implements Codegen {
builder.append(compileDeclaration(d));
}
return builder.toString()
+ "call " + String.format("%s_%d\n", main.id, main.numOfArgs);
return "call " + String.format("%s_%d\n", main.id, main.numOfArgs)
+ builder.toString();
}
private String generateLabel() {

View file

@ -15,8 +15,8 @@ public class CodegenImpl implements Codegen {
builder.append(compileDeclaration(d));
}
return builder.toString()
+ "call " + String.format("%s_%d\n", main.id, main.numOfArgs);
return "call " + String.format("%s_%d\n", main.id, main.numOfArgs)
+ builder.toString();
}
private String generateLabel() {

View file

@ -15,8 +15,8 @@ public class CodegenImpl implements Codegen {
builder.append(compileDeclaration(d));
}
return builder.toString()
+ "call " + String.format("%s_%d\n", main.id, main.numOfArgs);
return "call " + String.format("%s_%d\n", main.id, main.numOfArgs)
+ builder.toString();
}
private String generateLabel() {