|
|
|
@ -454,7 +454,7 @@ public class CodeGenImpl extends CodeGenBase
|
|
|
|
|
this.regHandle = regHandle;
|
|
|
|
|
}
|
|
|
|
|
public void free(){
|
|
|
|
|
if(regHandle > 0){
|
|
|
|
|
if(regHandle >= 0){
|
|
|
|
|
freeRegister(regHandle);
|
|
|
|
|
regHandle = -1;
|
|
|
|
|
}
|
|
|
|
@ -869,18 +869,6 @@ public class CodeGenImpl extends CodeGenBase
|
|
|
|
|
backend.emitJAL(errorNI, "Operator not implemented");
|
|
|
|
|
return Register.A0;
|
|
|
|
|
}
|
|
|
|
|
private SymbolInfo getSymbolInfo(Identifier id){
|
|
|
|
|
SymbolTable curr_sym = sym;
|
|
|
|
|
SymbolInfo info = null;
|
|
|
|
|
String id_name = id.name;
|
|
|
|
|
while(curr_sym != null){
|
|
|
|
|
info = (SymbolInfo) curr_sym.get(id_name);
|
|
|
|
|
if(info != null)
|
|
|
|
|
return info;
|
|
|
|
|
curr_sym = curr_sym.getParent();
|
|
|
|
|
}
|
|
|
|
|
return info;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public Register analyze(Identifier node)
|
|
|
|
|
{
|
|
|
|
|