Package org.allspice.bytecode.instructions

Examples of org.allspice.bytecode.instructions.JumpSub


    Var z = new Var(3,TypeName.INT) ;
    Var vret = new Var(4,new TypeName("returnAddress")) ;
    MethodDef md = new MethodDef(TypeName.INT,"meth",x,y) ;
    Mark sub = new Mark() ;
    md = md.addInstructions(
        new JumpSub(sub),
        new Load(z),
        new Return(TypeCode.INT),
        new Nop(sub),
        new Store(vret),
        new Load(x),
View Full Code Here


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

    Mark end_pc = new Mark() ;
    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)) ;
      l.add(new Load(ex)) ;
      l.add(new Throw()) ;
    }
    l.add(new Nop(finallyMark)) ;
    l.add(new Store(vret)) ;
View Full Code Here

    l.add(new Nop(start_pc)) ;
    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)) ;
      l.add(new Load(ex)) ;
      l.add(new Throw()) ;
    }
    l.add(new Nop(finallyMark)) ;
    l.add(new Store(vret)) ;
View Full Code Here

TOP

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

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.