private byte calculateParentRefcount() {
final ReactorStmtCtx<?, ?, ?> parent = getParentContext();
private byte calculateParentRefcount() {
final ReactorStmtCtx<?, ?, ?> parent = getParentContext();
// A slight wrinkle here is that our machinery handles only PRESENT -> ABSENT invalidation and we can reach here
// while inference is still ongoing and hence we may not have a complete picture about existing references. We
// could therefore end up caching an ABSENT result and then that information becoming stale as a new reference
// is introduced.
// A slight wrinkle here is that our machinery handles only PRESENT -> ABSENT invalidation and we can reach here
// while inference is still ongoing and hence we may not have a complete picture about existing references. We
// could therefore end up caching an ABSENT result and then that information becoming stale as a new reference
// is introduced.
// - negative (< REFCOUNT_NONE), meaning parent is in some stage of sweeping, hence it does not have
// a reference to us
// - positive (> REFCOUNT_NONE), meaning parent has an explicit refcount which is holding us down
// - negative (< REFCOUNT_NONE), meaning parent is in some stage of sweeping, hence it does not have
// a reference to us
// - positive (> REFCOUNT_NONE), meaning parent has an explicit refcount which is holding us down