@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) { return getNativeInvoker().call(context, self, clazz, name, args); }
public DefaultMethod(RubyModule implementationClass, Function function, Signature signature, NativeInvoker defaultInvoker) { super(implementationClass, Visibility.PUBLIC, defaultInvoker.getName()); this.arity = Arity.fixed(signature.getParameterCount()); this.function = function; this.defaultInvoker = defaultInvoker; this.signature = signature; }
public static MethodHandle getFastNumericMethodHandle(JRubyCallSite site, DynamicMethod method) { Signature signature = (method instanceof NativeInvoker) ? ((NativeInvoker) method).getSignature() : ((DefaultMethod) method).getSignature(); ? ((NativeInvoker) method).getCallContext() : ((DefaultMethod) method).getCallContext(); ? ((NativeInvoker) method).getFunctionAddress() : ((DefaultMethod) method).getFunctionAddress();
private synchronized NativeInvoker tryCompilation() { if (compiledInvoker != null) { return compiledInvoker; } NativeInvoker invoker = getJITHandle().compile(getImplementationClass(), function, signature, getName()); if (invoker != null) { invoker.setName(getName()); compiledInvoker = invoker; getImplementationClass().invalidateCacheDescendants(); return compiledInvoker; } // // Once compilation has failed, always fallback to the default invoker // if (getJITHandle().compilationFailed()) { compiledInvoker = defaultInvoker; getImplementationClass().invalidateCacheDescendants(); } return defaultInvoker; }
private static MethodHandle getDirectPointerParameterGuard(JRubyCallSite site, DynamicMethod method) { Signature signature = (method instanceof NativeInvoker) ? ((NativeInvoker) method).getSignature() : ((DefaultMethod) method).getSignature(); MethodHandle[] guards = new MethodHandle[signature.getParameterCount()];
public static MethodHandle getFastNumericMethodHandle(JRubyCallSite site, DynamicMethod method) { Signature signature = (method instanceof NativeInvoker) ? ((NativeInvoker) method).getSignature() : ((DefaultMethod) method).getSignature(); ? ((NativeInvoker) method).getCallContext() : ((DefaultMethod) method).getCallContext(); ? ((NativeInvoker) method).getFunctionAddress() : ((DefaultMethod) method).getFunctionAddress();
private synchronized NativeInvoker tryCompilation() { if (compiledInvoker != null) { return compiledInvoker; } NativeInvoker invoker = getJITHandle().compile(getImplementationClass(), function, signature, getName()); if (invoker != null) { invoker.setName(getName()); compiledInvoker = invoker; getImplementationClass().invalidateCacheDescendants(); return compiledInvoker; } // // Once compilation has failed, always fallback to the default invoker // if (getJITHandle().compilationFailed()) { compiledInvoker = defaultInvoker; getImplementationClass().invalidateCacheDescendants(); } return defaultInvoker; }
private static MethodHandle getDirectPointerParameterGuard(JRubyCallSite site, DynamicMethod method) { Signature signature = (method instanceof NativeInvoker) ? ((NativeInvoker) method).getSignature() : ((DefaultMethod) method).getSignature(); MethodHandle[] guards = new MethodHandle[signature.getParameterCount()];
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) { return getNativeInvoker().call(context, self, clazz, name, args); }
public DefaultMethod(RubyModule implementationClass, Function function, Signature signature, NativeInvoker defaultInvoker) { super(implementationClass, Visibility.PUBLIC, defaultInvoker.getName()); this.arity = Arity.fixed(signature.getParameterCount()); this.function = function; this.defaultInvoker = defaultInvoker; this.signature = signature; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) { return getNativeInvoker().call(context, self, clazz, name, args, block); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) { return getNativeInvoker().call(context, self, clazz, name, args, block); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) { return getNativeInvoker().call(context, self, clazz, name, args, block); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) { return getNativeInvoker().call(context, self, clazz, name, args); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) { return getNativeInvoker().call(context, self, clazz, name, args); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) { return getNativeInvoker().call(context, self, clazz, name, args, block); }