cleanup
This commit is contained in:
@@ -441,7 +441,7 @@ public class CodeGenImpl extends CodeGenBase
|
||||
@Override
|
||||
public Register analyze(BooleanLiteral node)
|
||||
{
|
||||
System.out.println("Inside BooleanLiteral: ");
|
||||
System.out.println("Inside BooleanLiteral: ");
|
||||
backend.emitLW(T6, FP, 0, "Inside BooleanLiteral: ");
|
||||
if(node.value==true)
|
||||
backend.emitLI(Register.A0, 1, "Load boolean literal: true ");
|
||||
@@ -486,7 +486,6 @@ public class CodeGenImpl extends CodeGenBase
|
||||
System.out.println("varfuncInfo name: " + varFuncInfo.getFuncName());
|
||||
System.out.println("var idx: " + varFuncInfo.getVarIndex(info.getVarName()));
|
||||
|
||||
|
||||
int tmpHandle = getRegister();
|
||||
Register tmp = registerPool[tmpHandle];
|
||||
|
||||
@@ -515,31 +514,6 @@ public class CodeGenImpl extends CodeGenBase
|
||||
int idx = varFuncInfo.getVarIndex(info.getVarName());
|
||||
int paramSize = varFuncInfo.getParams().size();
|
||||
int offset = getLocalVarLocationOffset(idx, paramSize);
|
||||
System.out.println("idx " +idx + " paramSize " + paramSize + " offset " + offset);
|
||||
|
||||
|
||||
// - int curr_depth = funcInfo.getDepth();
|
||||
// - int d_depth = curr_depth - info.getFuncInfo().getDepth();
|
||||
// - if(d_depth == 0) {
|
||||
// - int idx = funcInfo.getVarIndex(info.getVarName());
|
||||
// - int paramSize = funcInfo.getParams().size();
|
||||
// - int offset = getLocalVarLocationOffset(idx, paramSize);
|
||||
// - return new StackVarRuntimeInfo(FP, offset);
|
||||
// - } else
|
||||
// - {
|
||||
// - FuncInfo curr = funcInfo;
|
||||
// - int tmpHandle = getRegister();
|
||||
// - Register tmp = registerPool[tmpHandle];
|
||||
// - backend.emitMV(tmp, FP, "tmp = FP");
|
||||
// - while(d_depth > 0){
|
||||
// - curr = curr.getParentFuncInfo();
|
||||
// - backend.emitLW(tmp, tmp, curr.getParams().size()*wordSize, "Get static link");
|
||||
// - -- d_depth;
|
||||
// - }
|
||||
// - // UNSAFE!!!!! PLEASE FREE THE TMP_HANDLE MANUALLY
|
||||
// - return new StackVarRuntimeInfo(tmp, -wordSize*curr.getVarIndex(info.getVarName()), tmpHandle);
|
||||
// - }
|
||||
|
||||
return new StackVarRuntimeInfo(tmp, offset, tmpHandle);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user