@Override public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) { ConstantCache cache = this.cache; // Store to temp so it does null out on us mid-stream if (!ConstantCache.isCached(cache)) return cache(context, currScope, currDynScope, self, temp); return cache.value; }
@Override public Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block block) { Ruby runtime = context.runtime; Object constant = cachedConstant; // Store to temp so it does null out on us mid-stream if (!isCached(runtime, constant)) constant = cache(context, currDynScope, self, temp, runtime, constant); return constant; }
@Override public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) { ConstantCache cache = this.cache; // Store to temp so it does null out on us mid-stream if (!ConstantCache.isCached(cache)) return cache(context, currScope, currDynScope, self, temp); return cache.value; }
@Override public Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block block) { Ruby runtime = context.runtime; Object constant = cachedConstant; // Store to temp so it does null out on us mid-stream if (!isCached(runtime, constant)) constant = cache(context, currDynScope, self, temp, runtime, constant); return constant; }