gnu.kawa.functions
Class BitwiseOp
java.lang.Object
gnu.mapping.PropertySet
gnu.mapping.Procedure
gnu.mapping.ProcedureN
gnu.kawa.functions.ArithOp
gnu.kawa.functions.BitwiseOp
- All Implemented Interfaces:
- Named
public class BitwiseOp
- extends ArithOp
Fields inherited from class gnu.kawa.functions.ArithOp |
AND, ASHIFT_GENERAL, ASHIFT_LEFT, ASHIFT_RIGHT, DIVIDE_GENERIC, DIVIDE_INEXACT, IOR, LSHIFT_RIGHT, MODULO, NOT, QUOTIENT, QUOTIENT_EXACT, XOR |
Constructor Summary |
BitwiseOp(java.lang.String name,
int op)
|
Methods inherited from class gnu.mapping.Procedure |
apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getReturnType, getSetter, getSourceLocation, match0, match1, match2, match3, match4, matchN, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
and
public static final BitwiseOp and
ior
public static final BitwiseOp ior
xor
public static final BitwiseOp xor
ashift
public static final BitwiseOp ashift
ashiftl
public static final BitwiseOp ashiftl
ashiftr
public static final BitwiseOp ashiftr
not
public static final BitwiseOp not
BitwiseOp
public BitwiseOp(java.lang.String name,
int op)
defaultResult
public java.lang.Object defaultResult()
- Overrides:
defaultResult
in class ArithOp
adjustResult
public java.lang.Object adjustResult(IntNum value,
int code)
apply1
public java.lang.Object apply1(java.lang.Object arg1)
- Overrides:
apply1
in class ProcedureN
apply2
public java.lang.Object apply2(java.lang.Object arg1,
java.lang.Object arg2)
- Overrides:
apply2
in class ProcedureN
applyN
public java.lang.Object applyN(java.lang.Object[] args)
- Specified by:
applyN
in class ProcedureN
checkNonNegativeShift
public static int checkNonNegativeShift(Procedure proc,
int amount)
shiftLeft
public static IntNum shiftLeft(IntNum value,
int count)
shiftRight
public static IntNum shiftRight(IntNum value,
int count)
numArgs
public int numArgs()
- Description copied from class:
Procedure
- Return
minArgs()|(maxArgs<<12)
.
We use a single virtual function to reduce the number of methods
in the system, as well as the number of virtual method table entries.
We shift by 12 so the number can normally be represented using a
sipush instruction, without requiring a constant pool entry.
- Overrides:
numArgs
in class Procedure