Class BinaryDoubleExpressionHelper


public class BinaryDoubleExpressionHelper extends BinaryLongExpressionHelper
Binary expression helper specialized for double operations.
  • Constructor Details

    • BinaryDoubleExpressionHelper

      public BinaryDoubleExpressionHelper(WriterController controller)
      Creates a double-specialized binary expression helper.
      Parameters:
      controller - the active writer controller
  • Method Details

    • writeBitwiseOp

      protected boolean writeBitwiseOp(int op, boolean simulate)
      writes some the bitwise operations. type is one of BITWISE_OR, BITWISE_AND, BITWISE_XOR
      Overrides:
      writeBitwiseOp in class BinaryExpressionWriter
      Parameters:
      op - the token type
      Returns:
      true if a successful bitwise operation write
    • getBitwiseOperationBytecode

      protected int getBitwiseOperationBytecode(int op)
      Returns the bitwise opcode for the supplied token.
      Overrides:
      getBitwiseOperationBytecode in class BinaryLongExpressionHelper
      Parameters:
      op - the normalized token index
      Returns:
      the ASM opcode
    • getCompareCode

      protected int getCompareCode()
      Overrides:
      getCompareCode in class BinaryLongExpressionHelper
      Returns:
      the ASM compare opcode used by this primitive type
    • getNormalOpResultType

      protected ClassNode getNormalOpResultType()
      Overrides:
      getNormalOpResultType in class BinaryLongExpressionHelper
      Returns:
      the result type for normal arithmetic operations
    • writeShiftOp

      protected boolean writeShiftOp(int type, boolean simulate)
      Write shifting operations. Type is one of LEFT_SHIFT, RIGHT_SHIFT, or RIGHT_SHIFT_UNSIGNED
      Overrides:
      writeShiftOp in class BinaryExpressionWriter
      Parameters:
      type - the token type
      Returns:
      true on a successful shift operation write
    • getShiftOperationBytecode

      protected int getShiftOperationBytecode(int type)
      Returns the shift opcode for the supplied token.
      Overrides:
      getShiftOperationBytecode in class BinaryLongExpressionHelper
      Parameters:
      type - the normalized token index
      Returns:
      the ASM opcode
    • getStandardOperationBytecode

      protected int getStandardOperationBytecode(int type)
      Returns the arithmetic opcode for the supplied token.
      Overrides:
      getStandardOperationBytecode in class BinaryLongExpressionHelper
      Parameters:
      type - the normalized token index
      Returns:
      the ASM opcode
    • writeMinusMinus

      protected void writeMinusMinus(org.objectweb.asm.MethodVisitor mv)
      Emits a prefix/postfix decrement.
      Overrides:
      writeMinusMinus in class BinaryLongExpressionHelper
      Parameters:
      mv - the current method visitor
    • writePlusPlus

      protected void writePlusPlus(org.objectweb.asm.MethodVisitor mv)
      Emits a prefix/postfix increment.
      Overrides:
      writePlusPlus in class BinaryLongExpressionHelper
      Parameters:
      mv - the current method visitor
    • getDevisionOpResultType

      protected ClassNode getDevisionOpResultType()
      Overrides:
      getDevisionOpResultType in class BinaryLongExpressionHelper
      Returns:
      the result type for division operations
    • supportsDivision

      protected boolean supportsDivision()
      Overrides:
      supportsDivision in class BinaryLongExpressionHelper
      Returns:
      whether this primitive helper supports division bytecode directly