public class GenerateMagic extends Object
Modifier and Type | Field and Description |
---|---|
private static int |
ATTEMPT_OP |
private static int |
LOAD_OP |
private static int |
PREPARE_OP |
private static int |
STORE_OP |
Constructor and Description |
---|
GenerateMagic() |
Modifier and Type | Method and Description |
---|---|
private static Instruction |
_cmpHelper(BC2IR bc2ir,
GenerationContext gc,
ConditionOperand cond,
Operand given_o2) |
(package private) static boolean |
generateMagic(BC2IR bc2ir,
GenerationContext gc,
MethodReference meth)
"Semantic inlining" of methods of the Magic class.
|
(package private) static boolean |
generatePolymorphicMagic(BC2IR bc2ir,
GenerationContext gc,
MethodReference meth,
Atom methodName) |
private static Operator |
getOperator(TypeReference type,
int operatorClass) |
private static boolean |
isLoad(Atom methodName) |
private static boolean |
isPrefix(Atom prefix,
byte[] b)
Is string
a a prefix of string
b . |
private static boolean |
isPrepare(Atom methodName) |
private static LocationOperand |
mapToMetadata(Operand metadata) |
private static final int LOAD_OP
private static final int PREPARE_OP
private static final int STORE_OP
private static final int ATTEMPT_OP
public GenerateMagic()
static boolean generateMagic(BC2IR bc2ir, GenerationContext gc, MethodReference meth) throws MagicNotImplementedException
bc2ir
- the bc2ir object that is generating the
ir containing this magicgc
- must be bc2ir.gcmeth
- the RVMMethod that is the magic methodtrue
if and only if magic was generatedMagicNotImplementedException
static boolean generatePolymorphicMagic(BC2IR bc2ir, GenerationContext gc, MethodReference meth, Atom methodName)
private static Instruction _cmpHelper(BC2IR bc2ir, GenerationContext gc, ConditionOperand cond, Operand given_o2)
private static LocationOperand mapToMetadata(Operand metadata)
private static Operator getOperator(TypeReference type, int operatorClass) throws MagicNotImplementedException
MagicNotImplementedException