Package org.codehaus.groovy.classgen.asm
Class BinaryExpressionWriter
java.lang.Object
org.codehaus.groovy.classgen.asm.BinaryExpressionWriter
- Direct Known Subclasses:
BinaryFloatExpressionHelper,BinaryIntExpressionHelper,BinaryLongExpressionHelper,BinaryObjectExpressionHelper
- Author:
- Jochen "blackdrag" Theodorou
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanarrayGet(int operation, boolean simulate) booleanarraySet(boolean simulate) protected abstract voiddoubleTwoOperands(org.objectweb.asm.MethodVisitor mv) protected abstract MethodCallerprotected ClassNodeprotected abstract MethodCallerprotected abstract intgetBitwiseOperationBytecode(int type) protected abstract intprotected abstract ClassNodeprotected abstract ClassNodeprotected abstract intgetShiftOperationBytecode(int type) protected abstract intgetStandardOperationBytecode(int type) protected abstract voidremoveTwoOperands(org.objectweb.asm.MethodVisitor mv) protected booleanbooleanwrite(int operation, boolean simulate) protected booleanwriteBitwiseOp(int type, boolean simulate) writes some the bitwise operations.protected booleanwriteDivision(boolean simulate) protected abstract voidwriteMinusMinus(org.objectweb.asm.MethodVisitor mv) protected abstract voidwritePlusPlus(org.objectweb.asm.MethodVisitor mv) booleanwritePostOrPrefixMethod(int operation, boolean simulate) protected booleanwriteShiftOp(int type, boolean simulate) Write shifting operations.protected booleanwriteSpaceship(int type, boolean simulate) protected booleanwriteStdCompare(int type, boolean simulate) writes some int standard operations.protected booleanwriteStdOperators(int type, boolean simulate)
-
Field Details
-
stdCompareCodes
protected static final int[] stdCompareCodes
-
-
Constructor Details
-
BinaryExpressionWriter
-
-
Method Details
-
getCompareCode
protected abstract int getCompareCode() -
writeStdCompare
protected boolean writeStdCompare(int type, boolean simulate) writes some int standard operations. type is one of IADD, ISUB, IMUL, IDIV or IREM- Parameters:
type- the token type- Returns:
- true if a successful std operator write
-
doubleTwoOperands
protected abstract void doubleTwoOperands(org.objectweb.asm.MethodVisitor mv) -
removeTwoOperands
protected abstract void removeTwoOperands(org.objectweb.asm.MethodVisitor mv) -
writeSpaceship
protected boolean writeSpaceship(int type, boolean simulate) -
getNormalOpResultType
-
getStandardOperationBytecode
protected abstract int getStandardOperationBytecode(int type) -
writeStdOperators
protected boolean writeStdOperators(int type, boolean simulate) -
writeDivision
protected boolean writeDivision(boolean simulate) -
supportsDivision
protected boolean supportsDivision() -
getDevisionOpResultType
-
getBitwiseOperationBytecode
protected abstract int getBitwiseOperationBytecode(int type) -
writeBitwiseOp
protected boolean writeBitwiseOp(int type, boolean simulate) writes some the bitwise operations. type is one of BITWISE_OR, BITWISE_AND, BIWISE_XOR- Parameters:
type- the token type- Returns:
- true if a successful bitwise operation write
-
getShiftOperationBytecode
protected abstract int getShiftOperationBytecode(int type) -
writeShiftOp
protected boolean writeShiftOp(int type, boolean simulate) Write shifting operations. Type is one of LEFT_SHIFT, RIGHT_SHIFT, or RIGHT_SHIFT_UNSIGNED- Parameters:
type- the token type- Returns:
- true on a successful shift operation write
-
write
public boolean write(int operation, boolean simulate) -
getArrayGetCaller
-
getArrayGetResultType
-
getArraySetCaller
-
arrayGet
public boolean arrayGet(int operation, boolean simulate) -
arraySet
public boolean arraySet(boolean simulate) -
writePostOrPrefixMethod
public boolean writePostOrPrefixMethod(int operation, boolean simulate) -
writePlusPlus
protected abstract void writePlusPlus(org.objectweb.asm.MethodVisitor mv) -
writeMinusMinus
protected abstract void writeMinusMinus(org.objectweb.asm.MethodVisitor mv)
-