Package 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
-
-
Field Summary
Fields Modifier and Type Field Description static BitwiseOp
and
static BitwiseOp
ashift
static BitwiseOp
ashiftl
static BitwiseOp
ashiftr
static BitwiseOp
ior
static BitwiseOp
not
static BitwiseOp
xor
-
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
-
Fields inherited from class gnu.mapping.ProcedureN
applyToObject, noArgs
-
Fields inherited from class gnu.mapping.Procedure
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
-
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
adjustResult(IntNum value, int code)
Object
apply1(Object arg1)
Object
apply2(Object arg1, Object arg2)
Object
applyN(Object[] args)
static int
checkNonNegativeShift(Procedure proc, int amount)
Object
defaultResult()
int
numArgs()
ReturnminArgs()|(maxArgs<<12)
.static IntNum
shiftLeft(IntNum value, int count)
static IntNum
shiftRight(IntNum value, int count)
-
Methods inherited from class gnu.kawa.functions.ArithOp
isSideEffectFree
-
Methods inherited from class gnu.mapping.ProcedureN
applyToObject
-
Methods inherited from class gnu.mapping.Procedure
apply0, apply3, apply4, applyL, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getReturnType, getSetter, getSourceLocation, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString
-
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
-
-
-
Field Detail
-
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
-
-
Constructor Detail
-
BitwiseOp
public BitwiseOp(String name, int op)
-
-
Method Detail
-
defaultResult
public Object defaultResult()
- Overrides:
defaultResult
in classArithOp
-
checkNonNegativeShift
public static int checkNonNegativeShift(Procedure proc, int amount)
-
numArgs
public int numArgs()
Description copied from class:Procedure
ReturnminArgs()|(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.
-
-