Package org.objectweb.asm.commons

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


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


      @Override
      protected void compileBody() throws CompilerException
      {
        final GeneratorAdapter mv = this.mv();
        final ExpressionCompiler ec = expressionCompiler();
        final Label handled = mv.newLabel();

        final Label beginHandling = mv.mark();
        ec.compile( _node.argument( 0 ) );
        ec.compileExceptionalValueTest( _testForErrors );
        mv.goTo( handled );
View Full Code Here

  private final void compileIf( ExpressionNode _test, ExpressionNode _ifTrue, ExpressionNode _ifFalse )
      throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final Label notMet = mv.newLabel();
    final Label done = mv.newLabel();

    method().numericCompiler().compileTest( _test, notMet );

    final Set<DelayedLet> outerSetsInTrueBranch = compileTrackingSetsOfOuterLets( _ifTrue );
View Full Code Here

  private final void compileIf( ExpressionNode _test, ExpressionNode _ifTrue, ExpressionNode _ifFalse )
      throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final Label notMet = mv.newLabel();
    final Label done = mv.newLabel();

    method().numericCompiler().compileTest( _test, notMet );

    final Set<DelayedLet> outerSetsInTrueBranch = compileTrackingSetsOfOuterLets( _ifTrue );
    revertSetsOfOuterLets( outerSetsInTrueBranch, null );
View Full Code Here

  {
    final SubSectionCompiler sub = this.sub;
    final GeneratorAdapter mv = mv();

    // if (this.field == null) {
    final Label alreadySet = mv.newLabel();
    mv.loadThis();
    mv.getField( section().classType(), sub.getterName(), sub.arrayType() );
    mv.ifNonNull( alreadySet );

    // ~ final DetailInput[] ds = this.inputs.getarray();
View Full Code Here

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

    int l_di;
    if (inputContainerClass.isArray()) {
View Full Code Here

    // private boolean xy$init;
    final FieldVisitor fv = cw().visitField( Opcodes.ACC_PRIVATE, initName, initDesc, null, null );
    fv.visitEnd();

    // if (!this.xy$init) {
    final Label skipInit = mv.newLabel();
    mv.loadThis();
    mv.visitFieldInsn( Opcodes.GETFIELD, section().classInternalName(), initName, initDesc );
    mv.visitJumpInsn( Opcodes.IFNE, skipInit );

    // this.xy$init = true;
View Full Code Here

    // private double[] xy;
    final FieldVisitor fv = cw().visitField( Opcodes.ACC_PRIVATE, methodName(), arrayDescriptor(), null, null );
    fv.visitEnd();

    // if (this.xy == null) {
    final Label skipInit = mv.newLabel();
    mv.loadThis();
    mv.visitFieldInsn( Opcodes.GETFIELD, section().classInternalName(), methodName(), arrayDescriptor() );
    mv.ifNonNull( skipInit );

    // ... new double[ n ]
View Full Code Here

  @Override
  protected void compileBody() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final Label ifFalse = mv.newLabel();
    numericCompiler().compileTest( this.node, ifFalse );
    mv.push( true );
    mv.returnValue();
    mv.visitLabel( ifFalse );
    mv.push( false );
View Full Code Here

  @Override
  protected void compileBody() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final Label outOfRange = mv.newLabel();

    // range check row
    mv.visitVarInsn( Opcodes.ILOAD, 1 ); // row
    mv.push( 1 );
    mv.ifICmp( mv.LT, outOfRange );
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.