Package org.objectweb.asm.commons

Examples of org.objectweb.asm.commons.GeneratorAdapter.storeLocal()


    adapter.visitLabel(begin);
   
    // Reference ref=null;
    final int lRef=adapter.newLocal(Types.REFERENCE);
    adapter.visitInsn(Opcodes.ACONST_NULL);
    adapter.storeLocal(lRef);
   
    // has no try body, if there is no try body, no catches are executed, only finally
    if(!tryBody.hasStatements()) {
      if(finallyBody!=null)finallyBody.writeOut(bc);
      return;
View Full Code Here


          // PageExceptionImpl old=pc.getCatch();
          int old=adapter.newLocal(Types.PAGE_EXCEPTION);
          adapter.loadArg(0);
          adapter.invokeVirtual(Types.PAGE_CONTEXT, TagTry.GET_CATCH);
      adapter.storeLocal(old);
         
         
      // cast to PageException  Caster.toPagException(t);
          adapter.loadLocal(lThrow);
          adapter.invokeStatic(Types.CASTER, TO_PAGE_EXCEPTION);
View Full Code Here

      // cast to PageException  Caster.toPagException(t);
          adapter.loadLocal(lThrow);
          adapter.invokeStatic(Types.CASTER, TO_PAGE_EXCEPTION);
         
      // PageException pe=...
          adapter.storeLocal(pe);

      // catch loop
      Label endAllIf = new Label();
          Iterator<Catch> it = catches.iterator();
          Catch ctElse=null;
View Full Code Here

    GeneratorAdapter adapter = bc.getAdapter();

    // int from=(int)@from;
    int from=adapter.newLocal(Types.DOUBLE_VALUE);
    ExpressionUtil.writeOutSilent(getAttribute("from").getValue(), bc, Expression.MODE_VALUE);
    adapter.storeLocal(from)
   
    // int to=(int)@to;
    int to=adapter.newLocal(Types.DOUBLE_VALUE);
    ExpressionUtil.writeOutSilent(getAttribute("to").getValue(), bc, Expression.MODE_VALUE);
    adapter.storeLocal(to)
View Full Code Here

    adapter.storeLocal(from)
   
    // int to=(int)@to;
    int to=adapter.newLocal(Types.DOUBLE_VALUE);
    ExpressionUtil.writeOutSilent(getAttribute("to").getValue(), bc, Expression.MODE_VALUE);
    adapter.storeLocal(to)
   
    // int step=(int)@step;
    int step=adapter.newLocal(Types.DOUBLE_VALUE);
    Attribute attrStep = getAttribute("step");
    if(attrStep!=null) {
View Full Code Here

      ExpressionUtil.writeOutSilent(attrStep.getValue(), bc, Expression.MODE_VALUE);
    }
    else {
      adapter.push(1D);
    }
    adapter.storeLocal(step);
   
    // boolean dirPlus=(step > 0);
    int dirPlus=adapter.newLocal(Types.BOOLEAN_VALUE);
    DecisionDoubleVisitor div=new DecisionDoubleVisitor();
    div.visitBegin();
View Full Code Here

    div.visitBegin();
      adapter.loadLocal(step);
    div.visitGT();
      adapter.push(0D);
    div.visitEnd(bc);
    adapter.storeLocal(dirPlus);
   
    //if(step!=0) {
    div=new DecisionDoubleVisitor();
    div.visitBegin();
      adapter.loadLocal(step);
View Full Code Here

      // VariableReference index>=VariableInterpreter.getVariableReference(pc,@index));
      int index = adapter.newLocal(Types.VARIABLE_REFERENCE);
      adapter.loadArg(0);
      ExpressionUtil.writeOutSilent(getAttribute("index").getValue(), bc, Expression.MODE_REF);
      adapter.invokeStatic(Types.VARIABLE_INTERPRETER, GET_VARIABLE_REFERENCE);
      adapter.storeLocal(index);
     

      // index.set(from);
      adapter.loadLocal(index);
      adapter.loadLocal(from);
View Full Code Here

        adapter.visitIntInsn(Opcodes.BIPUSH, 44);// ','
        //adapter.push(',');
        adapter.invokeStatic(Types.LIST_UTIL, LIST_TO_ARRAY_REMOVE_EMPTY_SC);
      }
    }
    adapter.storeLocal(array);
 
   
    // int len=array.size();
    adapter.loadLocal(array);
    adapter.invokeInterface(Types.ARRAY, SIZE);
View Full Code Here

 
   
    // int len=array.size();
    adapter.loadLocal(array);
    adapter.invokeInterface(Types.ARRAY, SIZE);
    adapter.storeLocal(len);

   
    //VariableInterpreter.getVariableReference(pc,Caster.toString(index));
    Attribute attrIndex = getAttribute("index");
    int index = -1;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.