Package org.codehaus.groovy.classgen.asm
Class BinaryIntExpressionHelper
java.lang.Object
org.codehaus.groovy.classgen.asm.BinaryExpressionWriter
org.codehaus.groovy.classgen.asm.BinaryIntExpressionHelper
- Direct Known Subclasses:
BinaryBooleanExpressionHelper
public class BinaryIntExpressionHelper extends BinaryExpressionWriter
-
Constructor Summary
Constructors Constructor Description BinaryIntExpressionHelper(WriterController wc)BinaryIntExpressionHelper(WriterController wc, MethodCaller arraySet, MethodCaller arrayGet) -
Method Summary
Modifier and Type Method Description protected voiddoubleTwoOperands(org.objectweb.asm.MethodVisitor mv)protected intgetBitwiseOperationBytecode(int type)protected intgetCompareCode()protected ClassNodegetDevisionOpResultType()protected ClassNodegetNormalOpResultType()protected intgetShiftOperationBytecode(int type)protected intgetStandardOperationBytecode(int type)protected voidremoveTwoOperands(org.objectweb.asm.MethodVisitor mv)protected booleansupportsDivision()protected voidwriteMinusMinus(org.objectweb.asm.MethodVisitor mv)protected voidwritePlusPlus(org.objectweb.asm.MethodVisitor mv)protected booleanwriteSpaceship(int type, boolean simulate)writes the spaceship operator, type should be COMPARE_TOprotected booleanwriteStdCompare(int type, boolean simulate)writes a std compare.Methods inherited from class org.codehaus.groovy.classgen.asm.BinaryExpressionWriter
arrayGet, arraySet, getArrayGetCaller, getArrayGetResultType, getArraySetCaller, getController, setArraySetAndGet, write, writeBitwiseOp, writeDivision, writePostOrPrefixMethod, writeShiftOp, writeStdOperatorsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
BinaryIntExpressionHelper
-
BinaryIntExpressionHelper
public BinaryIntExpressionHelper(WriterController wc, MethodCaller arraySet, MethodCaller arrayGet)- Since:
- 2.5.0
-
-
Method Details
-
writeStdCompare
protected boolean writeStdCompare(int type, boolean simulate)writes a std compare. This involves the tokens IF_ICMPEQ, IF_ICMPNE, IF_ICMPEQ, IF_ICMPNE, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE and IF_ICMPLT- Overrides:
writeStdComparein classBinaryExpressionWriter- Parameters:
type- the token type- Returns:
- true if a successful std compare write
-
writeSpaceship
protected boolean writeSpaceship(int type, boolean simulate)writes the spaceship operator, type should be COMPARE_TO- Overrides:
writeSpaceshipin classBinaryExpressionWriter- Parameters:
type- the token type- Returns:
- true if a successful spaceship operator write
-
doubleTwoOperands
protected void doubleTwoOperands(org.objectweb.asm.MethodVisitor mv)- Specified by:
doubleTwoOperandsin classBinaryExpressionWriter
-
getBitwiseOperationBytecode
protected int getBitwiseOperationBytecode(int type)- Specified by:
getBitwiseOperationBytecodein classBinaryExpressionWriter
-
getCompareCode
protected int getCompareCode()- Specified by:
getCompareCodein classBinaryExpressionWriter
-
getNormalOpResultType
- Specified by:
getNormalOpResultTypein classBinaryExpressionWriter
-
getShiftOperationBytecode
protected int getShiftOperationBytecode(int type)- Specified by:
getShiftOperationBytecodein classBinaryExpressionWriter
-
getStandardOperationBytecode
protected int getStandardOperationBytecode(int type)- Specified by:
getStandardOperationBytecodein classBinaryExpressionWriter
-
removeTwoOperands
protected void removeTwoOperands(org.objectweb.asm.MethodVisitor mv)- Specified by:
removeTwoOperandsin classBinaryExpressionWriter
-
writeMinusMinus
protected void writeMinusMinus(org.objectweb.asm.MethodVisitor mv)- Specified by:
writeMinusMinusin classBinaryExpressionWriter
-
writePlusPlus
protected void writePlusPlus(org.objectweb.asm.MethodVisitor mv)- Specified by:
writePlusPlusin classBinaryExpressionWriter
-
getDevisionOpResultType
- Specified by:
getDevisionOpResultTypein classBinaryExpressionWriter
-
supportsDivision
protected boolean supportsDivision()- Overrides:
supportsDivisionin classBinaryExpressionWriter
-