@Override public NativeCall getNativeCall() { return delegate.getNativeCall(); }
@Override public NativeCall getNativeCall(int args, boolean block) { return delegate.getNativeCall(args, block); //To change body of overridden methods use File | Settings | File Templates. }
@Override public NativeCall getNativeCall(int args, boolean block) { return oldMethod.getNativeCall(args, block); }
@Override public NativeCall getNativeCall(int args, boolean block) { return oldMethod.getNativeCall(args, block); }
@Override public NativeCall getNativeCall() { return delegate.getNativeCall(); }
@Override public NativeCall getNativeCall(int args, boolean block) { return delegate.getNativeCall(args, block); //To change body of overridden methods use File | Settings | File Templates. }
@Override public boolean canGenerate(JRubyCallSite site, RubyClass cls, DynamicMethod method) { NativeCall nativeCall = method.getNativeCall(); if (nativeCall != null) { int nativeArgCount = getNativeArgCount(method, method.getNativeCall()); // arity must match or both be [] args if (nativeArgCount != site.arity()) { throw new IndirectBindingException("arity mismatch or varargs at call site: " + nativeArgCount + " != " + site.arity()); } return true; } return false; }
@Override public boolean canGenerate(JRubyCallSite site, RubyClass cls, DynamicMethod method) { NativeCall nativeCall = method.getNativeCall(); if (nativeCall != null) { int nativeArgCount = getNativeArgCount(method, method.getNativeCall()); // arity must match or both be [] args if (nativeArgCount != site.arity()) { throw new IndirectBindingException("arity mismatch or varargs at call site: " + nativeArgCount + " != " + site.arity()); } return true; } return false; }
@Override public boolean canGenerate(JRubyCallSite site, RubyClass cls, DynamicMethod method) { NativeCall nativeCall = method.getNativeCall(); if (method instanceof CompiledMethod || method instanceof JittedMethod) { if (nativeCall != null) { int nativeArgCount = getNativeArgCount(method, method.getNativeCall()); // arity must match or both be [] args if (nativeArgCount != site.arity()) { throw new IndirectBindingException("arity mismatch or varargs at call site: " + nativeArgCount + " != " + site.arity()); } return true; } } return false; }
@Override public boolean canGenerate(JRubyCallSite site, RubyClass cls, DynamicMethod method) { NativeCall nativeCall = method.getNativeCall(); if (method instanceof CompiledMethod || method instanceof JittedMethod) { if (nativeCall != null) { int nativeArgCount = getNativeArgCount(method, method.getNativeCall()); // arity must match or both be [] args if (nativeArgCount != site.arity()) { throw new IndirectBindingException("arity mismatch or varargs at call site: " + nativeArgCount + " != " + site.arity()); } return true; } } return false; }
@Override public MethodHandle generate(JRubyCallSite site, RubyClass cls, DynamicMethod method, String realName) { // Ruby to Ruby if (RubyInstanceConfig.LOG_INDY_BINDINGS) LOG.info(site.name() + "\tbound to Ruby method " + logMethod(method) + ": " + method.getNativeCall()); return postProcessNativeHandle(createRubyHandle(site, method, realName), site, method, true, false); }
@Override public MethodHandle generate(JRubyCallSite site, RubyClass cls, DynamicMethod method, String realName) { // Ruby to Ruby if (RubyInstanceConfig.LOG_INDY_BINDINGS) LOG.info(site.name() + "\tbound to Ruby method " + logMethod(method) + ": " + method.getNativeCall()); return postProcessNativeHandle(createRubyHandle(site, method, realName), site, method, true, false); }
@Override public MethodHandle generate(JRubyCallSite site, RubyClass cls, DynamicMethod method, String realName) { // Ruby to Java if (RubyInstanceConfig.LOG_INDY_BINDINGS) LOG.info(site.name() + "\tbound to Java method " + logMethod(method) + ": " + method.getNativeCall()); return postProcessNativeHandle(createJavaHandle(site, method), site, method, false, Options.REWRITE_JAVA_TRACE.load()); }
@Override public MethodHandle generate(JRubyCallSite site, RubyClass cls, DynamicMethod method, String realName) { // Ruby to Core if (RubyInstanceConfig.LOG_INDY_BINDINGS) LOG.info(site.name() + "\tbound to native method " + logMethod(method) + ": " + method.getNativeCall()); return postProcessNativeHandle(createNativeHandle(cls.getClassRuntime(), site, method, realName), site, method, true, false); }
@Override public MethodHandle generate(JRubyCallSite site, RubyClass cls, DynamicMethod method, String realName) { // Ruby to Core if (RubyInstanceConfig.LOG_INDY_BINDINGS) LOG.info(site.name() + "\tbound to native method " + logMethod(method) + ": " + method.getNativeCall()); return postProcessNativeHandle(createNativeHandle(cls.getClassRuntime(), site, method, realName), site, method, true, false); }
@Override public MethodHandle generate(JRubyCallSite site, RubyClass cls, DynamicMethod method, String realName) { // Ruby to Java if (RubyInstanceConfig.LOG_INDY_BINDINGS) LOG.info(site.name() + "\tbound to Java method " + logMethod(method) + ": " + method.getNativeCall()); return postProcessNativeHandle(createJavaHandle(site, method), site, method, false, Options.REWRITE_JAVA_TRACE.load()); }
@Override public boolean canGenerate(JRubyCallSite site, RubyClass cls, DynamicMethod method) { NativeCall nativeCall = method.getNativeCall(); if (nativeCall != null) { // has an explicit native call path if (nativeCall.isJava()) { if (!RubyInstanceConfig.INVOKEDYNAMIC_JAVA) { throw new IndirectBindingException("direct Java dispatch not enabled"); } // if Java, must: // * match arity <= 3 // * not be passed a block (no coercion yet) // * be a normal wrapper around a class or module (not a Ruby subclass) if (nativeCall.getNativeSignature().length != site.arity() || site.arity() > 3 || site.isIterator() || !cls.getJavaProxy()) { throw new IndirectBindingException("Java call arity mismatch or > 3 args"); } return true; } } return false; }
@Override public boolean canGenerate(JRubyCallSite site, RubyClass cls, DynamicMethod method) { NativeCall nativeCall = method.getNativeCall(); if (nativeCall != null) { // has an explicit native call path if (nativeCall.isJava()) { if (!RubyInstanceConfig.INVOKEDYNAMIC_JAVA) { throw new IndirectBindingException("direct Java dispatch not enabled"); } // if Java, must: // * match arity <= 3 // * not be passed a block (no coercion yet) // * be a normal wrapper around a class or module (not a Ruby subclass) if (nativeCall.getNativeSignature().length != site.arity() || site.arity() > 3 || site.isIterator() || !cls.getJavaProxy()) { throw new IndirectBindingException("Java call arity mismatch or > 3 args"); } return true; } } return false; }
if (nativeTarget != null) return nativeTarget; DynamicMethod.NativeCall nativeCall = method.getNativeCall();
if (nativeTarget != null) return nativeTarget; DynamicMethod.NativeCall nativeCall = method.getNativeCall();