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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doubleTwoOperands(org.objectweb.asm.MethodVisitor mv)
protected int
getBitwiseOperationBytecode(int type)
protected int
getCompareCode()
protected ClassNode
getDevisionOpResultType()
protected ClassNode
getNormalOpResultType()
protected int
getShiftOperationBytecode(int type)
protected int
getStandardOperationBytecode(int type)
protected void
removeTwoOperands(org.objectweb.asm.MethodVisitor mv)
protected boolean
supportsDivision()
protected void
writeMinusMinus(org.objectweb.asm.MethodVisitor mv)
protected void
writePlusPlus(org.objectweb.asm.MethodVisitor mv)
protected boolean
writeSpaceship(int type, boolean simulate)
writes the spaceship operator, type should be COMPARE_TOprotected boolean
writeStdCompare(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, writeStdOperators
-
-
-
-
Constructor Detail
-
BinaryIntExpressionHelper
public BinaryIntExpressionHelper(WriterController wc)
-
BinaryIntExpressionHelper
public BinaryIntExpressionHelper(WriterController wc, MethodCaller arraySet, MethodCaller arrayGet)
- Since:
- 2.5.0
-
-
Method Detail
-
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:
writeStdCompare
in 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:
writeSpaceship
in 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:
doubleTwoOperands
in classBinaryExpressionWriter
-
getBitwiseOperationBytecode
protected int getBitwiseOperationBytecode(int type)
- Specified by:
getBitwiseOperationBytecode
in classBinaryExpressionWriter
-
getCompareCode
protected int getCompareCode()
- Specified by:
getCompareCode
in classBinaryExpressionWriter
-
getNormalOpResultType
protected ClassNode getNormalOpResultType()
- Specified by:
getNormalOpResultType
in classBinaryExpressionWriter
-
getShiftOperationBytecode
protected int getShiftOperationBytecode(int type)
- Specified by:
getShiftOperationBytecode
in classBinaryExpressionWriter
-
getStandardOperationBytecode
protected int getStandardOperationBytecode(int type)
- Specified by:
getStandardOperationBytecode
in classBinaryExpressionWriter
-
removeTwoOperands
protected void removeTwoOperands(org.objectweb.asm.MethodVisitor mv)
- Specified by:
removeTwoOperands
in classBinaryExpressionWriter
-
writeMinusMinus
protected void writeMinusMinus(org.objectweb.asm.MethodVisitor mv)
- Specified by:
writeMinusMinus
in classBinaryExpressionWriter
-
writePlusPlus
protected void writePlusPlus(org.objectweb.asm.MethodVisitor mv)
- Specified by:
writePlusPlus
in classBinaryExpressionWriter
-
getDevisionOpResultType
protected ClassNode getDevisionOpResultType()
- Specified by:
getDevisionOpResultType
in classBinaryExpressionWriter
-
supportsDivision
protected boolean supportsDivision()
- Overrides:
supportsDivision
in classBinaryExpressionWriter
-
-