Package IRTree2

Examples of IRTree2.CALL


    return new ExpList(func, args);
  }

  public Exp build(ExpList kids)
  {
    return new CALL(kids.head, kids.tail);
  }
View Full Code Here


    }

   
     public Stm unCx(Label t, Label f)
    {
        return new CJUMP(CJUMP.EQ, exp, new CONST(0), f, t);
    }
View Full Code Here

    return new ExpList(left, new ExpList(right, null));
  }

  public Stm build(ExpList kids)
  {
    return new CJUMP(relop, kids.head, kids.tail.head, iftrue, iffalse);
  }
View Full Code Here

    }

   
     public Stm unCx(Label t, Label f)
    {
        return new CJUMP(CJUMP.EQ, exp, new CONST(0), f, t);
    }
View Full Code Here

  {
          IRTree2.Exp e = n.e.accept(this).unEx();
      ExpList params = new ExpList(e, null);
      Temp t = new Temp();
     
      return new Ex(new ESEQ(new MOVE(new TEMP(t), currFrame.externalCall("newArray", params)),
              new TEMP(t)));
  }
View Full Code Here

      IRTree2.Exp e2 = n.e2.accept(this).unEx();

      Label F = new Label();
      Label T = new Label();
     
      IRTree2.ExpList args1 = new ExpList(e2, null);     
     
      IRTree2.Stm s1 =
          new IRTree2.SEQ
          (new IRTree2.SEQ
           (new IRTree2.SEQ
View Full Code Here

  }

  // TODO: checar retorno
  public Exp visit(TExpCall n)
  {
    ExpList el = null;
    for (int i=0; i< n.el.size(); i++){
      Exp ex = n.el.elementAt(i).accept(this);
      el = new ExpList (ex.unEx(),el);
    }

    return new Ex(new IRTree2.CALL(new IRTree2.NAME(new Label(n.e.accept(this).toString())),el));
  }
View Full Code Here

  }

  public Exp visit(TExpNewArray n)
  {
          IRTree2.Exp e = n.e.accept(this).unEx();
      ExpList params = new ExpList(e, null);
      Temp t = new Temp();
     
      return new Ex(new ESEQ(new MOVE(new TEMP(t), currFrame.externalCall("newArray", params)),
              new TEMP(t)));
  }
View Full Code Here

                src = s;
        }

        public ExpList kids() {
                if (dst instanceof MEM)
                        return new ExpList(((MEM) dst).exp, new ExpList(src, null));
                else
                        return new ExpList(src, null);
        }
View Full Code Here

    this(new NAME(target), new LabelList(target, null));
  }

  public ExpList kids()
  {
    return new ExpList(exp, null);
  }
View Full Code Here

TOP

Related Classes of IRTree2.CALL

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.