Exemple #1
0
        public void visit(IrProg p)
        {
            funcs = p.funcs;
            IrFunc mf = findFunc("main");
            if (null == mf)
                throw new Exception("main function not found");

            //sp = sp - mf.varCnt - mf.argCnt - 1;
            mf.accept(this);
            //sp = sp + mf.varCnt + mf.argCnt + 1;
        }
Exemple #2
0
 public IrProg visit(IrProg t)
 {
     return new IrProg(t.funcs.accept(this));
 }