public interface RelinkableCallSite
CallSite that also implement this interface as their call sites. There is a readily usable
MonomorphicCallSite subclass that implements monomorphic inline caching strategy as well as a
ChainedCallSite that retains a chain of already linked method handles. The reason this is defined as an
interface instead of a concrete, albeit abstract class is that it allows independent implementations to choose
between MutableCallSite and VolatileCallSite as they see fit.| Modifier and Type | Method and Description |
|---|---|
CallSiteDescriptor |
getDescriptor()
Returns the descriptor for this call site.
|
void |
setGuardedInvocation(GuardedInvocation guardedInvocation,
MethodHandle fallback)
This method will be called once by the dynamic linker every time the call site is relinked.
|
void |
setRelinkAndInvoke(MethodHandle relinkAndInvoke)
Sets the initial target to a relink-and-invoke method.
|
void setRelinkAndInvoke(MethodHandle relinkAndInvoke)
relinkAndInvoke - a relink-and-invoke method handle supplied by the DynamicLinker.CallSiteDescriptor getDescriptor()
void setGuardedInvocation(GuardedInvocation guardedInvocation, MethodHandle fallback)
guardedInvocation - the guarded invocation that the call site should set as its current target. Note that
the call sites are allowed to keep other non-invalidated invocations around for implementation of polymorphic
inline caches.fallback - the fallback method. This is a method matching the method type of the call site that is supplied
by the DynamicLinker to be used by this call site as a fallback when it can't invoke its target with the
passed arguments. The fallback method is such that when it's invoked, it'll try to discover the adequate target
for the invocation, subsequently invoke setGuardedInvocation(GuardedInvocation, MethodHandle), and
finally invoke the target.Copyright © 2012 Attila Szegedi. All Rights Reserved.