public class LinkRequestImpl extends Object implements LinkRequest
LinkRequest
, representing a link request to a call site that passes no language
runtime specific native context arguments on the stack.Constructor and Description |
---|
LinkRequestImpl(CallSiteDescriptor callSiteDescriptor,
boolean callSiteUnstable,
Object... arguments)
Creates a new link request.
|
Modifier and Type | Method and Description |
---|---|
Object[] |
getArguments()
Returns the arguments for the invocation being linked.
|
CallSiteDescriptor |
getCallSiteDescriptor()
Returns the call site descriptor for the call site being linked.
|
Object |
getReceiver()
Returns the 0th argument for the invocation being linked; this is typically the receiver object.
|
boolean |
isCallSiteUnstable()
Returns true if the call site is considered unstable, that is, it has been relinked more times than was
specified in
DynamicLinkerFactory.setUnstableRelinkThreshold(int) . |
LinkRequest |
replaceArguments(CallSiteDescriptor newCallSiteDescriptor,
Object[] newArguments)
Returns a request identical to this one with call site descriptor and arguments replaced with the ones specified.
|
LinkRequest |
withoutRuntimeContext()
Returns a request stripped from runtime context arguments.
|
public LinkRequestImpl(CallSiteDescriptor callSiteDescriptor, boolean callSiteUnstable, Object... arguments)
callSiteDescriptor
- the descriptor for the call site being linkedcallSiteUnstable
- true if the call site being linked is considered unstablearguments
- the arguments for the invocationpublic Object[] getArguments()
LinkRequest
getArguments
in interface LinkRequest
public Object getReceiver()
LinkRequest
getReceiver
in interface LinkRequest
public CallSiteDescriptor getCallSiteDescriptor()
LinkRequest
getCallSiteDescriptor
in interface LinkRequest
public boolean isCallSiteUnstable()
LinkRequest
DynamicLinkerFactory.setUnstableRelinkThreshold(int)
. Linkers should use this as a
hint to prefer producing linkage that is more stable (its guard fails less frequently), even if that assumption
causes a less effective version of an operation to be linked. This is just a hint, of course, and linkers are
free to ignore this property.isCallSiteUnstable
in interface LinkRequest
public LinkRequest withoutRuntimeContext()
LinkRequest
withoutRuntimeContext
in interface LinkRequest
public LinkRequest replaceArguments(CallSiteDescriptor newCallSiteDescriptor, Object[] newArguments)
LinkRequest
replaceArguments
in interface LinkRequest
newCallSiteDescriptor
- the new call site descriptornewArguments
- the new argumentsCopyright © 2017 Attila Szegedi. All rights reserved.