public class HotSpotForeignCallLinkageImpl extends HotSpotForeignCallTarget implements HotSpotForeignCallLinkage, HotSpotProxified
HotSpotForeignCallLinkage.RegisterEffect, HotSpotForeignCallLinkage.Transition
Modifier and Type | Field and Description |
---|---|
protected ForeignCallDescriptor |
descriptor
The descriptor of the call.
|
private HotSpotForeignCallLinkage.RegisterEffect |
effect |
private CallingConvention |
incomingCallingConvention
The calling convention for incoming arguments to the stub, iff this call uses a compiled
stub.
|
private LocationIdentity[] |
killedLocations
The memory locations killed by the call.
|
private CallingConvention |
outgoingCallingConvention
The calling convention for this call.
|
private boolean |
reexecutable |
private Stub |
stub
Non-null (eventually) iff this is a call to a compiled stub.
|
private Value[] |
temporaries
The registers and stack slots defined/killed by the call.
|
private HotSpotForeignCallLinkage.Transition |
transition |
address
JUMP_ADDRESS
Constructor and Description |
---|
HotSpotForeignCallLinkageImpl(ForeignCallDescriptor descriptor,
long address,
HotSpotForeignCallLinkage.RegisterEffect effect,
HotSpotForeignCallLinkage.Transition transition,
CallingConvention outgoingCallingConvention,
CallingConvention incomingCallingConvention,
boolean reexecutable,
LocationIdentity... killedLocations) |
Modifier and Type | Method and Description |
---|---|
private static JavaType |
asJavaType(Class<?> type,
MetaAccessProvider metaAccess,
CodeCacheProvider codeCache) |
static HotSpotForeignCallLinkage |
create(MetaAccessProvider metaAccess,
CodeCacheProvider codeCache,
HotSpotForeignCallsProvider foreignCalls,
ForeignCallDescriptor descriptor,
long address,
HotSpotForeignCallLinkage.RegisterEffect effect,
CallingConvention.Type outgoingCcType,
CallingConvention.Type incomingCcType,
HotSpotForeignCallLinkage.Transition transition,
boolean reexecutable,
LocationIdentity... killedLocations)
Creates a
HotSpotForeignCallLinkage . |
static CallingConvention |
createCallingConvention(MetaAccessProvider metaAccess,
CodeCacheProvider codeCache,
ForeignCallDescriptor descriptor,
CallingConvention.Type ccType)
Gets a calling convention for a given descriptor and call type.
|
boolean |
destroysRegisters()
Determines if the foreign call target destroys all registers.
|
void |
finalizeAddress(Backend backend) |
long |
getAddress() |
ForeignCallDescriptor |
getDescriptor() |
CallingConvention |
getIncomingCallingConvention()
Gets the details of where parameters are passed and value(s) are returned from the callee's
perspective.
|
LocationIdentity[] |
getKilledLocations() |
long |
getMaxCallTargetOffset()
Returns the maximum absolute offset of PC relative call to this stub from any position in the
code cache or -1 when not applicable.
|
CallingConvention |
getOutgoingCallingConvention()
Gets the details of where parameters are passed and value(s) are returned from the caller's
perspective.
|
String |
getSymbol()
Gets the VM symbol associated with the target address of the call.
|
Value[] |
getTemporaries()
Gets the values used/killed by this foreign call.
|
boolean |
isCompiledStub()
Determines if this is a call to a compiled stub.
|
boolean |
isReexecutable() |
boolean |
mayContainFP()
Determines if the runtime function or stub might use floating point registers.
|
boolean |
needsDebugInfo()
Determines if debug info needs to be associated with this call.
|
boolean |
needsJavaFrameAnchor()
Determines if a
JavaFrameAnchor needs to be set up and torn down around this call. |
void |
setCompiledStub(Stub stub) |
String |
toString() |
protected final ForeignCallDescriptor descriptor
private final CallingConvention outgoingCallingConvention
private final CallingConvention incomingCallingConvention
private final HotSpotForeignCallLinkage.RegisterEffect effect
private final HotSpotForeignCallLinkage.Transition transition
private Value[] temporaries
private final LocationIdentity[] killedLocations
private final boolean reexecutable
public HotSpotForeignCallLinkageImpl(ForeignCallDescriptor descriptor, long address, HotSpotForeignCallLinkage.RegisterEffect effect, HotSpotForeignCallLinkage.Transition transition, CallingConvention outgoingCallingConvention, CallingConvention incomingCallingConvention, boolean reexecutable, LocationIdentity... killedLocations)
public static HotSpotForeignCallLinkage create(MetaAccessProvider metaAccess, CodeCacheProvider codeCache, HotSpotForeignCallsProvider foreignCalls, ForeignCallDescriptor descriptor, long address, HotSpotForeignCallLinkage.RegisterEffect effect, CallingConvention.Type outgoingCcType, CallingConvention.Type incomingCcType, HotSpotForeignCallLinkage.Transition transition, boolean reexecutable, LocationIdentity... killedLocations)
HotSpotForeignCallLinkage
.descriptor
- the descriptor of the calladdress
- the address of the code to calleffect
- specifies if the call destroys or preserves all registers (apart from
temporaries which are always destroyed)outgoingCcType
- outgoing (caller) calling convention typeincomingCcType
- incoming (callee) calling convention type (can be null)transition
- specifies if this is a leaf callreexecutable
- specifies if the call can be re-executed without (meaningful) side
effects. Deoptimization will not return to a point before a call that cannot be
re-executed.killedLocations
- the memory locations killed by the callpublic static CallingConvention createCallingConvention(MetaAccessProvider metaAccess, CodeCacheProvider codeCache, ForeignCallDescriptor descriptor, CallingConvention.Type ccType)
private static JavaType asJavaType(Class<?> type, MetaAccessProvider metaAccess, CodeCacheProvider codeCache)
public boolean isReexecutable()
isReexecutable
in interface HotSpotForeignCallLinkage
public LocationIdentity[] getKilledLocations()
getKilledLocations
in interface HotSpotForeignCallLinkage
public CallingConvention getOutgoingCallingConvention()
ForeignCallLinkage
getOutgoingCallingConvention
in interface ForeignCallLinkage
public CallingConvention getIncomingCallingConvention()
ForeignCallLinkage
getIncomingCallingConvention
in interface ForeignCallLinkage
public Value[] getTemporaries()
ForeignCallLinkage
getTemporaries
in interface ForeignCallLinkage
public long getMaxCallTargetOffset()
ForeignCallLinkage
getMaxCallTargetOffset
in interface ForeignCallLinkage
public ForeignCallDescriptor getDescriptor()
getDescriptor
in interface ForeignCallLinkage
public void setCompiledStub(Stub stub)
setCompiledStub
in interface HotSpotForeignCallLinkage
public boolean isCompiledStub()
isCompiledStub
in interface HotSpotForeignCallLinkage
public void finalizeAddress(Backend backend)
finalizeAddress
in interface HotSpotForeignCallLinkage
public long getAddress()
getAddress
in interface HotSpotForeignCallLinkage
public boolean destroysRegisters()
ForeignCallLinkage
destroysRegisters
in interface ForeignCallLinkage
true
if the register allocator must save all live registers around a call to
this targetpublic boolean needsDebugInfo()
ForeignCallLinkage
needsDebugInfo
in interface ForeignCallLinkage
public boolean mayContainFP()
HotSpotForeignCallLinkage
mayContainFP
in interface HotSpotForeignCallLinkage
public boolean needsJavaFrameAnchor()
HotSpotForeignCallLinkage
JavaFrameAnchor
needs to be set up and torn down around this call.needsJavaFrameAnchor
in interface HotSpotForeignCallLinkage
public String getSymbol()
HotSpotForeignCallLinkage
getSymbol
in interface HotSpotForeignCallLinkage