Modifier and Type | Field and Description |
---|---|
static BitwiseOp |
and |
static BitwiseOp |
ashift |
static BitwiseOp |
ashiftl |
static BitwiseOp |
ashiftr |
static BitwiseOp |
ior |
static BitwiseOp |
not |
static BitwiseOp |
xor |
AND, ASHIFT_GENERAL, ASHIFT_LEFT, ASHIFT_RIGHT, DIVIDE_GENERIC, DIVIDE_INEXACT, IOR, LSHIFT_RIGHT, MODULO, NOT, QUOTIENT, QUOTIENT_EXACT, XOR
applyToObject, noArgs
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
nameKey
Constructor and Description |
---|
BitwiseOp(java.lang.String name,
int op) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
adjustResult(IntNum value,
int code) |
java.lang.Object |
apply1(java.lang.Object arg1) |
java.lang.Object |
apply2(java.lang.Object arg1,
java.lang.Object arg2) |
java.lang.Object |
applyN(java.lang.Object[] args) |
static int |
checkNonNegativeShift(Procedure proc,
int amount) |
java.lang.Object |
defaultResult() |
int |
numArgs()
Return
minArgs()|(maxArgs<<12) . |
static IntNum |
shiftLeft(IntNum value,
int count) |
static IntNum |
shiftRight(IntNum value,
int count) |
isSideEffectFree
applyToObject
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
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
public static final BitwiseOp and
public static final BitwiseOp ior
public static final BitwiseOp xor
public static final BitwiseOp ashift
public static final BitwiseOp ashiftl
public static final BitwiseOp ashiftr
public static final BitwiseOp not
public java.lang.Object defaultResult()
defaultResult
in class ArithOp
public java.lang.Object adjustResult(IntNum value, int code)
public java.lang.Object apply2(java.lang.Object arg1, java.lang.Object arg2)
public static int checkNonNegativeShift(Procedure proc, int amount)
public int numArgs()
Procedure
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.