Package cn.wensiqun.asmsupport.operators.asmdirect

Examples of cn.wensiqun.asmsupport.operators.asmdirect.GOTO


    @Override
    public final void breakout(){
        ProgramBlock pb = getExecuteBlock();
        while(pb != null){
            if(pb instanceof ILoop){
                new GOTO(getExecuteBlock(), ((ILoop)pb).getBreakLabel());
                return;
            }
            pb = pb.ownerBlock;
        }
        throw new InternalError("there is on loop!");
View Full Code Here


    @Override
    public final void continueout(){
        ProgramBlock pb = getExecuteBlock();
        while(pb != null){
            if(pb instanceof ILoop){
                new GOTO(getExecuteBlock(), ((ILoop)pb).getContinueLabel());
                return;
            }
            pb = pb.ownerBlock;
        }
        throw new InternalError("there is on loop!");
View Full Code Here

           * 创建空操作,其作用是通过newOperator方法判断是否抛出UnreachableCode异常判断当前
           * 操作是否可到达。如果不可到达则不执行以下指令
           */
            OperatorFactory.newOperator(NoneOperator.class, new Class<?>[]{ProgramBlock.class}, getExecuteBlock());
            //创建GOTO指令。跳到整个try catch的结束部分 如果存在finally 则是finally起始部分
            new GOTO(getExecuteBlock(), getTerminalEndLabel());
        }catch(UnreachableCode uc){
            log.info("unreachable code");
            returnInTry = true;
        }catch(RuntimeException e){
          throw e;
View Full Code Here

       
        try{
          //空操作 判读程序是否可以继续执行下去
            OperatorFactory.newOperator(NoneOperator.class, new Class<?>[]{ProgramBlock.class}, getExecuteBlock());
            //如果程序能够走到这里 表示之前没有return或者throw操作,跳转到finally block的起始位置
            new GOTO(this.getExecuteBlock(), getTerminalEndLabelInCatch());
        }catch(UnreachableCode uc){
            log.info("unreachable code")
        }catch(RuntimeException e){
          throw e;
        }
View Full Code Here

    public final void generateInsn() {
        new NOP(getExecuteBlock());
        if(member.getParamterizedType().isArray()){
            final LocalVariable i = createVariable(null, AClass.INT_ACLASS, true, Value.value(0));
           
            new GOTO(getExecuteBlock(), conditionLbl);
            new NOP(getExecuteBlock());
            new Marker(getExecuteBlock(), startLbl);
            new NOP(getExecuteBlock());
           
            LocalVariable obj = createVariable(null, ((ArrayClass)member.getParamterizedType()).getNextDimType(), true, arrayLoad(member, i) );
            generateBody(obj);

            new Marker(getExecuteBlock(), continueLbl);
            afterInc(i);
            new Marker(getExecuteBlock(), conditionLbl);
            condition = lessThan(i, arrayLength(member));
            //((LessThan)condition).setJumpLable(startLbl);
        }else{
          final LocalVariable itr = createVariable(null, AClass.ITERATOR_ACLASS, true, invoke(member, "iterator"));
            new GOTO(getExecuteBlock(), conditionLbl);
         
          new Marker(getExecuteBlock(), startLbl);
            new NOP(getExecuteBlock());

            LocalVariable obj = createVariable(null, AClass.OBJECT_ACLASS, true, invoke(itr, "next"));
View Full Code Here

TOP

Related Classes of cn.wensiqun.asmsupport.operators.asmdirect.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.