call réparé
This commit is contained in:
@@ -205,7 +205,7 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
|
||||
System.err.println("Fonction n'est pas un void");
|
||||
}
|
||||
|
||||
l.add(new CallLLVMImp(fun.define,paramsLLVM,""));
|
||||
l.add(new CallVoidLLVMImp(fun.define,paramsLLVM,""));
|
||||
return l;
|
||||
}
|
||||
|
||||
@@ -356,6 +356,7 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
|
||||
}
|
||||
|
||||
public InstrAndVal visitAppeal(AppealImp instr,SymTable h){
|
||||
SymTable prevSymTable = h;
|
||||
ArrayList<InstructionLLVM> l = new ArrayList<>();
|
||||
ArrayList<ValLLVM> paramsLLVM = new ArrayList<>();
|
||||
for(Expression param : instr.params()){
|
||||
@@ -374,7 +375,8 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
|
||||
h = res.symTable;
|
||||
VarLLVMImp var = new VarLLVMImp(fLLVM.define.type(), res.var);
|
||||
|
||||
l.add(new CallLLVMImp(fLLVM.define,paramsLLVM,""));
|
||||
l.add(new AssignLLVMImp(var, new CallLLVMImp(fLLVM.define,paramsLLVM,"")));
|
||||
prevSymTable.updateId(h);
|
||||
return new InstrAndVal(l, var);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user