public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { return callMethodMissing(entry, site.callType(), context, self, method); } MethodHandle target = getTarget(site, selfClass, entry, 0); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, false, 0); return (IRubyObject)target.invokeWithArguments(context, caller, self); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { return callMethodMissing(entry, site.callType(), context, self, method); } MethodHandle target = getTarget(site, selfClass, entry, 0); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, false, 0); return (IRubyObject)target.invokeWithArguments(context, caller, self); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { IRubyObject mmResult = callMethodMissing(entry, site.callType(), context, self, method, args); // TODO: replace with handle logic return site.isAttrAssign() ? args[args.length - 1] : mmResult; } MethodHandle target = getTarget(site, selfClass, entry, -1); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, false, 4); return (IRubyObject)target.invokeWithArguments(context, caller, self, args); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { IRubyObject mmResult = callMethodMissing(entry, site.callType(), context, self, method, args); // TODO: replace with handle logic return site.isAttrAssign() ? args[args.length - 1] : mmResult; } MethodHandle target = getTarget(site, selfClass, entry, -1); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, false, 4); return (IRubyObject)target.invokeWithArguments(context, caller, self, args); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { IRubyObject mmResult = callMethodMissing(entry, site.callType(), context, self, method, arg0); // TODO: replace with handle logic return site.isAttrAssign() ? arg0 : mmResult; } MethodHandle target = getTarget(site, selfClass, entry, 1); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, false, 1); return (IRubyObject)target.invokeWithArguments(context, caller, self, arg0); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { IRubyObject mmResult = callMethodMissing(entry, site.callType(), context, self, method, arg0, arg1, arg2); // TODO: replace with handle logic return site.isAttrAssign() ? arg2 : mmResult; } MethodHandle target = getTarget(site, selfClass, entry, 3); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, false, 3); return (IRubyObject)target.invokeWithArguments(context, caller, self, arg0, arg1, arg2); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { IRubyObject mmResult = callMethodMissing(entry, site.callType(), context, self, method, arg0, arg1); // TODO: replace with handle logic return site.isAttrAssign() ? arg1 : mmResult; } MethodHandle target = getTarget(site, selfClass, entry, 2); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, false, 2); return (IRubyObject)target.invokeWithArguments(context, caller, self, arg0, arg1); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { IRubyObject mmResult = callMethodMissing(entry, site.callType(), context, self, method, arg0, arg1, arg2); // TODO: replace with handle logic return site.isAttrAssign() ? arg2 : mmResult; } MethodHandle target = getTarget(site, selfClass, entry, 3); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, false, 3); return (IRubyObject)target.invokeWithArguments(context, caller, self, arg0, arg1, arg2); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { IRubyObject mmResult = callMethodMissing(entry, site.callType(), context, self, method, arg0, arg1); // TODO: replace with handle logic return site.isAttrAssign() ? arg1 : mmResult; } MethodHandle target = getTarget(site, selfClass, entry, 2); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, false, 2); return (IRubyObject)target.invokeWithArguments(context, caller, self, arg0, arg1); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { IRubyObject mmResult = callMethodMissing(entry, site.callType(), context, self, method, arg0); // TODO: replace with handle logic return site.isAttrAssign() ? arg0 : mmResult; } MethodHandle target = getTarget(site, selfClass, entry, 1); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, false, 1); return (IRubyObject)target.invokeWithArguments(context, caller, self, arg0); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, Block block) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { try { return callMethodMissing(entry, site.callType(), context, self, method, arg0, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { return retryJumpError(context); } finally { if (site.isIterator()) block.escape(); } } MethodHandle target = getTarget(site, selfClass, entry, 1); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, true, 1); return (IRubyObject) target.invokeWithArguments(context, caller, self, arg0, block); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { try { return callMethodMissing(entry, site.callType(), context, self, method, args, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { return retryJumpError(context); } finally { if (site.isIterator()) block.escape(); } } MethodHandle target = getTarget(site, selfClass, entry, -1); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, true, 4); return (IRubyObject) target.invokeWithArguments(context, caller, self, args, block); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, Block block) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { try { return callMethodMissing(entry, site.callType(), context, self, method, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { return retryJumpError(context); } finally { if (site.isIterator()) block.escape(); } } MethodHandle target = getTarget(site, selfClass, entry, 0); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, true, 0); return (IRubyObject) target.invokeWithArguments(context, caller, self, block); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { try { return callMethodMissing(entry, site.callType(), context, self, method, arg0, arg1, arg2, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { return retryJumpError(context); } finally { if (site.isIterator()) block.escape(); } } MethodHandle target = getTarget(site, selfClass, entry, 3); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, true, 3); return (IRubyObject) target.invokeWithArguments(context, caller, self, arg0, arg1, arg2, block); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1, Block block) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { try { return callMethodMissing(entry, site.callType(), context, self, method, arg0, arg1, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { return retryJumpError(context); } finally { if (site.isIterator()) block.escape(); } } MethodHandle target = getTarget(site, selfClass, entry, 2); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, true, 2); return (IRubyObject) target.invokeWithArguments(context, caller, self, arg0, arg1, block); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1, Block block) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { try { return callMethodMissing(entry, site.callType(), context, self, method, arg0, arg1, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { return retryJumpError(context); } finally { if (site.isIterator()) block.escape(); } } MethodHandle target = getTarget(site, selfClass, entry, 2); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, true, 2); return (IRubyObject) target.invokeWithArguments(context, caller, self, arg0, arg1, block); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, Block block) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { try { return callMethodMissing(entry, site.callType(), context, self, method, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { return retryJumpError(context); } finally { if (site.isIterator()) block.escape(); } } MethodHandle target = getTarget(site, selfClass, entry, 0); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, true, 0); return (IRubyObject) target.invokeWithArguments(context, caller, self, block); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, Block block) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { try { return callMethodMissing(entry, site.callType(), context, self, method, arg0, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { return retryJumpError(context); } finally { if (site.isIterator()) block.escape(); } } MethodHandle target = getTarget(site, selfClass, entry, 1); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, true, 1); return (IRubyObject) target.invokeWithArguments(context, caller, self, arg0, block); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { try { return callMethodMissing(entry, site.callType(), context, self, method, arg0, arg1, arg2, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { return retryJumpError(context); } finally { if (site.isIterator()) block.escape(); } } MethodHandle target = getTarget(site, selfClass, entry, 3); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, true, 3); return (IRubyObject) target.invokeWithArguments(context, caller, self, arg0, arg1, arg2, block); }
public static IRubyObject invocationFallback(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String method = site.name(); SwitchPoint switchPoint = (SwitchPoint)selfClass.getInvalidator().getData(); CacheEntry entry = selfClass.searchWithCache(method); if (methodMissing(entry, site.callType(), method, caller)) { try { return callMethodMissing(entry, site.callType(), context, self, method, args, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { return retryJumpError(context); } finally { if (site.isIterator()) block.escape(); } } MethodHandle target = getTarget(site, selfClass, entry, -1); target = updateInvocationTarget(target, site, self, selfClass, method, entry, switchPoint, true, 4); return (IRubyObject) target.invokeWithArguments(context, caller, self, args, block); }