mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-12-17 16:31:34 +00:00
Removed extra assignment for return value
This commit is contained in:
parent
95f97d842a
commit
e83e44675a
@ -213,7 +213,7 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
||||
this.visit(ctx.stmtSeq());
|
||||
}
|
||||
sequence.addStatement(new StatementLabel(procExit.getRef(), StatementSource.procedureEnd(ctx), Comment.NO_COMMENTS));
|
||||
if(returnVar != null) {
|
||||
if(Procedure.CallingConvension.PHI_CALL.equals(procedure.getCallingConvension()) && returnVar != null) {
|
||||
sequence.addStatement(new StatementAssignment(returnVar.getRef(), returnVar.getRef(), StatementSource.procedureEnd(ctx), Comment.NO_COMMENTS));
|
||||
}
|
||||
VariableRef returnVarRef = null;
|
||||
|
@ -40,12 +40,12 @@ public class TestPrograms {
|
||||
public void testProcedureCallingConventionStack1() throws IOException, URISyntaxException {
|
||||
compileAndCompare("procedure-callingconvention-stack-1", log());
|
||||
}
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testProcedureCallingConventionStack0() throws IOException, URISyntaxException {
|
||||
compileAndCompare("procedure-callingconvention-stack-0", log());
|
||||
compileAndCompare("procedure-callingconvention-stack-0", log().verboseCreateSsa().verboseParse().verboseStatementSequence());
|
||||
}
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testStringPointerProblem() throws IOException, URISyntaxException {
|
||||
|
Loading…
Reference in New Issue
Block a user