public IrFunc visit(IrFunc t) { IrTemp.Reset(t.tmpCnt); IrStmtList sl = (IrStmtList)t.stmts.accept(this); int newTmpCnt = t.tmpCnt + IrTemp.Count; return new IrFunc(t.label, t.varCnt, newTmpCnt, t.argCnt, sl); }
public void visit(IrFunc f) { stmtLists.Push(stmts); stmts = f.stmts; sp = sp - f.varCnt - f.argCnt - 1; f.stmts.accept(this); stmts = stmtLists.Pop(); sp = sp + f.varCnt + f.argCnt + 1; }