mips without optimize

This commit is contained in:
colden
2025-12-12 20:14:00 +08:00
parent 84827838e2
commit c94bebf37b
130 changed files with 5462 additions and 4182 deletions

40
midend/symbol/ArraySymbol.java Normal file → Executable file
View File

@@ -1,20 +1,20 @@
package midend.symbol;
public class ArraySymbol extends Symbol {
private int dim; // -1 means unknown
public ArraySymbol(String name, SymbolType type, int line, int dim) {
super(name, type, line);
this.dim = dim;
}
public int getDim() {
return dim;
}
public void fullValue() {
for (int i = getValueList().size(); i < dim; i++) {
addValue(0);
}
}
}
package midend.symbol;
public class ArraySymbol extends Symbol {
private int dim; // -1 means unknown
public ArraySymbol(String name, SymbolType type, int line, int dim) {
super(name, type, line);
this.dim = dim;
}
public int getDim() {
return dim;
}
public void fullValue() {
for (int i = getValueList().size(); i < dim; i++) {
addValue(0);
}
}
}