Package org.objectweb.asm.commons

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


      // Detail[] arr = get$Sect0();
      final int l_arr = mv.newLocal( sub.arrayType() );
      mv.storeLocal( l_arr );

      final int l_len = mv.newLocal( Type.INT_TYPE );
      mv.loadLocal( l_arr );
      mv.arrayLength();
      mv.storeLocal( l_len );

      // List lst = new ArrayList( arr.length );
      final int l_lst = mv.newLocal( ARRAYLIST_CLASS );
View Full Code Here


      // List lst = new ArrayList( arr.length );
      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 );
View Full Code Here

      final Label test = mv.newLabel();
      mv.goTo( test );
      final Label again = mv.mark();

      // lst.add( arr[ i ] );
      mv.loadLocal( l_lst );
      mv.loadLocal( l_arr );
      mv.loadLocal( l_i );
      mv.arrayLoad( sub.classType() );
      mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, ARRAYLIST_CLASS.getInternalName(), "add", "(Ljava/lang/Object;)Z" );
      mv.pop();
View Full Code Here

      mv.goTo( test );
      final Label again = mv.mark();

      // lst.add( arr[ i ] );
      mv.loadLocal( l_lst );
      mv.loadLocal( l_arr );
      mv.loadLocal( l_i );
      mv.arrayLoad( sub.classType() );
      mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, ARRAYLIST_CLASS.getInternalName(), "add", "(Ljava/lang/Object;)Z" );
      mv.pop();
View Full Code Here

      final Label again = mv.mark();

      // lst.add( arr[ i ] );
      mv.loadLocal( l_lst );
      mv.loadLocal( l_arr );
      mv.loadLocal( l_i );
      mv.arrayLoad( sub.classType() );
      mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, ARRAYLIST_CLASS.getInternalName(), "add", "(Ljava/lang/Object;)Z" );
      mv.pop();

      // } // for
View Full Code Here

      mv.pop();

      // } // for
      mv.iinc( l_i, 1 );
      mv.mark( test );
      mv.loadLocal( l_i );
      mv.loadLocal( l_len );
      mv.ifCmp( Type.INT_TYPE, mv.LT, again );

      mv.loadLocal( l_lst );
      if (outputContainerClass.isAssignableFrom( List.class )) {
View Full Code Here

      // } // for
      mv.iinc( l_i, 1 );
      mv.mark( test );
      mv.loadLocal( l_i );
      mv.loadLocal( l_len );
      mv.ifCmp( Type.INT_TYPE, mv.LT, again );

      mv.loadLocal( l_lst );
      if (outputContainerClass.isAssignableFrom( List.class )) {
        // return lst;
View Full Code Here

      mv.mark( test );
      mv.loadLocal( l_i );
      mv.loadLocal( l_len );
      mv.ifCmp( Type.INT_TYPE, mv.LT, again );

      mv.loadLocal( l_lst );
      if (outputContainerClass.isAssignableFrom( List.class )) {
        // return lst;
        mv.visitInsn( Opcodes.ARETURN );
      }
      else if (outputContainerClass.isAssignableFrom( Iterator.class )) {
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 );
    }

    compile_util_log( _cellAddress.getSheetName(), _cellAddress.getColumnIndex(), _cellAddress.getRowIndex(), _name, _input, _output );
View Full Code Here

      compileConversionTo( Number.class );
    }

    compile_util_log( _cellAddress.getSheetName(), _cellAddress.getColumnIndex(), _cellAddress.getRowIndex(), _name, _input, _output );

    mv.loadLocal( valLocal );
  }

  protected abstract void compile_util_log( String _sheetName, int _columnIndex, int _rowIndex,
      String _definedName, boolean _input, boolean _output ) throws CompilerException;
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.