Package org.objectweb.asm.commons

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


      final int l_lst = mv.newLocal( ARRAYLIST_CLASS );
      mv.newInstance( ARRAYLIST_CLASS );
      mv.dup();
      mv.loadLocal( l_len );
      mv.visitMethodInsn( Opcodes.INVOKESPECIAL, ARRAYLIST_CLASS.getInternalName(), "<init>", "(I)V" );
      mv.storeLocal( l_lst );

      // for (int i = 0; i < len; i++) {
      final int l_i = mv.newLocal( Type.INT_TYPE );
      mv.push( 0 );
      mv.storeLocal( l_i );
View Full Code Here


      mv.storeLocal( l_lst );

      // for (int i = 0; i < len; i++) {
      final int l_i = mv.newLocal( Type.INT_TYPE );
      mv.push( 0 );
      mv.storeLocal( l_i );
      final Label test = mv.newLabel();
      mv.goTo( test );
      final Label again = mv.mark();

      // lst.add( arr[ i ] );
View Full Code Here

  void compileLogging( final CellAddress _cellAddress, final String _name, boolean _input, boolean _output ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int valLocal = mv.newLocal( type() );
    mv.storeLocal( valLocal );
    mv.loadLocal( valLocal );
    if (DataType.NUMERIC.equals( dataType() )) {
      compileConversionTo( Number.class );
    }
View Full Code Here

    final CallFrame inputCall = sub.model().getCallChainToCall();
    final Class inputContainerClass = inputCall.getMethod().getReturnType();
    final Type inputContainerType = Type.getType( inputContainerClass );
    final int l_ds = mv.newLocal( inputContainerType );
    compileInputGetterCall( inputCall );
    mv.storeLocal( l_ds );

    // ~ if (ds != null) {
    final Label isNull = mv.newLabel();
    mv.loadLocal( l_ds );
    mv.ifNull( isNull );
View Full Code Here

    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 );
    }
    else if (Iterator.class.isAssignableFrom( inputContainerClass )) {
      l_di = compileInitFromIterator( sub, mv, l_ds );
    }
View Full Code Here

    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();
    mg.endMethod();
View Full Code Here

    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

    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);

    onFinally.writeOut(bc);
View Full Code Here

      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);
     
      ga.visitJumpInsn(Opcodes.IFNONNULL, notNull);
      ExpressionUtil.visitLine(bc, right.getStart());
      right.writeOut(bc, MODE_REF);
      ExpressionUtil.visitLine(bc, right.getEnd());
View Full Code Here

    bc.popOnFinally();
    ga.visitJumpInsn(GOTO, beforeFinally);
   
    ga.visitLabel(afterTry);
    lThrow = ga.newLocal(Types.THROWABLE);
    ga.storeLocal(lThrow);
   
    onFinally.writeOut(bc);
   
    ga.loadLocal(lThrow);
    ga.visitInsn(ATHROW);
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.