Top Description Fields Constructors Methods
org.jruby.ir.targets.indy

public Class FrameNameSite

extends MutableCallSite
Class Inheritance
Imports
com.headius.invokebinder.Binder, org.jruby.RubySymbol, org.jruby.runtime.Helpers, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.callsite.CacheEntry, org.objectweb.asm.Handle, java.lang.invoke.CallSite, .MethodHandle, .MethodHandles, .MethodType, .MutableCallSite

Perform an optimized __method__ or __callee__ invocation without accessing a caller's frame. This logic checks if the target method is our built-in version and uses fast logic in that case. All other calls fall back on normal indy call logic. Only the built-in versions can actually access the caller's frame, so we can omit the frame altogether if we only use the specialized site. Note that if the target method is initially not built-in, or becomes a not built-in version later, we permanently fall back on the invocation logic. No further checking is done and the site is optimized as a normal call from there.

Field Summary

Modifier and TypeField and Description
private final String
public static final Handle
private final int
private RubySymbol

Constructor Summary

AccessConstructor and Description
public
FrameNameSite(MethodType type, String file, int line)

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
__callee__(String frameName, RubySymbol.SymbolTable symbolTable)

public IRubyObject
__method__(String frameName, RubySymbol.SymbolTable symbolTable)

public static CallSite
frameNameBootstrap(MethodHandles.Lookup lookup, String name, MethodType methodType, String file, int line)

public IRubyObject
frameNameFallback(String name, ThreadContext context, IRubyObject self, String frameName)

private RubySymbol
getSimpleName(String frameName, RubySymbol.SymbolTable symbolTable)

Inherited from java.lang.invoke.MutableCallSite:
dynamicInvokergetTargetsetTargetsyncAll

Field Detail

fileback to summary
private final String file
FRAME_NAME_BOOTSTRAPback to summary
public static final Handle FRAME_NAME_BOOTSTRAP
lineback to summary
private final int line
methodCachedback to summary
private RubySymbol methodCached

Constructor Detail

FrameNameSiteback to summary
public FrameNameSite(MethodType type, String file, int line)

Method Detail

__callee__back to summary
public IRubyObject __callee__(String frameName, RubySymbol.SymbolTable symbolTable)
__method__back to summary
public IRubyObject __method__(String frameName, RubySymbol.SymbolTable symbolTable)
frameNameBootstrapback to summary
public static CallSite frameNameBootstrap(MethodHandles.Lookup lookup, String name, MethodType methodType, String file, int line)
frameNameFallbackback to summary
public IRubyObject frameNameFallback(String name, ThreadContext context, IRubyObject self, String frameName) throws Throwable
getSimpleNameback to summary
private RubySymbol getSimpleName(String frameName, RubySymbol.SymbolTable symbolTable)