public final CacheEntry retrieveCache(RubyClass selfType, String methodName) { // This must be retrieved *once* to avoid racing with other threads. CacheEntry cache = this.cache; if (cache.typeOk(selfType)) { return cache; } return cacheAndGet(selfType, methodName); }
public DynamicMethod getMethod(ThreadContext context, RubyClass selfType, int index, String methodName) { CacheEntry myCache = getCacheEntry(index); if (myCache.typeOk(selfType)) { return myCache.method; } return cacheAndGet(context, selfType, index, methodName); }
@Override public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject... args) { RubyClass selfType = getMetaClass(self);; // This must be retrieved *once* to avoid racing with other threads. CacheEntry cache = this.cache; if (cache.typeOk(selfType)) { return cache.method.call(context, self, selfType, methodName, args); } return cacheAndCall(caller, selfType, args, context, self); }
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) { RubyClass selfType = getMetaClass(self); // This must be retrieved *once* to avoid racing with other threads. CacheEntry cache = this.cache; if (cache.typeOk(selfType)) { return cache.method.call(context, self, selfType, methodName, args, block); } return cacheAndCall(caller, selfType, block, args, context, self); }
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, Block block) { RubyClass selfType = getMetaClass(self); // This must be retrieved *once* to avoid racing with other threads. CacheEntry cache = this.cache; if (cache.typeOk(selfType)) { return cache.method.call(context, self, selfType, methodName, block); } return cacheAndCall(caller, selfType, block, context, self); }
@Override public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1) { RubyClass selfType = getMetaClass(self); // This must be retrieved *once* to avoid racing with other threads. CacheEntry cache = this.cache; if (cache.typeOk(selfType)) { return cache.method.call(context, self, selfType, methodName, arg1); } return cacheAndCall(caller, selfType, context, self, arg1); }
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, Block block) { RubyClass selfType = getMetaClass(self); // This must be retrieved *once* to avoid racing with other threads. CacheEntry cache = this.cache; if (cache.typeOk(selfType)) { return cache.method.call(context, self, selfType, methodName, arg1, block); } return cacheAndCall(caller, selfType, block, context, self, arg1); }
@Override public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2) { RubyClass selfType = getMetaClass(self); // This must be retrieved *once* to avoid racing with other threads. CacheEntry cache = this.cache; if (cache.typeOk(selfType)) { return cache.method.call(context, self, selfType, methodName, arg1, arg2); } return cacheAndCall(caller, selfType, context, self, arg1, arg2); }
public DynamicMethod searchWithCache(IRubyObject obj, int index, String name1, String name2) { CacheEntry myCache = getCacheEntry(index); if (myCache.typeOk(obj.getMetaClass())) { return myCache.method; } return searchWithCache(obj.getMetaClass(), index, name1, name2); }
public DynamicMethod searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3) { CacheEntry myCache = getCacheEntry(index); if (myCache.typeOk(obj.getMetaClass())) { return myCache.method; } return searchWithCache(obj.getMetaClass(), index, name1, name2, name3); }
public DynamicMethod searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4, String name5, String name6) { CacheEntry myCache = getCacheEntry(index); if (myCache.typeOk(obj.getMetaClass())) { return myCache.method; } return searchWithCache(obj.getMetaClass(), index, name1, name2, name3, name4, name5, name6); }
public DynamicMethod searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4, String name5, String name6, String name7, String name8) { CacheEntry myCache = getCacheEntry(index); if (myCache.typeOk(obj.getMetaClass())) { return myCache.method; } return searchWithCache(obj.getMetaClass(), index, name1, name2, name3, name4, name5, name6, name7, name8); }
public final DynamicMethod searchWithCacheNoMethodMissing(IRubyObject obj, int index, String name1) { CacheEntry myCache = getCacheEntry(index); if (myCache.typeOk(obj.getMetaClass())) { return myCache.method; } return searchWithCacheNoMethodMissing(obj.getMetaClass(), index, name1); }
public DynamicMethod searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4) { CacheEntry myCache = getCacheEntry(index); if (myCache.typeOk(obj.getMetaClass())) { return myCache.method; } return searchWithCache(obj.getMetaClass(), index, name1, name2, name3, name4); }
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, Block block) { RubyClass selfType = getClass(self); // This must be retrieved *once* to avoid racing with other threads. CacheEntry cache = this.cache; if (cache.typeOk(selfType)) { if ((totalMonomorphicCalls++ % IRManager.IR_INLINER_THRESHOLD) == 0) inlineCheck(context, self, cache); return cache.method.call(context, self, selfType, methodName, block); } else { totalMonomorphicCalls = 1; return cacheAndCall(caller, selfType, block, context, self); } }
public final DynamicMethod searchWithCacheNoMethodMissing(IRubyObject obj, int index, String name1, String name2) { CacheEntry myCache = getCacheEntry(index); if (myCache.typeOk(obj.getMetaClass())) { return myCache.method; } return searchWithCacheNoMethodMissing(obj.getMetaClass(), index, name1, name2); }
public DynamicMethod searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4, String name5, String name6, String name7) { CacheEntry myCache = getCacheEntry(index); if (myCache.typeOk(obj.getMetaClass())) { return myCache.method; } return searchWithCache(obj.getMetaClass(), index, name1, name2, name3, name4, name5, name6, name7); }
@Override public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject... args) { RubyClass selfType = getClass(self); CacheEntry cache = this.cache; // This must be retrieved *once* to avoid racing with other threads. if (cache.typeOk(selfType)) { if ((totalMonomorphicCalls++ % IRManager.IR_INLINER_THRESHOLD) == 0) inlineCheck(context, self, cache); return cache.method.call(context, self, selfType, methodName, args); } else { totalMonomorphicCalls = 1; return cacheAndCall(caller, selfType, args, context, self); } }
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, Block block) { RubyClass selfType = getClass(self); // This must be retrieved *once* to avoid racing with other threads. CacheEntry cache = this.cache; if (cache.typeOk(selfType)) { if ((totalMonomorphicCalls++ % IRManager.IR_INLINER_THRESHOLD) == 0) inlineCheck(context, self, cache); return cache.method.call(context, self, selfType, methodName, arg1, block); } else { totalMonomorphicCalls = 1; return cacheAndCall(caller, selfType, block, context, self, arg1); } }
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2, Block block) { RubyClass selfType = getClass(self); // This must be retrieved *once* to avoid racing with other threads. CacheEntry cache = this.cache; if (cache.typeOk(selfType)) { if ((totalMonomorphicCalls++ % IRManager.IR_INLINER_THRESHOLD) == 0) inlineCheck(context, self, cache); return cache.method.call(context, self, selfType, methodName, arg1, arg2, block); } else { totalMonomorphicCalls = 1; return cacheAndCall(caller, selfType, block, context, self, arg1, arg2); } }