public static IRubyObject floatOperatorFail(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, RubyFloat value) throws Throwable { String operator = site.name(); RubyClass selfClass = InvokeDynamicSupport.pollAndGetClass(context, self); CacheEntry entry = site.entry; if (entry.typeOk(selfClass)) { return entry.method.call(context, self, selfClass, operator, value); } else { entry = selfClass.searchWithCache(operator); if (InvokeDynamicSupport.methodMissing(entry, site.callType(), operator, caller)) { return InvokeDynamicSupport.callMethodMissing(entry, site.callType(), context, self, operator, value); } site.entry = entry; return entry.method.call(context, self, selfClass, operator, value); } }
public static IRubyObject floatOperatorFail(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, RubyFloat value) throws Throwable { String operator = site.name(); RubyClass selfClass = InvokeDynamicSupport.pollAndGetClass(context, self); CacheEntry entry = site.entry; if (entry.typeOk(selfClass)) { return entry.method.call(context, self, selfClass, operator, value); } else { entry = selfClass.searchWithCache(operator); if (InvokeDynamicSupport.methodMissing(entry, site.callType(), operator, caller)) { return InvokeDynamicSupport.callMethodMissing(entry, site.callType(), context, self, operator, value); } site.entry = entry; return entry.method.call(context, self, selfClass, operator, value); } }
public static IRubyObject fail(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String name = site.name(); CacheEntry entry = site.entry; if (entry.typeOk(selfClass)) { return entry.method.call(context, self, selfClass, name, arg0, arg1); } else { entry = selfClass.searchWithCache(name); if (methodMissing(entry, site.callType(), name, caller)) { return callMethodMissing(entry, site.callType(), context, self, name, arg0, arg1); } site.entry = entry; return entry.method.call(context, self, selfClass, name, arg0, arg1); } }
public static IRubyObject fail(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String name = site.name(); CacheEntry entry = site.entry; if (entry.typeOk(selfClass)) { return entry.method.call(context, self, selfClass, name, arg0); } else { entry = selfClass.searchWithCache(name); if (methodMissing(entry, site.callType(), name, caller)) { return callMethodMissing(entry, site.callType(), context, self, name, arg0); } site.entry = entry; return entry.method.call(context, self, selfClass, name, arg0); } }
public static IRubyObject fail(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String name = site.name(); CacheEntry entry = site.entry; if (entry.typeOk(selfClass)) { return entry.method.call(context, self, selfClass, name, args, block); } else { entry = selfClass.searchWithCache(name); if (methodMissing(entry, site.callType(), name, caller)) { return callMethodMissing(entry, site.callType(), context, self, name, args, block); } site.entry = entry; return entry.method.call(context, self, selfClass, name, args, block); } }
public static IRubyObject floatOperatorFail(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, RubyFloat value) throws Throwable { String operator = site.name(); RubyClass selfClass = InvokeDynamicSupport.pollAndGetClass(context, self); CacheEntry entry = site.entry; if (entry.typeOk(selfClass)) { return entry.method.call(context, self, selfClass, operator, value); } else { entry = selfClass.searchWithCache(operator); if (InvokeDynamicSupport.methodMissing(entry, site.callType(), operator, caller)) { return InvokeDynamicSupport.callMethodMissing(entry, site.callType(), context, self, operator, value); } site.entry = entry; return entry.method.call(context, self, selfClass, operator, value); } }
public static IRubyObject fixnumOperatorFail(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, RubyFixnum value) throws Throwable { String operator = site.name(); RubyClass selfClass = InvokeDynamicSupport.pollAndGetClass(context, self); CacheEntry entry = site.entry; if (entry.typeOk(selfClass)) { return entry.method.call(context, self, selfClass, operator, value); } else { entry = selfClass.searchWithCache(operator); if (InvokeDynamicSupport.methodMissing(entry, site.callType(), operator, caller)) { return InvokeDynamicSupport.callMethodMissing(entry, site.callType(), context, self, operator, value); } site.entry = entry; return entry.method.call(context, self, selfClass, operator, value); } }
public static IRubyObject fixnumOperatorFail(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, RubyFixnum value) throws Throwable { String operator = site.name(); RubyClass selfClass = InvokeDynamicSupport.pollAndGetClass(context, self); CacheEntry entry = site.entry; if (entry.typeOk(selfClass)) { return entry.method.call(context, self, selfClass, operator, value); } else { entry = selfClass.searchWithCache(operator); if (InvokeDynamicSupport.methodMissing(entry, site.callType(), operator, caller)) { return InvokeDynamicSupport.callMethodMissing(entry, site.callType(), context, self, operator, value); } site.entry = entry; return entry.method.call(context, self, selfClass, operator, value); } }
public static IRubyObject fail(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String name = site.name(); CacheEntry entry = site.entry; if (entry.typeOk(selfClass)) { return entry.method.call(context, self, selfClass, name, arg0, arg1); } else { entry = selfClass.searchWithCache(name); if (methodMissing(entry, site.callType(), name, caller)) { return callMethodMissing(entry, site.callType(), context, self, name, arg0, arg1); } site.entry = entry; return entry.method.call(context, self, selfClass, name, arg0, arg1); } }
public static IRubyObject fixnumOperatorFail(ThreadContext context, IRubyObject caller, IRubyObject self, JRubyCallSite site, RubyFixnum value) throws Throwable { String operator = site.name(); RubyClass selfClass = InvokeDynamicSupport.pollAndGetClass(context, self); CacheEntry entry = site.entry; if (entry.typeOk(selfClass)) { return entry.method.call(context, self, selfClass, operator, value); } else { entry = selfClass.searchWithCache(operator); if (InvokeDynamicSupport.methodMissing(entry, site.callType(), operator, caller)) { return InvokeDynamicSupport.callMethodMissing(entry, site.callType(), context, self, operator, value); } site.entry = entry; return entry.method.call(context, self, selfClass, operator, value); } }
public static IRubyObject fail(JRubyCallSite site, ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) throws Throwable { RubyClass selfClass = pollAndGetClass(context, self); String name = site.name(); CacheEntry entry = site.entry; if (entry.typeOk(selfClass)) { return entry.method.call(context, self, selfClass, name, arg0, arg1, arg2); } else { entry = selfClass.searchWithCache(name); if (methodMissing(entry, site.callType(), name, caller)) { return callMethodMissing(entry, site.callType(), context, self, name, arg0, arg1, arg2); } site.entry = entry; return entry.method.call(context, self, selfClass, name, arg0, arg1, arg2); } }
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) 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) 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); }