Package temp

Examples of temp.Label


       lastBlock= blocks= new StmList(null,lastStm);
        else
       lastBlock = lastBlock.tail = new StmList(null,lastStm);
  doStms(l.tail);
     }
     else mkBlocks(new StmList(new LABEL(new Label()), l));
  }
View Full Code Here


     else mkBlocks(new StmList(new LABEL(new Label()), l));
  }
  

  public BasicBlocks(StmList stms) {
    done = new Label();
    mkBlocks(stms);
  }
View Full Code Here

      //return new Nx(stm);
  }

  public Exp visit(TStatementIf n)
  {
          Label T = new Label();
      Label F = new Label();
      Label D = new Label();
      Exp exp =  n.e.accept(this);
      Exp stmT =  n.s1.accept(this);
      Exp stmF =  n.s2.accept(this);
      return new Nx(new IRTree2.SEQ
                     (new IRTree2.SEQ
View Full Code Here

  }

  public Exp visit(TStatementWhile n)
  {
          Label test = new Label();
      Label T = new Label();
      Label F = new Label();
      Exp exp = n.e.accept(this);
      Exp body = n.s.accept(this);
     
      return new Nx(new IRTree2.SEQ
                     (new IRTree2.SEQ
View Full Code Here

  }

  public Exp visit(AndExp n)
  {
          Temp t1 = new Temp();
      Label done = new Label();
      Label ok1 = new Label();
      Label ok2 = new Label();
     
      IRTree2.Exp left =  n.e1.accept(this).unEx();
      IRTree2.Exp right = n.e2.accept(this).unEx();
      return new Ex
          (new IRTree2.ESEQ(new IRTree2.SEQ
View Full Code Here

  public Exp visit(TExpOpLessThan n)
  {
          Exp expl= n.e1.accept(this);
      Exp expr= n.e2.accept(this);
      Label T = new Label();
      Label F = new Label();
      Temp t = new Temp();
      return new Ex
          (new IRTree2.ESEQ(new IRTree2.SEQ
                (new IRTree2.SEQ
                 (new IRTree2.SEQ
View Full Code Here

          Temp t_index = new Temp();
      Temp t_size = new Temp();
      IRTree2.Exp e1 = n.e1.accept(this).unEx();
      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
            (new IRTree2.SEQ
             (new IRTree2.SEQ
              (new IRTree2.MOVE(new IRTree2.TEMP(t_index),new IRTree2.BINOP(IRTree2.BINOP.MUL,e2,new IRTree2.CONST(4))),
                          new IRTree2.MOVE(new IRTree2.TEMP(t_size),new IRTree2.MEM(e1))),
                          new IRTree2.CJUMP(IRTree2.CJUMP.GE,new IRTree2.TEMP(t_index),new IRTree2.TEMP(t_size),T,F)),
                          new IRTree2.LABEL(T)),
                          new IRTree2.MOVE(new IRTree2.TEMP(new Temp()),
                                          new IRTree2.CALL(new IRTree2.NAME(new Label("_error")),args1))),
                                          new IRTree2.LABEL(F));
         
      Temp t = new Temp();
      IRTree2.Stm s2 = new IRTree2.SEQ
          (s1,new IRTree2.MOVE(new IRTree2.TEMP(t),new IRTree2.MEM
View Full Code Here

    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

TOP

Related Classes of temp.Label

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.