Merge branch 'main' of https://gitlab2.istic.univ-rennes1.fr/tuvu/tp2-vsl-pds
This commit is contained in:
@@ -78,7 +78,7 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
|
||||
paramsLLVM.add(var);
|
||||
VarLLVMImp newVar =new VarLLVMImp(type, nameVar,false);
|
||||
setParam.add(new AssignLLVMImp(newVar,new allocaLLVMImp(type)));
|
||||
setParam.add(new StoreLLVMImp(type,var,type,newVar));
|
||||
setParam.add(new StoreLLVMImp(type,var,newVar));
|
||||
}
|
||||
instrLLVM.addAll(setParam);
|
||||
instrLLVM.addAll(fun.instruction().accept(this, h));
|
||||
@@ -115,7 +115,7 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
|
||||
h = r.symTable;
|
||||
list.add(new AssignLLVMImp(new VarLLVMImp(t2, r.var,false),new allocaLLVMImp(t2)));
|
||||
}else {
|
||||
TypeLLVM arrayType = new ArrayLLVMImp(t2, size);
|
||||
TypeLLVM arrayType = new PointerLLVMImp(t2);
|
||||
|
||||
//Alloca
|
||||
Result r_size= h.addNewTempVar();
|
||||
@@ -196,7 +196,7 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
|
||||
ArrayList<InstructionLLVM> result = new ArrayList<>();
|
||||
result.addAll(res.instrs);
|
||||
//InstructionLLVM r = new AssignLLVMImp(new VarLLVMImpl(var.getType(),instr.t()),var);
|
||||
InstructionLLVM r = new StoreLLVMImp(var.getType(),var,var.getType(),new VarLLVMImp(var.getType(),h.getVar(instr.t()),false));
|
||||
InstructionLLVM r = new StoreLLVMImp(var.getType(),var,new VarLLVMImp(var.getType(),h.getVar(instr.t()),false));
|
||||
result.add(r);
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user