Package org.codehaus.groovy.classgen.asm

# Class BinaryDoubleExpressionHelper

java.lang.Object
org.codehaus.groovy.classgen.asm.BinaryExpressionWriter
org.codehaus.groovy.classgen.asm.BinaryLongExpressionHelper
org.codehaus.groovy.classgen.asm.BinaryDoubleExpressionHelper

public class BinaryDoubleExpressionHelper extends BinaryLongExpressionHelper
Binary expression helper specialized for `double` operations.

- ## Field Summary

  ### Fields inherited from class org.codehaus.groovy.classgen.asm.BinaryExpressionWriter

  `stdCompareCodes`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BinaryDoubleExpressionHelper(WriterController controller)`
  Creates a `double`-specialized binary expression helper.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected int`
  `getBitwiseOperationBytecode(int op)`
  Returns the bitwise opcode for the supplied token.
  `protected int`
  `getCompareCode()`
  `protected ClassNode`
  `getDevisionOpResultType()`
  `protected ClassNode`
  `getNormalOpResultType()`
  `protected int`
  `getShiftOperationBytecode(int type)`
  Returns the shift opcode for the supplied token.
  `protected int`
  `getStandardOperationBytecode(int type)`
  Returns the arithmetic opcode for the supplied token.
  `protected boolean`
  `supportsDivision()`
  `protected boolean`
  `writeBitwiseOp(int op, boolean simulate)`
  writes some the bitwise operations.
  `protected void`
  `writeMinusMinus(org.objectweb.asm.MethodVisitor mv)`
  Emits a prefix/postfix decrement.
  `protected void`
  `writePlusPlus(org.objectweb.asm.MethodVisitor mv)`
  Emits a prefix/postfix increment.
  `protected boolean`
  `writeShiftOp(int type, boolean simulate)`
  Write shifting operations.

  ### Methods inherited from class org.codehaus.groovy.classgen.asm.BinaryLongExpressionHelper

  `doubleTwoOperands, removeTwoOperands`

  ### Methods inherited from class org.codehaus.groovy.classgen.asm.BinaryExpressionWriter

  `arrayGet, arraySet, getArrayGetCaller, getArrayGetResultType, getArraySetCaller, getController, setArraySetAndGet, write, writeDivision, writePostOrPrefixMethod, writeSpaceship, writeStdCompare, writeStdOperators`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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