Package org.objectweb.asm.commons

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


      ga.ifZCmp(GeneratorAdapter.LT, label);
      ga.loadThis();
      ga.loadArg(0);
      ga.putField(bean, "f", Type.INT_TYPE);
      Label end = new Label();
      ga.goTo(end);
      ga.mark(label);
      ga.throwException(Type.getType(IllegalArgumentException.class),
          "f");
      ga.mark(end);
      ga.returnValue();
View Full Code Here


      staticAdapter.putStatic(typeBeingWoven, methodStaticFieldName,
          METHOD_TYPE);

      Label afterCatch = staticAdapter.newLabel();
      staticAdapter.mark(endPopulate);
      staticAdapter.goTo(afterCatch);

      staticAdapter.mark(catchHandler);
      // We don't care about the exception, so pop it off
      staticAdapter.pop();
      // store the reflected method in the static field
View Full Code Here

    mg.storeLocal(1,Type.getType(StackTraceElement[].class));

    mg.push(10);
    mg.storeLocal(2,Type.getType(int.class));
   
    mg.goTo(LABEL_LOOP_CMP);

    mg.mark(LABEL_LOOP_START);
    mg.loadLocal(1);
    mg.loadLocal(2);
    mg.arrayLoad(Type.getType(StackTraceElement.class));
View Full Code Here

      staticAdapter.putStatic(typeBeingWoven, methodStaticFieldName,
          METHOD_TYPE);

      Label afterCatch = staticAdapter.newLabel();
      staticAdapter.mark(endPopulate);
      staticAdapter.goTo(afterCatch);

      staticAdapter.mark(catchHandler);
      // We don't care about the exception, so pop it off
      staticAdapter.pop();
      // store the reflected method in the static field
View Full Code Here

      // 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 ] );
      mv.loadLocal( l_lst );
      mv.loadLocal( l_arr );
View Full Code Here

        final Label handled = mv.newLabel();

        final Label beginHandling = mv.mark();
        ec.compile( _node.argument( 0 ) );
        ec.compileExceptionalValueTest( _testForErrors );
        mv.goTo( handled );
        final Label endHandling = mv.mark();

        for (int i = 0; i < _handledTypesReturningTrue.length; i++) {
          mv.catchException( beginHandling, endHandling, _handledTypesReturningTrue[ i ] );
          mv.visitVarInsn( Opcodes.ASTORE, method().newLocal( 1 ) );
View Full Code Here

        for (int i = 0; i < _handledTypesReturningTrue.length; i++) {
          mv.catchException( beginHandling, endHandling, _handledTypesReturningTrue[ i ] );
          mv.visitVarInsn( Opcodes.ASTORE, method().newLocal( 1 ) );
          ec.compileConst( Boolean.TRUE );
          mv.goTo( handled );
        }

        for (int i = 0; i < _handledTypesReturningFalse.length; i++) {
          mv.catchException( beginHandling, endHandling, _handledTypesReturningFalse[ i ] );
          mv.visitVarInsn( Opcodes.ASTORE, method().newLocal( 1 ) );
View Full Code Here

        for (int i = 0; i < _handledTypesReturningFalse.length; i++) {
          mv.catchException( beginHandling, endHandling, _handledTypesReturningFalse[ i ] );
          mv.visitVarInsn( Opcodes.ASTORE, method().newLocal( 1 ) );
          ec.compileConst( Boolean.FALSE );
          mv.goTo( handled );
        }

        mv.mark( handled );
      }
View Full Code Here

    mv.loadThis();
    mv.loadLocal( l_di );
    mv.putField( section().classType(), sub.getterName(), sub.arrayType() );

    // ~ } else {
    mv.goTo( alreadySet );
    mv.mark( isNull );

    // ~ ~ this.field = new DetailPrototype[ 0 ];
    mv.loadThis();
    mv.push( 0 );
View Full Code Here

      //int i=forConditionVisitor.visitBeforeExpression(adapter,from,step,true);
     
      // init
      adapter.visitLabel(forDoubleVisitor.beforeInit);
      forDoubleVisitor.forInit(adapter, from, true);
      adapter.goTo(forDoubleVisitor.beforeExpr);
     
      // update
      adapter.visitLabel(forDoubleVisitor.beforeUpdate);
      adapter.loadLocal(index);
      //forConditionVisitor.forUpdate(adapter, step, true);
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.