Enum Class O
- All Implemented Interfaces:
Serializable,Comparable<O>,Constable
Operator for IR template.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAddition operator.Bitwise AND operator.Pseudo-operation representing aIDOperationcond.exproperation.Signed division operator.Equality comparison operator.Signed greater-than-or-equal comparison operator.Signed greater-than comparison operator.Logical AND operator.Signed less-than-or-equal comparison operator.Logical NOT operator.Logical OR operator.Signed less-than comparison operator.Multiplication operator.wildcard for no-carry add, will match ADD, XOR, ORwildcard for no-carry sub, will match SUB, XORInequality comparison operator.Arithmetic negation operator.Bitwise complement operator.Bitwise OR operator.Signed remainder operator.Arithmetic right-shift operator.Left-shift operator.Logical right-shift operator.Subtraction operator.Bitwise XOR operator. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the corresponding Java operator type.Retrieve the corresponding Java operator type.booleanDetermine whether this operator is associative.booleanDetermine whether this operator is commutative.booleanisNormal()Determine whether this operator maps to a regular Java operator.static OReturns the enum constant of this class with the specified name.static O[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COND
Pseudo-operation representing aIDOperationcond.exproperation. -
NCADD
wildcard for no-carry add, will match ADD, XOR, OR -
NCSUB
wildcard for no-carry sub, will match SUB, XOR -
ADD
Addition operator. -
SUB
Subtraction operator. -
MUL
Multiplication operator. -
DIV_S
Signed division operator. -
REM_S
Signed remainder operator. -
NEG
Arithmetic negation operator. -
NOT
Bitwise complement operator. -
AND
Bitwise AND operator. -
OR
Bitwise OR operator. -
XOR
Bitwise XOR operator. -
LOR
Logical OR operator. -
LAND
Logical AND operator. -
LNOT
Logical NOT operator. -
EQ
Equality comparison operator. -
NE
Inequality comparison operator. -
GT_S
Signed greater-than comparison operator. -
GE_S
Signed greater-than-or-equal comparison operator. -
LT_S
Signed less-than comparison operator. -
LE_S
Signed less-than-or-equal comparison operator. -
SHL
Left-shift operator. -
SHR
Logical right-shift operator. -
SAR
Arithmetic right-shift operator.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isCommutative
public boolean isCommutative()Determine whether this operator is commutative.- Returns:
- true for commutative operators
-
isAssociative
public boolean isAssociative()Determine whether this operator is associative.- Returns:
- true for associative operators
-
getOperationType
Retrieve the corresponding Java operator type.- Returns:
- the Java operator type, or null for template-only operators
-
getJavaOperatorType
Retrieve the corresponding Java operator type.- Returns:
- the Java operator type, or null for template-only operators
-
isNormal
public boolean isNormal()Determine whether this operator maps to a regular Java operator.- Returns:
- true if a Java operator type is available
-