Package org.objectweb.asm.commons

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


    }
    else if (Collection.class.isAssignableFrom( inputContainerClass )) {
      l_di = compileInitFromCollection( sub, mv, l_ds );
    }
    else if (Iterable.class.isAssignableFrom( inputContainerClass )) {
      final int l_it = mv.newLocal( ITERATOR_INTF );
      mv.loadLocal( l_ds );
      mv.visitMethodInsn( Opcodes.INVOKEINTERFACE, ITERABLE_INTF.getInternalName(), "iterator", "()"
          + ITERATOR_INTF.getDescriptor() );
      mv.storeLocal( l_it );
      l_di = compileInitFromIterator( sub, mv, l_it );
View Full Code Here


    mg.loadArgs();
    mg.invokeVirtual(Type.getType(Field.class), method);
    mg.mark(endTry);
    mg.returnValue();
    mg.mark(catchHandle);
    int exception = mg.newLocal(Type.getType(IllegalAccessException.class));
    mg.storeLocal(exception);
    mg.loadLocal(exception);
    mg.invokeStatic(Type.getType(Throwables.class),
                    getMethod(RuntimeException.class, "propagate", Throwable.class));
    mg.throwException();
View Full Code Here

    ga.visitTryCatchBlock(beginTry, endTry, endTry2, type.getInternalName());
    ga.visitLabel(endTry);
    l5 = new Label();
    ga.visitJumpInsn(GOTO, l5);
    ga.visitLabel(endTry2);
    int lThrow = ga.newLocal(type);
    ga.storeLocal(lThrow);
    //mv.visitVarInsn(ASTORE, 1);
    l6 = new Label();
    ga.visitLabel(l6);
    return lThrow;
View Full Code Here

    GeneratorAdapter ga = bc.getAdapter();
    bc.popOnFinally();
    ga.visitLabel(l3);
    ga.visitJumpInsn(GOTO, l5);
    ga.visitLabel(l4);
    int lThrow = ga.newLocal(Types.THROWABLE);
    ga.storeLocal(lThrow);
    //mv.visitVarInsn(ASTORE, 2);
    Label l8 = new Label();
    ga.visitLabel(l8);
View Full Code Here

      Label notNull = new Label();
      Label end = new Label();
     
      GeneratorAdapter ga = bc.getAdapter();
     
      int l = ga.newLocal(Types.OBJECT);
      ExpressionUtil.visitLine(bc, left.getStart());
      left.writeOut(bc, MODE_REF);
      ExpressionUtil.visitLine(bc, left.getEnd());
      ga.dup();
      ga.storeLocal(l);
View Full Code Here

    GeneratorAdapter ga = bc.getAdapter();
    bc.popOnFinally();
    ga.visitJumpInsn(GOTO, beforeFinally);
   
    ga.visitLabel(afterTry);
    lThrow = ga.newLocal(Types.THROWABLE);
    ga.storeLocal(lThrow);
   
    onFinally.writeOut(bc);
   
    ga.loadLocal(lThrow);
View Full Code Here

    adapter.visitLocalVariable("this", "L"+name+";", null, methodBegin, methodEnd, 0);
      adapter.visitLabel(methodBegin);
       
    // Scope oldData=null;
    final int oldData=adapter.newLocal(Types.VARIABLES);
    ASMConstants.NULL(adapter);
    adapter.storeLocal(oldData);
   
    int localBC=adapter.newLocal(Types.BODY_CONTENT);
    ConditionVisitor cv=new ConditionVisitor();
View Full Code Here

    // Scope oldData=null;
    final int oldData=adapter.newLocal(Types.VARIABLES);
    ASMConstants.NULL(adapter);
    adapter.storeLocal(oldData);
   
    int localBC=adapter.newLocal(Types.BODY_CONTENT);
    ConditionVisitor cv=new ConditionVisitor();
    cv.visitBefore();
      cv.visitWhenBeforeExpr();
        adapter.loadArg(1);
        adapter.invokeVirtual(Types.COMPONENT_IMPL, GET_OUTPUT);
View Full Code Here

    adapter.visitVarInsn(Opcodes.ALOAD, 0);
    adapter.invokeVirtual(Types.COMPONENT_IMPL, INIT);
     
     
    //int oldCheckArgs=  pc.undefinedScope().setMode(Undefined.MODE_NO_LOCAL_AND_ARGUMENTS);
      final int oldCheckArgs = adapter.newLocal(Types.INT_VALUE);
      adapter.loadArg(0);
      adapter.invokeVirtual(Types.PAGE_CONTEXT, UNDEFINED_SCOPE);
      adapter.push(Undefined.MODE_NO_LOCAL_AND_ARGUMENTS);
      adapter.invokeInterface(Types.UNDEFINED, SET_MODE);
      adapter.storeLocal(oldCheckArgs);
View Full Code Here

    OnFinally onFinally;
   
    if(expr==null)ASMConstants.NULL(adapter);
    else expr.writeOut(bc, Expression.MODE_REF);
    if(len>0) {
      int rtn = adapter.newLocal(Types.OBJECT);
      adapter.storeLocal(rtn, Types.OBJECT);
      for(int i=len-1;i>=0;i--) {
       
        onFinally=finallies.get(i);
        onFinally.writeOut(bc);
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.