Package org.objectweb.asm.commons

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


      final Type modeType = Type.getType( RoundingMode.class );
      mv.getStatic( modeType, mc.getRoundingMode().name(), modeType );
      mv.visitMethodInsn( Opcodes.INVOKESPECIAL, RUNTIME_CONTEXT_TYPE.getInternalName(), "<init>",
          "(ILjava/math/RoundingMode;)V" );
    }
    mv.visitFieldInsn( Opcodes.PUTSTATIC, root.classInternalName(), RUNTIME_CONTEXT_NAME, RUNTIME_CONTEXT_DESCRIPTOR );
  }

  private void compilePredefinedMathContext( GeneratorAdapter _mv, String _fieldName )
  {
    Type mcType = Type.getType( MathContext.class );
View Full Code Here


  private final void compile_fun_WEEKDAY( ExpressionNode _a ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    compile( _a );
    mv.visitFieldInsn( Opcodes.GETSTATIC, "org/formulacompiler/runtime/internal/RuntimeBigDecimal_v2", "ONE", "Ljava/math/BigDecimal;" );
    compile_computationMode();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeBigDecimal_v2", "fun_WEEKDAY", "(Ljava/math/BigDecimal;Ljava/math/BigDecimal;Lorg/formulacompiler/runtime/ComputationMode;)Ljava/math/BigDecimal;" );
    compileValueAdjustment();
  }
View Full Code Here

      else {
        ci.push( _value );
        compileRuntimeMethod( ci, "newBigDecimal", S2B );
        compileAdjustment( ci );
      }
      ci.visitFieldInsn( Opcodes.PUTSTATIC, rootCompiler().classInternalName(), result, B );
      this.constantPool.put( _value, result );
    }
    return result;
  }
View Full Code Here

    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;
    mv.loadThis();
    mv.push( true );
View Full Code Here

    mv.visitJumpInsn( Opcodes.IFNE, skipInit );

    // this.xy$init = true;
    mv.loadThis();
    mv.push( true );
    mv.visitFieldInsn( Opcodes.PUTFIELD, section().classInternalName(), initName, initDesc );

    // this.xy = { ?, c1, c2, ... }
    mv.loadThis();
    section().getArrayAccessorForConstDataOnly( this.arrayNode ).compileCall( mv );
    int i = 0;
View Full Code Here

    if (section().hasReset()) {
      GeneratorAdapter reset = section().resetter();
      // this.xy$init = false;
      reset.loadThis();
      reset.push( false );
      reset.visitFieldInsn( Opcodes.PUTFIELD, section().classInternalName(), initName, initDesc );
    }

  }

View Full Code Here

    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 ]
    mv.loadThis();
    mv.push( n );
View Full Code Here

      }
      i++;
    }

    // this.xy *=* new double[] { ... }
    mv.visitFieldInsn( Opcodes.PUTFIELD, section().classInternalName(), methodName(), arrayDescriptor() );

    // }
    // return this.xy;
    mv.mark( skipInit );
    mv.loadThis();
View Full Code Here

    // }
    // return this.xy;
    mv.mark( skipInit );
    mv.loadThis();
    mv.visitFieldInsn( Opcodes.GETFIELD, section().classInternalName(), methodName(), arrayDescriptor() );
    mv.visitInsn( Opcodes.ARETURN );
  }


}
View Full Code Here

    Label l_0 = new Label();
    Label l_1 = new Label();
    mv.visitInsn( Opcodes.DUP );
    mv.visitVarInsn( Opcodes.ASTORE, 0 + loc );
    mv.visitJumpInsn( Opcodes.IFNONNULL, l_0 );
    mv.visitFieldInsn( Opcodes.GETSTATIC, "java/math/BigDecimal", "ZERO", "Ljava/math/BigDecimal;" );
    mv.visitJumpInsn( Opcodes.GOTO, l_1 );
    mv.visitLabel( l_0 );
    mv.visitTypeInsn( Opcodes.NEW, "java/math/BigDecimal" );
    mv.visitInsn( Opcodes.DUP );
    mv.visitVarInsn( Opcodes.ALOAD, 0 + loc );
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.