|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.ir.operand.Operand org.jikesrvm.compilers.opt.ir.operand.MethodOperand
public final class MethodOperand
Refers to a method. Used for method call instructions. Contains a RVMMethod (which may or may not have been resolved yet.)
TODO: Create subclasses of MethodOperand for internal & specialized targets.
Operand
,
RVMMethod
Field Summary | |
---|---|
private boolean |
designatedOffset
|
private static byte |
INTERFACE
|
(package private) boolean |
isGuardedInlineOffBranch
Is this the operand of a call that is the off-branch of a guarded inline? |
(package private) boolean |
isNonReturningCall
Is this the operand of a call that never returns? |
(package private) boolean |
isPreciseTarget
Is target exactly the method being invoked by this call, or is it a representative for a family of virtual/interface methods? |
Offset |
jtocOffset
|
(package private) MemberReference |
memRef
Member reference for target. |
private static byte |
SPECIAL
|
SpecializedMethod |
spMethod
|
private static byte |
STATIC
|
(package private) RVMMethod |
target
Target RVMMethod of invocation. |
(package private) byte |
type
The type of the invoke (STATIC, SPECIAL, VIRTUAL, INTERFACE) |
private static byte |
VIRTUAL
|
Fields inherited from class org.jikesrvm.compilers.opt.ir.operand.Operand |
---|
instruction |
Constructor Summary | |
---|---|
private |
MethodOperand(MemberReference ref,
RVMMethod tar,
byte t)
|
Method Summary | |
---|---|
static MethodOperand |
COMPILED(RVMMethod callee,
Offset offset)
Returns a method operand representing a compiled method with designated JTOC offset. |
Operand |
copy()
Return a new operand that is semantically equivalent to this . |
MemberReference |
getMemberRef()
|
RVMMethod |
getTarget()
|
boolean |
hasDesignatedTarget()
|
boolean |
hasPreciseTarget()
|
boolean |
hasSpecialVersion()
|
boolean |
hasTarget()
|
static MethodOperand |
INTERFACE(MethodReference ref,
RVMMethod target)
create a method operand for an INVOKE_INTERFACE bytecode |
boolean |
isGuardedInlineOffBranch()
Return whether this operand is the off branch of a guarded inline |
boolean |
isInterface()
|
boolean |
isNonReturningCall()
Get whether this operand represents a method call that never returns (such as a call to athrow()); |
boolean |
isSpecial()
|
boolean |
isStatic()
|
boolean |
isVirtual()
|
void |
refine(RVMMethod target)
Refine the target information. |
void |
refine(RVMMethod target,
boolean isPreciseTarget)
Refine the target information. |
void |
refine(RVMType targetClass)
Refine the target information. |
void |
setIsGuardedInlineOffBranch(boolean f)
Record that this operand is the off branch of a guarded inline |
void |
setIsNonReturningCall(boolean neverReturns)
Record whether this operand represents a method call that never returns (such as a call to athrow()); |
private void |
setPreciseTarget()
|
boolean |
similar(Operand op)
Are two operands semantically equivalent? |
static MethodOperand |
SPECIAL(MethodReference ref,
RVMMethod target)
create a method operand for an INVOKE_SPECIAL bytecode |
static MethodOperand |
STATIC(MethodReference ref,
RVMMethod target)
create a method operand for an INVOKE_STATIC bytecode |
static MethodOperand |
STATIC(RVMField target)
create a method operand for an INVOKE_STATIC bytecode where the target method is known at compile time. |
static MethodOperand |
STATIC(RVMMethod target)
create a method operand for an INVOKE_STATIC bytecode where the target method is known at compile time. |
String |
toString()
Returns the string representation of this operand. |
static MethodOperand |
VIRTUAL(MethodReference ref,
RVMMethod target)
create a method operand for an INVOKE_VIRTUAL bytecode |
Methods inherited from class org.jikesrvm.compilers.opt.ir.operand.Operand |
---|
asAddressConstant, asBlock, asBranch, asClassConstant, asCondition, asDoubleConstant, asFloatConstant, asIntConstant, asLocation, asLongConstant, asMemory, asMethod, asNullConstant, asObjectConstant, asRegister, asStackLocation, asStringConstant, asTIBConstant, asType, conservativelyApproximates, getIndexInInstruction, getType, isAddress, isAddressConstant, isBlock, isBranch, isClassConstant, isConstant, isDefinitelyNull, isDouble, isDoubleConstant, isFloat, isFloatConstant, isInt, isIntConstant, isIntLike, isLocation, isLong, isLongConstant, isMemory, isMethod, isMovableObjectConstant, isNullConstant, isObjectConstant, isRef, isRegister, isStackLocation, isStringConstant, isTIBConstant, isTrueGuard, isType, meet |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final byte STATIC
private static final byte SPECIAL
private static final byte VIRTUAL
private static final byte INTERFACE
final MemberReference memRef
Usually a MethodReference, but may be a FieldReference for internal methods that don't have 'real' Java method but come from OutOfLineMachineCode.
RVMMethod target
boolean isPreciseTarget
boolean isNonReturningCall
boolean isGuardedInlineOffBranch
byte type
private boolean designatedOffset
public Offset jtocOffset
public SpecializedMethod spMethod
Constructor Detail |
---|
private MethodOperand(MemberReference ref, RVMMethod tar, byte t)
ref
- MemberReference of method to calltar
- the RVMMethod to call (may be null)t
- the type of invoke used to call it (STATIC, SPECIAL, VIRTUAL, INTERFACE)Method Detail |
---|
private void setPreciseTarget()
public static MethodOperand COMPILED(RVMMethod callee, Offset offset)
callee
- the callee methodoffset
- designated jtop offset of compiled method of callee
public boolean hasDesignatedTarget()
public static MethodOperand SPECIAL(MethodReference ref, RVMMethod target)
ref
- MemberReference of method to calltarget
- the RVMMethod to call (may be null)
public static MethodOperand STATIC(MethodReference ref, RVMMethod target)
ref
- MemberReference of method to calltarget
- the RVMMethod to call (may be null)
public static MethodOperand STATIC(RVMMethod target)
target
- the RVMMethod to call
public static MethodOperand STATIC(RVMField target)
target
- the RVMMethod to call
public static MethodOperand VIRTUAL(MethodReference ref, RVMMethod target)
ref
- MemberReference of method to calltarget
- the RVMMethod to call (may be null)
public static MethodOperand INTERFACE(MethodReference ref, RVMMethod target)
ref
- MemberReference of method to calltarget
- the RVMMethod to call (may be null)
public boolean isStatic()
public boolean isVirtual()
public boolean isSpecial()
public boolean isInterface()
public boolean hasTarget()
public boolean hasPreciseTarget()
public RVMMethod getTarget()
public MemberReference getMemberRef()
public boolean isNonReturningCall()
public void setIsNonReturningCall(boolean neverReturns)
public boolean isGuardedInlineOffBranch()
public void setIsGuardedInlineOffBranch(boolean f)
public void refine(RVMMethod target)
public void refine(RVMType targetClass)
public void refine(RVMMethod target, boolean isPreciseTarget)
public Operand copy()
Operand
this
.
copy
in class Operand
this
public boolean similar(Operand op)
Operand
similar
in class Operand
op
- other operand
true
if this
and op
are semantically equivalent or false
if they are not.public String toString()
toString
in class Object
public boolean hasSpecialVersion()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |