Groovy Documentation

org.codehaus.groovy.classgen.asm
[Java] Class BinaryExpressionWriter

java.lang.Object
  org.codehaus.groovy.classgen.asm.BinaryExpressionWriter

public abstract class BinaryExpressionWriter
extends java.lang.Object

Authors:
Jochen "blackdrag" Theodorou


Field Summary
protected static int[] stdCompareCodes

 
Constructor Summary
BinaryExpressionWriter(WriterController controller)

 
Method Summary
boolean arrayGet(int operation, boolean simulate)

boolean arraySet(boolean simulate)

protected void doubleTwoOperands(org.objectweb.asm.MethodVisitor mv)

protected MethodCaller getArrayGetCaller()

protected ClassNode getArrayGetResultType()

protected MethodCaller getArraySetCaller()

protected int getBitwiseOperationBytecode(int type)

protected int getCompareCode()

writes some int standard operations. type is one of IADD, ISUB, IMUL, IDIV or IREM

protected ClassNode getDevisionOpResultType()

protected ClassNode getNormalOpResultType()

protected int getShiftOperationBytecode(int type)

Write shifting operations.

protected int getStandardOperationBytecode(int type)

protected void removeTwoOperands(org.objectweb.asm.MethodVisitor mv)

protected boolean supportsDivision()

boolean write(int operation, boolean simulate)

protected boolean writeBitwiseOp(int type, boolean simulate)

protected boolean writeDivision(boolean simulate)

protected void writeMinusMinus(org.objectweb.asm.MethodVisitor mv)

protected void writePlusPlus(org.objectweb.asm.MethodVisitor mv)

boolean writePostOrPrefixMethod(int operation, boolean simulate)

protected boolean writeShiftOp(int type, boolean simulate)

protected boolean writeSpaceship(int type, boolean simulate)

protected boolean writeStdCompare(int type, boolean simulate)

protected boolean writeStdOperators(int type, boolean simulate)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

stdCompareCodes

protected static final int[] stdCompareCodes


 
Constructor Detail

BinaryExpressionWriter

public BinaryExpressionWriter(WriterController controller)


 
Method Detail

arrayGet

public boolean arrayGet(int operation, boolean simulate)


arraySet

public boolean arraySet(boolean simulate)


doubleTwoOperands

protected void doubleTwoOperands(org.objectweb.asm.MethodVisitor mv)


getArrayGetCaller

protected MethodCaller getArrayGetCaller()


getArrayGetResultType

protected ClassNode getArrayGetResultType()


getArraySetCaller

protected MethodCaller getArraySetCaller()


getBitwiseOperationBytecode

protected int getBitwiseOperationBytecode(int type)


getCompareCode

protected int getCompareCode()
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


getDevisionOpResultType

protected ClassNode getDevisionOpResultType()


getNormalOpResultType

protected ClassNode getNormalOpResultType()


getShiftOperationBytecode

protected int getShiftOperationBytecode(int type)
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


getStandardOperationBytecode

protected int getStandardOperationBytecode(int type)


removeTwoOperands

protected void removeTwoOperands(org.objectweb.asm.MethodVisitor mv)


supportsDivision

protected boolean supportsDivision()


write

public boolean write(int operation, boolean simulate)


writeBitwiseOp

protected boolean writeBitwiseOp(int type, boolean simulate)


writeDivision

protected boolean writeDivision(boolean simulate)


writeMinusMinus

protected void writeMinusMinus(org.objectweb.asm.MethodVisitor mv)


writePlusPlus

protected void writePlusPlus(org.objectweb.asm.MethodVisitor mv)


writePostOrPrefixMethod

public boolean writePostOrPrefixMethod(int operation, boolean simulate)


writeShiftOp

protected boolean writeShiftOp(int type, boolean simulate)


writeSpaceship

protected boolean writeSpaceship(int type, boolean simulate)


writeStdCompare

protected boolean writeStdCompare(int type, boolean simulate)


writeStdOperators

protected boolean writeStdOperators(int type, boolean simulate)


 

Groovy Documentation