Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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;
 }