Class StaticTypesBinaryExpressionMultiTypeDispatcher
java.lang.Object
org.codehaus.groovy.classgen.asm.BinaryExpressionHelper
org.codehaus.groovy.classgen.asm.BinaryExpressionMultiTypeDispatcher
org.codehaus.groovy.classgen.asm.sc.StaticTypesBinaryExpressionMultiTypeDispatcher
- Direct Known Subclasses:
IndyStaticTypesMultiTypeDispatcher
public class StaticTypesBinaryExpressionMultiTypeDispatcher
extends BinaryExpressionMultiTypeDispatcher
A specialized version of the multi type binary expression dispatcher which is aware of static compilation.
It is able to generate optimized bytecode for some operations using JVM instructions when available.
-
Field Summary
Fields inherited from class org.codehaus.groovy.classgen.asm.BinaryExpressionMultiTypeDispatcher
binExpWriter, typeMap, typeMapKeyNamesFields inherited from class org.codehaus.groovy.classgen.asm.BinaryExpressionHelper
controller -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassignToArray(Expression enclosing, Expression receiver, Expression subscript, Expression rhsValueLoader, boolean safe) protected voidevaluateBinaryExpressionWithAssignment(String method, BinaryExpression expression) protected voidevaluateCompoundAssign(String assignName, String baseName, BinaryExpression expression) GEP-15: dynamic-mode compound-assign codegen.voidevaluateEqual(BinaryExpression expression, boolean defineVariable) protected voidwritePostOrPrefixMethod(int op, String method, Expression expression, Expression orig) Methods inherited from class org.codehaus.groovy.classgen.asm.BinaryExpressionMultiTypeDispatcher
doPrimitiveCompare, doPrimtiveCompare, evaluateBinaryExpression, evaluateCompareExpression, getOperandType, initializeDelegateHelpersMethods inherited from class org.codehaus.groovy.classgen.asm.BinaryExpressionHelper
eval, evaluateArrayAssignmentWithOperator, evaluateElvisEqual, evaluatePostfixMethod, evaluatePrefixMethod, evaluateTernary, getController, getIsCaseMethod
-
Constructor Details
-
StaticTypesBinaryExpressionMultiTypeDispatcher
-
-
Method Details
-
writePostOrPrefixMethod
protected void writePostOrPrefixMethod(int op, String method, Expression expression, Expression orig) - Overrides:
writePostOrPrefixMethodin classBinaryExpressionMultiTypeDispatcher
-
evaluateBinaryExpressionWithAssignment
- Overrides:
evaluateBinaryExpressionWithAssignmentin classBinaryExpressionMultiTypeDispatcher
-
evaluateCompoundAssign
protected void evaluateCompoundAssign(String assignName, String baseName, BinaryExpression expression) Description copied from class:BinaryExpressionHelperGEP-15: dynamic-mode compound-assign codegen. Routes throughScriptBytecodeAdapter.compoundAssign(Object, Object, String, String)which dispatches toassignNamewhen the receiver responds to it, and falls back tobaseNameotherwise. The caller stores the helper's return value into the LHS — for the in-place branch this is a no-op store of the receiver back to itself; for the fallback branch it is the usual "x = x.op(y)" assignment.- Overrides:
evaluateCompoundAssignin classBinaryExpressionMultiTypeDispatcher
-
evaluateEqual
- Overrides:
evaluateEqualin classBinaryExpressionHelper
-
assignToArray
protected void assignToArray(Expression enclosing, Expression receiver, Expression subscript, Expression rhsValueLoader, boolean safe) - Overrides:
assignToArrayin classBinaryExpressionMultiTypeDispatcher
-