public static IRubyObject invokeModuleBody(ThreadContext context, CompiledIRMethod method) { RubyModule implClass = method.getImplementationClass(); return method.call(context, implClass, implClass, ""); }
public static IRubyObject invokeModuleBody(ThreadContext context, CompiledIRMethod method) { RubyModule implClass = method.getImplementationClass(); return method.call(context, implClass, implClass, ""); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) { if (specificArity != 1) return call(context, self, clazz, name, new IRubyObject[]{arg0}, Block.NULL_BLOCK); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) { if (specificArity != 2) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1}, Block.NULL_BLOCK); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) { if (specificArity != 2) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1}, Block.NULL_BLOCK); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block) { if (specificArity != 2) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1}, block); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, block, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) { if (specificArity != 3) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1, arg2 }, block); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, arg2, block, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block) { if (specificArity != 1) return call(context, self, clazz, name, new IRubyObject[]{arg0}, block); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, block, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { if (specificArity != 0) return call(context, self, clazz, name, IRubyObject.NULL_ARRAY, block); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, block, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block) { if (specificArity != 1) return call(context, self, clazz, name, new IRubyObject[]{arg0}, block); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, block, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) { if (specificArity != 0) return call(context, self, clazz, name, IRubyObject.NULL_ARRAY, Block.NULL_BLOCK); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block) { if (specificArity != 2) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1}, block); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, block, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) { if (specificArity != 1) return call(context, self, clazz, name, new IRubyObject[]{arg0}, Block.NULL_BLOCK); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { if (specificArity != 3) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1, arg2 }, Block.NULL_BLOCK); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, arg2, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { if (specificArity != 0) return call(context, self, clazz, name, IRubyObject.NULL_ARRAY, block); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, block, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) { if (specificArity != 0) return call(context, self, clazz, name, IRubyObject.NULL_ARRAY, Block.NULL_BLOCK); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { if (specificArity != 3) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1, arg2 }, Block.NULL_BLOCK); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, arg2, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) { if (specificArity != 3) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1, arg2 }, block); try { return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, arg2, block, implementationClass.getMethodLocation(), name); } catch (Throwable t) { Helpers.throwException(t); return null; // not reached } }