Package org.codehaus.groovy.classgen.asm.indy

# Class IndyBinHelper

java.lang.Object
org.codehaus.groovy.classgen.asm.BinaryExpressionHelper
org.codehaus.groovy.classgen.asm.indy.IndyBinHelper

public class IndyBinHelper extends BinaryExpressionHelper
Binary-expression helper that routes prefix and postfix operations through the indy invocation path.

- ## Field Summary

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

  `controller`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IndyBinHelper(WriterController wc)`
  Creates an indy-aware binary-expression helper.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `evaluateCompoundAssign(String assignName, String baseName, BinaryExpression expression)`
  GEP-15: emit `invokedynamic` to `IndyInterface.bootstrap(java.lang.invoke.MethodHandles.Lookup, java.lang.String, java.lang.invoke.MethodType, java.lang.String, int)` with the `IndyInterface.CallType.COMPOUND_ASSIGN` call type (resolved by `IndyCompoundAssign`), replacing the uncached static call into `ScriptBytecodeAdapter.compoundAssign`.
  `protected void`
  `writePostOrPrefixMethod(int op, String method, Expression expression, Expression orig)`
  Emits the method call used to implement a prefix or postfix operation.

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

  `assignToArray, eval, evaluateArrayAssignmentWithOperator, evaluateBinaryExpression, evaluateBinaryExpressionWithAssignment, evaluateCompareExpression, evaluateElvisEqual, evaluateEqual, evaluatePostfixMethod, evaluatePrefixMethod, evaluateTernary, getController, getIsCaseMethod`

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

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

- ## Constructor Details

  - ### IndyBinHelper

    public IndyBinHelper(WriterController wc)
    Creates an indy-aware binary-expression helper.

- ## Method Details

  - ### writePostOrPrefixMethod

    protected void writePostOrPrefixMethod(int op, String method, Expression expression, Expression orig)
    Emits the method call used to implement a prefix or postfix operation.
    Overrides:
      `writePostOrPrefixMethod` in class `BinaryExpressionHelper`
    Parameters:
      `op` - the token type
      `method` - the helper method name
      `expression` - the receiver expression
      `orig` - the original prefix/postfix expression

  - ### evaluateCompoundAssign

    protected void evaluateCompoundAssign(String assignName, String baseName, BinaryExpression expression)
    GEP-15: emit `invokedynamic` to `IndyInterface.bootstrap(java.lang.invoke.MethodHandles.Lookup, java.lang.String, java.lang.invoke.MethodType, java.lang.String, int)` with the `IndyInterface.CallType.COMPOUND_ASSIGN` call type (resolved by `IndyCompoundAssign`), replacing the uncached static call into `ScriptBytecodeAdapter.compoundAssign`. Subscript LHS (e.g. `a[i] += b`) is out of GEP-15 scope and stays on the legacy path.
    Overrides:
      `evaluateCompoundAssign` in class `BinaryExpressionHelper`