Package org.allspice.bytecode.instructions

Examples of org.allspice.bytecode.instructions.Goto


    md = md.addInstructions(
        new Nop(start_pc),
        new Load(x),
        new Throw(),
        new Nop(end_pc),
        new Goto(the_end),
        new ExceptionHandler(start_pc,end_pc,handler,new TypeName("java.lang.Exception")),
        new Nop(handler),
        new Store(ex),
        new Const(1),
        new Return(TypeCode.INT),
View Full Code Here


  }
  public EvaluationContext setBreak(Mark breakDest) {
    return new EvaluationContext(converter,classPool,fileUnit,classDef,methodDef,decls,
        returnInst,
        continueInst,
        new InstStack(new Goto(breakDest),null)) ;   
  }
View Full Code Here

    context.compile(null,lhs, l) ;
    l.add(new IfEquals0(context.getTypeCode(lhs),isZero)) ;
    context.compile(null,rhs, l) ;
    l.add(new IfEquals0(context.getTypeCode(rhs),isZero)) ;
    l.add(new Const(Boolean.TRUE)) ;
    l.add(new Goto(end)) ;
    l.add(new Nop(isZero)) ;
    l.add(new Const(Boolean.FALSE)) ;
    l.add(new Nop(end)) ;
  }
View Full Code Here

    context.compile(null,lhs, l) ;
    l.add(new IfNotEquals0(context.getTypeCode(lhs),isOne)) ;
    context.compile(null,rhs, l) ;
    l.add(new IfNotEquals0(context.getTypeCode(rhs),isOne)) ;
    l.add(new Const(Boolean.FALSE)) ;
    l.add(new Goto(end)) ;
    l.add(new Nop(isOne)) ;
    l.add(new Const(Boolean.TRUE)) ;
    l.add(new Nop(end)) ;
  }
View Full Code Here

    createConvert(context,lhs,t,l) ;
    createConvert(context,rhs,t,l) ;
    Mark end = new Mark() ;
    l.add(i) ;
    l.add(new Const(Boolean.FALSE)) ;
    l.add(new Goto(end)) ;
    l.add(new Nop(isTrue)) ;
    l.add(new Const(Boolean.TRUE)) ;
    l.add(new Nop(end)) ;
  }
View Full Code Here

    Mark handler = new Mark() ;
    l.add(new Nop(start_pc)) ;
    createTryCatch(newContext, statements, catchBlocks,l) ;
    l.add(new Nop(end_pc)) ;
    l.add(new JumpSub(finallyMark)) ;
    l.add(new Goto(the_end)) ;
    {
      l.add(new ExceptionHandler(start_pc,end_pc,handler,TypeName.THROWABLE)) ;
      l.add(new Nop(handler)) ;
      l.add(new Store(ex)) ;
      l.add(new JumpSub(finallyMark)) ;
View Full Code Here

    for(Statement s: statements) {
      context.compile(s,l) ;
    }
    l.add(new Nop(end_pc)) ;
    Mark the_end = new Mark() ;
    l.add(new Goto(the_end)) ;
    for(CatchBlock cb: catchBlocks) {
      final VarStack vars = context.decls.addLocalVar(context.getFileUnitInfo(),new FIFO<VarDecl>(cb.ex));
      EvaluationContext newContext = context.setVars(vars) ;
      Var v = (Var)newContext.getVar(cb.ex.name);
      final String extype = cb.ex.type;
      Mark handler = new Mark() ;
      l.add(new ExceptionHandler(start_pc,end_pc,handler,context.fullyQualified(extype))) ;
      l.add(new Nop(handler)) ;
      l.add(new Store(v)) ;
      for(Statement s1: cb.statements) {
        newContext.compile(s1,l) ;
      }
      l.add(new Goto(the_end)) ;
    }
    l.add(new Nop(the_end)) ;
  }
View Full Code Here

    for(Statement s: statements) {
      newContext.compile(s,l) ;
    }
    l.add(new Nop(end_pc)) ;
    l.add(new JumpSub(finallyMark)) ;
    l.add(new Goto(the_end)) ;
    {
      l.add(new ExceptionHandler(start_pc,end_pc,handler,TypeName.THROWABLE)) ;
      l.add(new Nop(handler)) ;
      l.add(new Store(ex)) ;
      l.add(new JumpSub(finallyMark)) ;
View Full Code Here

    context.compile(null,cond, l) ;
    Mark endmark = new Mark() ;
    Mark elsemark = new Mark() ;
    l.add(new IfEquals0(context.getTypeCode(cond),elsemark)) ;
    createConvert(context, thenst, type,l) ;
    l.add(new Goto(endmark)) ;
    l.add(new Nop(elsemark)) ;
    createConvert(context, elsest, type,l) ;
    l.add(new Nop(endmark)) ;
  }
View Full Code Here

    context.compile(null,cond, l) ;
    l.add(new IfEquals0(context.getTypeCode(cond),endmark)) ;
    for(Statement s: thenst) {
      newContext.compile(s,l) ;
    }
    l.add(new Goto(beginmark)) ;
    l.add(new Nop(endmark)) ;
  }
View Full Code Here

TOP

Related Classes of org.allspice.bytecode.instructions.Goto

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.