Package org.jruby.ext.ffi.jffi
Class JITNativeInvoker
java.lang.Object
org.jruby.internal.runtime.methods.DynamicMethod
org.jruby.ext.ffi.jffi.NativeInvoker
org.jruby.ext.ffi.jffi.JITNativeInvoker
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.internal.runtime.methods.DynamicMethod
DynamicMethod.NativeCall, DynamicMethod.Version -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final com.kenai.jffi.CallContextprotected final com.kenai.jffi.Functionprotected final longprotected static final com.kenai.jffi.Invokerprotected final CachingCallSiteprotected final CachingCallSiteprotected final CachingCallSiteprotected final CachingCallSiteprotected final CachingCallSiteprotected final CachingCallSiteprotected final CachingCallSiteprotected final NativeDataConverterprotected final NativeDataConverterprotected final NativeDataConverterprotected final NativeDataConverterprotected final NativeDataConverterprotected final NativeDataConverterprotected final com.kenai.jffi.ObjectParameterInfoprotected final com.kenai.jffi.ObjectParameterInfoprotected final com.kenai.jffi.ObjectParameterInfoprotected final com.kenai.jffi.ObjectParameterInfoprotected final com.kenai.jffi.ObjectParameterInfoprotected final com.kenai.jffi.ObjectParameterInfoprotected final NativeDataConverterprotected final SignatureFields inherited from class org.jruby.internal.runtime.methods.DynamicMethod
definedClass, flags, handle, implementationClass, name, protectedClass, serialNumber -
Constructor Summary
ConstructorsConstructorDescriptionJITNativeInvoker(RubyModule implementationClass, com.kenai.jffi.Function function, Signature signature) -
Method Summary
Modifier and TypeMethodDescriptioncall(ThreadContext context, IRubyObject self, RubyModule klazz, String name) Arity 0, no blockcall(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1) Arity 1, no blockfinal IRubyObjectcall(ThreadContext context, IRubyObject self, RubyModule clazz, 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.call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2) Arity 2, no blockcall(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) Arity 3, no blockcall(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4) call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5) call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5, IRubyObject arg6) (package private) com.kenai.jffi.CallContext(package private) longprivate static CachingCallSitegetParameterCallSite(Signature signature, int parameterIndex) private static NativeDataConvertergetParameterConverter(Signature signature, int i) private static com.kenai.jffi.ObjectParameterInfogetParameterInfo(Signature signature, int i) Methods inherited from class org.jruby.ext.ffi.jffi.NativeInvoker
call, dup, getArity, isNativeMethods inherited from class org.jruby.internal.runtime.methods.DynamicMethod
calculateProtectedClass, call, call, call, call, callRespondTo, getCallConfig, getDefinedClass, getHandle, getImplementationClass, getInstanceVariableNames, getMethodData, getName, getProtectedClass, getRealMethod, getSerialNumber, getSignature, getVisibility, init, init, isBuiltin, isCallableFrom, isImplementedBy, isNotImplemented, isNull, isRefined, isUndefined, setCallConfig, setDefinedClass, setHandle, setImplementationClass, setIsBuiltin, setNotImplemented, setVisibility
-
Field Details
-
invoker
protected static final com.kenai.jffi.Invoker invoker -
function
protected final com.kenai.jffi.Function function -
callContext
protected final com.kenai.jffi.CallContext callContext -
functionAddress
protected final long functionAddress -
signature
-
arity
protected final int arity -
resultConverter
-
parameterConverter0
-
parameterConverter1
-
parameterConverter2
-
parameterConverter3
-
parameterConverter4
-
parameterConverter5
-
parameterInfo0
protected final com.kenai.jffi.ObjectParameterInfo parameterInfo0 -
parameterInfo1
protected final com.kenai.jffi.ObjectParameterInfo parameterInfo1 -
parameterInfo2
protected final com.kenai.jffi.ObjectParameterInfo parameterInfo2 -
parameterInfo3
protected final com.kenai.jffi.ObjectParameterInfo parameterInfo3 -
parameterInfo4
protected final com.kenai.jffi.ObjectParameterInfo parameterInfo4 -
parameterInfo5
protected final com.kenai.jffi.ObjectParameterInfo parameterInfo5 -
parameterCallSite0
-
parameterCallSite1
-
parameterCallSite2
-
parameterCallSite3
-
parameterCallSite4
-
parameterCallSite5
-
parameterCallSite6
-
-
Constructor Details
-
JITNativeInvoker
public JITNativeInvoker(RubyModule implementationClass, com.kenai.jffi.Function function, Signature signature)
-
-
Method Details
-
getParameterConverter
-
getParameterInfo
-
getParameterCallSite
-
getCallContext
com.kenai.jffi.CallContext getCallContext()- Overrides:
getCallContextin classNativeInvoker
-
getFunctionAddress
long getFunctionAddress()- Overrides:
getFunctionAddressin classNativeInvoker
-
call
Description copied from class:DynamicMethodArity 0, no block- Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1) Description copied from class:DynamicMethodArity 1, no block- Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2) Description copied from class:DynamicMethodArity 2, no block- Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) Description copied from class:DynamicMethodArity 3, no block- Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4) -
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5) -
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5, IRubyObject arg6) -
call
public final IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) Description copied from class:DynamicMethodA 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.- Overrides:
callin classDynamicMethod- Parameters:
context- The thread context for the currently executing threadself- The 'self' or 'receiver' object to use for this callclazz- The Ruby class against which this method is bindingname- The incoming name used to invoke this methodargs- The first argument to this invocation- Returns:
- The result of the call
-