Package org.objectweb.asm.commons

Examples of org.objectweb.asm.commons.GeneratorAdapter



  GeneratorAdapter newMethod( int _access, String _name, String _descriptor )
  {
    MethodVisitor mv = cw().visitMethod( _access, _name, _descriptor, null, null );
    GeneratorAdapter ma = new GeneratorAdapter( mv, _access, _name, _descriptor );
    ma.visitCode();
    return ma;
  }
View Full Code Here


  }

  private void finalizeStaticInitializer()
  {
    if (this.initializer != null) {
      GeneratorAdapter ma = this.initializer;
      ma.visitInsn( Opcodes.RETURN );
      endMethod( ma );
      this.initializer = null;
    }
  }
View Full Code Here

    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/RuntimeLong_v2$Context", "fromBigDecimal", "(Ljava/math/BigDecimal;)J" );
  }

  private final void compile_fun_RATE( ExpressionNode _a, ExpressionNode _b, ExpressionNode _c, ExpressionNode _d ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    incLocalsOffset( 7 );
    compile_context();
    compile( _a );
    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/RuntimeLong_v2$Context", "toBigDecimal", "(J)Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 0 + loc );
    compile_context();
    compile( _b );
    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/RuntimeLong_v2$Context", "toBigDecimal", "(J)Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 1 + loc );
    compile_context();
    compile( _c );
    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/RuntimeLong_v2$Context", "toBigDecimal", "(J)Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 2 + loc );
    compile_context();
    compile( _d );
    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/RuntimeLong_v2$Context", "toBigDecimal", "(J)Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 3 + loc );
    mv.visitFieldInsn( Opcodes.GETSTATIC, "org/formulacompiler/runtime/internal/RuntimeScaledBigDecimal_v2", "ZERO", "Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 4 + loc );
    mv.visitFieldInsn( Opcodes.GETSTATIC, "org/formulacompiler/runtime/internal/RuntimeScaledBigDecimal_v2", "TENTH", "Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 5 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 0 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 1 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 2 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 3 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 4 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 5 + loc );
    mv.visitFieldInsn( Opcodes.GETSTATIC, "org/formulacompiler/runtime/internal/RuntimeScaledBigDecimal_v2", "HIGHPREC", "Ljava/math/MathContext;" );
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeScaledBigDecimal_v2", "fun_RATE", "(Ljava/math/BigDecimal;Ljava/math/BigDecimal;Ljava/math/BigDecimal;Ljava/math/BigDecimal;Ljava/math/BigDecimal;Ljava/math/BigDecimal;Ljava/math/MathContext;)Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 6 + loc );
    compile_context();
    mv.visitVarInsn( Opcodes.ALOAD, 6 + loc );
    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/RuntimeLong_v2$Context", "fromBigDecimal", "(Ljava/math/BigDecimal;)J" );
  }
