Note [Origin references in the nonmoving collector]

rts/sm/NonMovingMark.h:22 rts

To implement indirection short-cutting and the selector optimisation the
collector needs to know where it found references, so it can update the
reference if it later turns out that points to an indirection. For this
reason, each mark queue entry contains two things:

- a pointer to the object to be marked (p), and

- a pointer to the field where we found the reference (origin)

Note that the origin pointer is an interior pointer: it points not to a
valid closure (with info table pointer) but rather to a field inside a closure.
Since such references can't be safely scavenged we establish the invariant
that the origin pointer may only point to a field of an object living in the
nonmoving heap, where no scavenging is needed.

References 0

This Note does not link to any other.

Referenced by 2