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 CheckedSites(String x) { respond_to_X = new RespondToCallSite(x); site = new FunctionalCachingCallSite(x); methodName = x; } }
public IRubyObject callVarargsIter(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) { switch (args.length) { case 0: return callIter(context, caller, self, block); case 1: return callIter(context, caller, self, args[0], block); case 2: return callIter(context, caller, self, args[0], args[1], block); case 3: return callIter(context, caller, self, args[0], args[1], args[2], block); default: return callIter(context, caller, self, args, block); } }
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 IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, Block block) { try { return callBlock(context, caller, self, arg1, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { throw retryJumpError(context); } }
@Override public final IRubyObject callVarargs(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject... args) { switch (args.length) { case 0: return call(context, caller, self); case 1: return call(context, caller, self, args[0]); case 2: return call(context, caller, self, args[0], args[1]); case 3: return call(context, caller, self, args[0], args[1], args[2]); default: return call(context, caller, self, args); } }
public IRubyObject callVarargs(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) { switch (args.length) { case 0: return call(context, caller, self, block); case 1: return call(context, caller, self, args[0], block); case 2: return call(context, caller, self, args[0], args[1], block); case 3: return call(context, caller, self, args[0], args[1], args[2], block); default: return call(context, caller, self, args, block); } }
@Override public CacheEntry newCacheEntry(String id, DynamicMethod method, int token) { return new CacheEntry(method, token); } };
@Override public final IRubyObject callVarargsIter(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) { switch (args.length) { case 0: return callIter(context, caller, self, block); case 1: return callIter(context, caller, self, args[0], block); case 2: return callIter(context, caller, self, args[0], args[1], block); case 3: return callIter(context, caller, self, args[0], args[1], args[2], block); default: return callIter(context, caller, self, args, block); } }
public final CacheEntry retrieveCache(RubyClass selfType) { // 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 CheckedSites(String x) { respond_to_X = new RespondToCallSite(x); site = new FunctionalCachingCallSite(x); methodName = x; } }
@Override public final IRubyObject callVarargs(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject... args) { switch (args.length) { case 0: return call(context, caller, self); case 1: return call(context, caller, self, args[0]); case 2: return call(context, caller, self, args[0], args[1]); case 3: return call(context, caller, self, args[0], args[1], args[2]); default: return call(context, caller, self, args); } }
public IRubyObject callVarargs(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject... args) { switch (args.length) { case 0: return call(context, caller, self); case 1: return call(context, caller, self, args[0]); case 2: return call(context, caller, self, args[0], args[1]); case 3: return call(context, caller, self, args[0], args[1], args[2]); default: return call(context, caller, self, args); } }
@Override public CacheEntry newCacheEntry(DynamicMethod method, int token) { return new CacheEntry(method, token); } };
public CacheEntry retrieveCache(RubyClass selfType, String methodName) { CacheEntry myCache = cache; if (CacheEntry.typeOk(myCache, selfType)) { return myCache; } return cacheAndGet(selfType, methodName); }
@Override public final IRubyObject callVarargs(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) { switch (args.length) { case 0: return call(context, caller, self, block); case 1: return call(context, caller, self, args[0], block); case 2: return call(context, caller, self, args[0], args[1], block); case 3: return call(context, caller, self, args[0], args[1], args[2], block); default: return call(context, caller, self, args, block); } }
public IRubyObject callVarargs(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject... args) { switch (args.length) { case 0: return call(context, caller, self); case 1: return call(context, caller, self, args[0]); case 2: return call(context, caller, self, args[0], args[1]); case 3: return call(context, caller, self, args[0], args[1], args[2]); default: return call(context, caller, self, args); } }
public final CacheEntry retrieveCache(RubyClass selfType) { // 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 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 CacheEntry retrieveCache(RubyClass selfType, String methodName) { CacheEntry myCache = cache; if (CacheEntry.typeOk(myCache, selfType)) { return myCache; } return cacheAndGet(selfType, methodName); }