Package org.objectweb.asm.commons

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


        //int arguments = mv.newLocal(Type.getType((new Object[0]).getClass()));

        if (returnType.getSort() != Type.VOID) {
            // The method returns something
            result = mv.newLocal(returnType);
            exception = mv.newLocal(Type.getType(Throwable.class));
        } else {
            exception = mv.newLocal(Type.getType(Throwable.class));
        }
View Full Code Here


        //int arguments = mv.newLocal(Type.getType((new Object[0]).getClass()));

        if (returnType.getSort() != Type.VOID) {
            // The method returns something
            result = mv.newLocal(returnType);
            exception = mv.newLocal(Type.getType(Throwable.class));
        } else {
            exception = mv.newLocal(Type.getType(Throwable.class));
        }

        Label l0 = new Label();
View Full Code Here

        if (returnType.getSort() != Type.VOID) {
            // The method returns something
            result = mv.newLocal(returnType);
            exception = mv.newLocal(Type.getType(Throwable.class));
        } else {
            exception = mv.newLocal(Type.getType(Throwable.class));
        }

        Label l0 = new Label();
        Label l1 = new Label();
        Label l2 = new Label();
View Full Code Here

        ga.visitTryCatchBlock(before, after, rethrow, "java/lang/RuntimeException");

        Type thr = Type.getType(Throwable.class);
        Label handler = ga.mark();
        Type udt = Type.getType(UndeclaredThrowableException.class);
        int loc = ga.newLocal(thr);
        ga.storeLocal(loc, thr);
        ga.newInstance(udt);
        ga.dup();
        ga.loadLocal(loc, thr);
        ga.invokeConstructor(udt, org.objectweb.asm.commons.Method
View Full Code Here

    if (outputContainerClass.isArray()) {
      mv.visitInsn( Opcodes.ARETURN );
    }
    else {
      // 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();
View Full Code Here

    else {
      // 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 );
View Full Code Here

      mv.loadLocal( l_arr );
      mv.arrayLength();
      mv.storeLocal( l_len );

      // 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 );
View Full Code Here

      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 );
      final Label test = mv.newLabel();
      mv.goTo( test );
      final Label again = mv.mark();
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 DetailInput[] ds = this.inputs.getarray();
    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();
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.