toLLVM en visitor, todo : réparer la Declaration

This commit is contained in:
Rochas
2025-04-05 20:11:52 +02:00
parent 3f0ca04b19
commit b9b609f1e2
6 changed files with 159 additions and 116 deletions

View File

@@ -153,9 +153,9 @@ public class ProgramLLVM {
}*/
public static record allocaLLVMImpl(TypeLLVM type, int nbBits) implements ExpressionLLVM{
public static record allocaLLVMImpl(TypeLLVM type) implements ExpressionLLVM{
public String prettyprinter(){
return "aloca" + " i" + nbBits;
return "aloca" + " i" + type.getNbBit();
}
}
@@ -190,6 +190,10 @@ public class ProgramLLVM {
return "i32";
}
public int getNbBit(){
return 32;
}
}
@@ -200,5 +204,9 @@ public class ProgramLLVM {
return "void";
}
public int getNbBit(){
return 0;
}
}
}