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

public Class BlockGivenSite

extends MutableCallSite
Class Inheritance
Imports
com.headius.invokebinder.Binder, org.jruby.runtime.Block, .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 block_given? check without accessing a caller's frame. This logic checks if the target method is our built-in block_given? and uses fast logic in that case. All other calls fall back on normal indy call logic. 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
public static final Handle
private final String
private final int

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
public static IRubyObject
blockGiven(ThreadContext context, Block block)

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

public IRubyObject
Inherited from java.lang.invoke.MutableCallSite:
dynamicInvokergetTargetsetTargetsyncAll

Field Detail

BLOCK_GIVEN_BOOTSTRAPback to summary
public static final Handle BLOCK_GIVEN_BOOTSTRAP
fileback to summary
private final String file
lineback to summary
private final int line

Constructor Detail

BlockGivenSiteback to summary
public BlockGivenSite(MethodType type, String file, int line)

Method Detail

blockGivenback to summary
public static IRubyObject blockGiven(ThreadContext context, Block block)
blockGivenBootstrapback to summary
public static CallSite blockGivenBootstrap(MethodHandles.Lookup lookup, String name, MethodType methodType, String file, int line)
blockGivenFallbackback to summary
public IRubyObject blockGivenFallback(String name, ThreadContext context, IRubyObject self, Block block) throws Throwable