Package org.allspice.bytecode

Examples of org.allspice.bytecode.Mark


  }

  public static void createIfThenElse(EvaluationContext context,Expr cond,
      Collection<Statement> thenst,Collection<Statement> elsest, InstList l) throws CompilerException {
    context.compile(null,cond, l) ;
    Mark endmark = new Mark() ;
    Mark elsemark = new Mark() ;
    l.add(new IfEquals0(context.getTypeCode(cond),elsemark)) ;
    for(Statement st: thenst) {
      context.compile(st,l) ;
    }
    l.add(new Goto(endmark)) ;
View Full Code Here


    l.add(new Nop(endmark)) ;
  }

  public static void createNot(EvaluationContext context, Expr e, InstList l) throws CompilerException {
    context.compile(null,e, l) ;
    Mark isZero = new Mark() ;
    Mark end = new Mark() ;
    l.add(new IfEquals0(context.getTypeCode(e),isZero)) ;
    l.add(new Const(Boolean.FALSE)) ;
    l.add(new Goto(end)) ;
    l.add(new Nop(isZero)) ;
    l.add(new Const(Boolean.TRUE)) ;
View Full Code Here

TOP

Related Classes of org.allspice.bytecode.Mark

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.