Class IndyBinHelper
java.lang.Object
org.codehaus.groovy.classgen.asm.BinaryExpressionHelper
org.codehaus.groovy.classgen.asm.indy.IndyBinHelper
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
ConstructorsConstructorDescriptionCreates an indy-aware binary-expression helper. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidevaluateCompoundAssign(String assignName, String baseName, BinaryExpression expression) GEP-15: emitinvokedynamictoIndyInterface.bootstrap(java.lang.invoke.MethodHandles.Lookup, java.lang.String, java.lang.invoke.MethodType, java.lang.String, int)with theIndyInterface.CallType.COMPOUND_ASSIGNcall type (resolved byIndyCompoundAssign), replacing the uncached static call intoScriptBytecodeAdapter.compoundAssign.protected voidwritePostOrPrefixMethod(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
-
Constructor Details
-
IndyBinHelper
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:
writePostOrPrefixMethodin classBinaryExpressionHelper- Parameters:
op- the token typemethod- the helper method nameexpression- the receiver expressionorig- the original prefix/postfix expression
-
evaluateCompoundAssign
protected void evaluateCompoundAssign(String assignName, String baseName, BinaryExpression expression) GEP-15: emitinvokedynamictoIndyInterface.bootstrap(java.lang.invoke.MethodHandles.Lookup, java.lang.String, java.lang.invoke.MethodType, java.lang.String, int)with theIndyInterface.CallType.COMPOUND_ASSIGNcall type (resolved byIndyCompoundAssign), replacing the uncached static call intoScriptBytecodeAdapter.compoundAssign. Subscript LHS (e.g.a[i] += b) is out of GEP-15 scope and stays on the legacy path.- Overrides:
evaluateCompoundAssignin classBinaryExpressionHelper
-