Package org.objectweb.asm.commons

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


    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) {
      ExpressionUtil.writeOutSilent(attrStep.getValue(), bc, Expression.MODE_VALUE);
    }
    else {
View Full Code Here


      adapter.push(1D);
    }
    adapter.storeLocal(step);
   
    // boolean dirPlus=(step > 0);
    int dirPlus=adapter.newLocal(Types.BOOLEAN_VALUE);
    DecisionDoubleVisitor div=new DecisionDoubleVisitor();
    div.visitBegin();
      adapter.loadLocal(step);
    div.visitGT();
      adapter.push(0D);
View Full Code Here

    div.visitEnd(bc);
    Label ifEnd=new Label();
    adapter.ifZCmp(Opcodes.IFEQ, ifEnd);
     
      // 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);
     
View Full Code Here

    ForVisitor forVisitor = new ForVisitor();
    loopVisitor=forVisitor;
    GeneratorAdapter adapter = bc.getAdapter();

    //List.listToArrayRemoveEmpty("", 'c')
    int array = adapter.newLocal(Types.ARRAY);
    int len = adapter.newLocal(Types.INT_VALUE);
   
    if(isArray) {
      getAttribute("array").getValue().writeOut(bc, Expression.MODE_REF);
    }
View Full Code Here

    loopVisitor=forVisitor;
    GeneratorAdapter adapter = bc.getAdapter();

    //List.listToArrayRemoveEmpty("", 'c')
    int array = adapter.newLocal(Types.ARRAY);
    int len = adapter.newLocal(Types.INT_VALUE);
   
    if(isArray) {
      getAttribute("array").getValue().writeOut(bc, Expression.MODE_REF);
    }
    else {
View Full Code Here

   
    //VariableInterpreter.getVariableReference(pc,Caster.toString(index));
    Attribute attrIndex = getAttribute("index");
    int index = -1;
    if(attrIndex!=null) {
      index = adapter.newLocal(Types.VARIABLE_REFERENCE);
      adapter.loadArg(0);
      attrIndex.getValue().writeOut(bc, Expression.MODE_REF);
      adapter.invokeStatic(Types.VARIABLE_INTERPRETER, GET_VARIABLE_REFERENCE);
      adapter.storeLocal(index);
    }
View Full Code Here

    //VariableInterpreter.getVariableReference(pc,Caster.toString(item));
    Attribute attrItem = getAttribute("item");
    int item = -1;
    if(attrItem!=null) {
      item = adapter.newLocal(Types.VARIABLE_REFERENCE);
      adapter.loadArg(0);
      attrItem.getValue().writeOut(bc, Expression.MODE_REF);
      adapter.invokeStatic(Types.VARIABLE_INTERPRETER, GET_VARIABLE_REFERENCE);
      adapter.storeLocal(item);
    }
View Full Code Here

      adapter.storeLocal(item);
    }
   
   
    int obj=0;
    if(isArray)obj=adapter.newLocal(Types.OBJECT);
   
    // for(int i=1;i<=len;i++) {   
    int i = forVisitor.visitBegin(adapter, 1, false);
      // index.set(pc, list.get(i));
     
View Full Code Here

            adapter.throwException();
          adapter.visitLabel(abortEnd);
       

          // PageExceptionImpl old=pc.getCatch();
          int old=adapter.newLocal(Types.PAGE_EXCEPTION);
          adapter.loadArg(0);
          adapter.invokeVirtual(Types.PAGE_CONTEXT, GET_CATCH);
      adapter.storeLocal(old);
     
          // PageException pe=Caster.toPageEception(e);
View Full Code Here

          adapter.loadArg(0);
          adapter.invokeVirtual(Types.PAGE_CONTEXT, GET_CATCH);
      adapter.storeLocal(old);
     
          // PageException pe=Caster.toPageEception(e);
          int pe=adapter.newLocal(Types.PAGE_EXCEPTION);
          adapter.loadLocal(e);
          adapter.invokeStatic(Types.CASTER, TO_PAGE_EXCEPTION);
      adapter.storeLocal(pe);
     
      Iterator<Tag> it = catches.iterator();
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.