public class DefaultMethod extends DynamicMethod implements CacheableMethod
DynamicMethod.NativeCall| Modifier and Type | Field and Description |
|---|---|
protected Arity |
arity |
private NativeInvoker |
compiledInvoker |
static boolean |
DEBUG |
private NativeInvoker |
defaultInvoker |
protected com.kenai.jffi.Function |
function |
private JITHandle |
jitHandle |
static boolean |
REIFY |
protected Signature |
signature |
builtin, callConfig, handle, implementationClass, name, nativeCall, nativeCalls, notImplemented, protectedClass, serialNumber, visibility| Constructor and Description |
|---|
DefaultMethod(RubyModule implementationClass,
com.kenai.jffi.Function function,
Signature signature,
NativeInvoker defaultInvoker) |
| Modifier and Type | Method and Description |
|---|---|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
IRubyObject[] args)
A default implementation of n-arity, non-block 'call' method,
which simply calls the n-arity, block-receiving version with
the arg list and Block.NULL_BLOCK.
|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
IRubyObject[] args,
Block block)
The minimum 'call' method required for a dynamic method handle.
|
DynamicMethod |
dup()
Duplicate this method, returning DynamicMethod referencing the same code
and with the same attributes.
|
NativeInvoker |
forceCompilation() |
Arity |
getArity()
Retrieve the arity of this method, used for reporting arity to Ruby
code.
|
(package private) com.kenai.jffi.CallContext |
getCallContext() |
(package private) long |
getFunctionAddress() |
private JITHandle |
getJITHandle() |
DynamicMethod |
getMethodForCaching() |
protected NativeInvoker |
getNativeInvoker() |
(package private) Signature |
getSignature() |
boolean |
isNative()
Returns true if this method is backed by native (i.e.
|
private NativeInvoker |
tryCompilation() |
calculateProtectedClass, call, call, call, call, call, call, call, call, getCallConfig, getHandle, getImplementationClass, getMethodData, getName, getNativeCall, getNativeCall, getProtectedClass, getRealMethod, getSerialNumber, getVisibility, handleBreak, handleRedo, handleReturn, init, isBuiltin, isCallableFrom, isNotImplemented, isUndefined, setCallConfig, setHandle, setImplementationClass, setIsBuiltin, setName, setNativeCall, setNativeCall, setNativeCall, setNotImplemented, setVisibilitypublic static final boolean DEBUG
public static final boolean REIFY
protected final Signature signature
private final NativeInvoker defaultInvoker
private volatile NativeInvoker compiledInvoker
private JITHandle jitHandle
protected final Arity arity
protected final com.kenai.jffi.Function function
public DefaultMethod(RubyModule implementationClass, com.kenai.jffi.Function function, Signature signature, NativeInvoker defaultInvoker)
public final DynamicMethod dup()
DynamicMethoddup in class DynamicMethodpublic final Arity getArity()
DynamicMethodgetArity in class DynamicMethodpublic final boolean isNative()
DynamicMethodisNative in class DynamicMethodpublic DynamicMethod getMethodForCaching()
getMethodForCaching in interface CacheableMethodSignature getSignature()
com.kenai.jffi.CallContext getCallContext()
long getFunctionAddress()
protected final NativeInvoker getNativeInvoker()
private JITHandle getJITHandle()
private NativeInvoker tryCompilation()
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject[] args)
DynamicMethodcall in class DynamicMethodcontext - The thread context for the currently executing threadself - The 'self' or 'receiver' object to use for this callname - The incoming name used to invoke this methodpublic IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject[] args, Block block)
DynamicMethodcall in class DynamicMethodcontext - The thread context for the currently executing threadself - The 'self' or 'receiver' object to use for this callname - The incoming name used to invoke this methodargs - The argument list to this invocationblock - The block passed to this invocationpublic final NativeInvoker forceCompilation()