View Full Code Here

    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/RuntimeLong_v2$Context", "fromBigDecimal", "(Ljava/math/BigDecimal;)J" );
  }

  private final void compile_fun_RATE( ExpressionNode _a, ExpressionNode _b, ExpressionNode _c ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    incLocalsOffset( 7 );
    compile_context();
    compile( _a );
    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/RuntimeLong_v2$Context", "toBigDecimal", "(J)Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 0 + loc );
    compile_context();
    compile( _b );
    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/RuntimeLong_v2$Context", "toBigDecimal", "(J)Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 1 + loc );
    compile_context();
    compile( _c );
    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/RuntimeLong_v2$Context", "toBigDecimal", "(J)Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 2 + loc );
    mv.visitFieldInsn( Opcodes.GETSTATIC, "org/formulacompiler/runtime/internal/RuntimeScaledBigDecimal_v2", "ZERO", "Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 3 + loc );
    mv.visitFieldInsn( Opcodes.GETSTATIC, "org/formulacompiler/runtime/internal/RuntimeScaledBigDecimal_v2", "ZERO", "Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 4 + loc );
    mv.visitFieldInsn( Opcodes.GETSTATIC, "org/formulacompiler/runtime/internal/RuntimeScaledBigDecimal_v2", "TENTH", "Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 5 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 0 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 1 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 2 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 3 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 4 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 5 + loc );
    mv.visitFieldInsn( Opcodes.GETSTATIC, "org/formulacompiler/runtime/internal/RuntimeScaledBigDecimal_v2", "HIGHPREC", "Ljava/math/MathContext;" );
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeScaledBigDecimal_v2", "fun_RATE", "(Ljava/math/BigDecimal;Ljava/math/BigDecimal;Ljava/math/BigDecimal;Ljava/math/BigDecimal;Ljava/math/BigDecimal;Ljava/math/BigDecimal;Ljava/math/MathContext;)Ljava/math/BigDecimal;" );
    mv.visitVarInsn( Opcodes.ASTORE, 6 + loc );
    compile_context();
    mv.visitVarInsn( Opcodes.ALOAD, 6 + loc );
    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/RuntimeLong_v2$Context", "fromBigDecimal", "(Ljava/math/BigDecimal;)J" );
  }
View Full Code Here

    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/RuntimeLong_v2$Context", "fromBigDecimal", "(Ljava/math/BigDecimal;)J" );
  }

  private final void compile_fun_DATE( ExpressionNode _a, ExpressionNode _b, ExpressionNode _c ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    compile( _a );
    compile( _b );
    compile( _c );
    compile_context();
    compile_computationMode();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeLong_v2", "fun_DATE", "(JJJLorg/formulacompiler/runtime/internal/RuntimeLong_v2$Context;Lorg/formulacompiler/runtime/ComputationMode;)J" );
  }
View Full Code Here

    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeLong_v2", "fun_DATE", "(JJJLorg/formulacompiler/runtime/internal/RuntimeLong_v2$Context;Lorg/formulacompiler/runtime/ComputationMode;)J" );
  }

  private final void compile_fun_TIME__for_EXCEL( ExpressionNode _a, ExpressionNode _b, ExpressionNode _c ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    compile( _a );
    compile( _b );
    compile( _c );
    compile_context();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeLong_v2", "fun_TIME", "(JJJLorg/formulacompiler/runtime/internal/RuntimeLong_v2$Context;)J" );
  }
View Full Code Here

    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeLong_v2", "fun_TIME", "(JJJLorg/formulacompiler/runtime/internal/RuntimeLong_v2$Context;)J" );
  }

  private final void compile_fun_TIME__for_OPEN_OFFICE_CALC( ExpressionNode _a, ExpressionNode _b, ExpressionNode _c ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    compile( _a );
    compile( _b );
    compile( _c );
    compile_context();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeLong_v2", "fun_TIME_OOo", "(JJJLorg/formulacompiler/runtime/internal/RuntimeLong_v2$Context;)J" );
  }
View Full Code Here

    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeLong_v2", "fun_TIME_OOo", "(JJJLorg/formulacompiler/runtime/internal/RuntimeLong_v2$Context;)J" );
  }

  private final void compile_fun_SECOND( ExpressionNode _a ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    compile( _a );
    compile_context();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeLong_v2", "fun_SECOND", "(JLorg/formulacompiler/runtime/internal/RuntimeLong_v2$Context;)J" );
  }
View Full Code Here

    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeLong_v2", "fun_SECOND", "(JLorg/formulacompiler/runtime/internal/RuntimeLong_v2$Context;)J" );
  }

  private final void compile_fun_MINUTE( ExpressionNode _a ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    compile( _a );
    compile_context();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeLong_v2", "fun_MINUTE", "(JLorg/formulacompiler/runtime/internal/RuntimeLong_v2$Context;)J" );
  }
View Full Code Here

    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeLong_v2", "fun_MINUTE", "(JLorg/formulacompiler/runtime/internal/RuntimeLong_v2$Context;)J" );
  }

  private final void compile_fun_HOUR( ExpressionNode _a ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    compile( _a );
    compile_context();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/RuntimeLong_v2", "fun_HOUR", "(JLorg/formulacompiler/runtime/internal/RuntimeLong_v2$Context;)J" );
  }
View Full Code Here

TOP

Related Classes of org.objectweb.asm.commons.GeneratorAdapter

Copyright © 2018 www.massapicom. 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.