Package cn.wensiqun.asmsupport.operators.asmdirect

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


  }
 
  @Override
  public void generateInsn() {
    dupSynArgument = createVariable(null, lock.getParamterizedType(), true, new DUP(this, lock.getParamterizedType()));
    flag1 = new Marker(this, new Label());
        generateBody(lock);
  }
View Full Code Here


     */
    private void generateThrowableCatch(){
        boolean currentCheckUnrechableCode = getExecuteBlock().whetherCheckUnreachableCode();
        getExecuteBlock().setWhetherCheckUnreachableCode(false);
       
        new Marker(this.getExecuteBlock(), implicitCatchStartLbl);
       
        LocalVariable exception = getLocalAnonymousVariableModel(AClass.THROWABLE_ACLASS);
        implicitCatchThrowableStore = new Store(getExecuteBlock(), exception);
       
        finallyBlock.clonerGenerate(getExecuteBlock());
View Full Code Here

        Label exceptionLbl = new Label();
        LocalVariable lv = getLocalVariableModel("e", exception);
        new Store(getExecuteBlock(), lv);
       
        lv.getScopeLogicVar().setSpecifiedStartLabel(exceptionLbl);
        new Marker(getExecuteBlock(), exceptionLbl);
        catchBody(lv);
       
        new Marker(getExecuteBlock(), endCatchLbl1);
        new NOP(getExecuteBlock());
       
        Finally finallyOfCurrentTrySeries = getFinally();
       
       
        if(finallyOfCurrentTrySeries != null){
            new Marker(getExecuteBlock(), endCatchLbl2);
            try{
              //空操作 判读程序是否可以继续执行下去
              OperatorFactory.newOperator(NoneOperator.class, new Class<?>[]{ProgramBlock.class}, getExecuteBlock());
              //如果程序能够走到这里 表示之前没有return或者throw操作,则将finally内容copy至当前catch块的末尾
              finallyBlock.clonerGenerate(getExecuteBlock());
View Full Code Here

     */
    private void generateThrowableCatch(){
        boolean currentCheckUnrechableCode = getExecuteBlock().whetherCheckUnreachableCode();
        getExecuteBlock().setWhetherCheckUnreachableCode(false);
       
        new Marker(this.getExecuteBlock(), implicitCatchStartLbl);
       
        LocalVariable exception = getLocalAnonymousVariableModel(AClass.THROWABLE_ACLASS);
        implicitCatchThrowableStore = new Store(getExecuteBlock(), exception);
       
        finallyBlock.clonerGenerate(getExecuteBlock());
View Full Code Here

        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"));
            generateBody(obj);

            new Marker(getExecuteBlock(), continueLbl);
            new Marker(getExecuteBlock(), conditionLbl);
          condition = invoke(itr, "hasNext");
        }
        condition.asArgument();
    }
View Full Code Here

TOP

Related Classes of cn.wensiqun.asmsupport.operators.asmdirect.Marker

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.