private boolean isCached(Ruby runtime, Object value) { return value != null && generation == invalidator(runtime).getData(); }
private boolean isCached(Ruby runtime, Object value) { return value != null && generation == invalidator(runtime).getData(); }
private Object cache(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Ruby runtime, Object constant) { StaticScope staticScope = (StaticScope) definingScope.retrieve(context, self, currDynScope, temp); RubyModule object = runtime.getObject(); // SSS FIXME: IRManager objects dont have a static-scope yet, so this hack of looking up the module right away // This IR needs fixing! constant = (staticScope == null) ? object.getConstant(constName) : staticScope.getConstantInner(constName); if (constant == null) { constant = UndefinedValue.UNDEFINED; } else { // recache generation = invalidator(runtime).getData(); cachedConstant = constant; } return constant; }
private Object cache(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Ruby runtime, Object constant) { StaticScope staticScope = (StaticScope) definingScope.retrieve(context, self, currDynScope, temp); RubyModule object = runtime.getObject(); // SSS FIXME: IRManager objects dont have a static-scope yet, so this hack of looking up the module right away // This IR needs fixing! constant = (staticScope == null) ? object.getConstant(constName) : staticScope.getConstantInner(constName); if (constant == null) { constant = UndefinedValue.UNDEFINED; } else { // recache generation = invalidator(runtime).getData(); cachedConstant = constant; } return constant; }