visit-gc-root ( vreg derived-roots gc-roots -- )
Liveness analysis

Prev:lookup-base-pointer ( vreg -- vreg/f )


Vocabulary
compiler.cfg.liveness

Inputs
vregan integer
derived-rootsan assoc
gc-rootsa sequence


Outputs
None

Word description
Handles a vreg that is live at a gc point. The vreg is handled in three ways depending on its representation:
If it is tagged-rep, then the vreg contains a pointer to an object and it is added to the 'gc-roots' sequence.
If it is int-rep and the vreg has a base pointer, then it is added to the 'derived-roots' assoc along with that base pointer.
Otherwise the vreg does not contain an object reference and nothing is done with it.


See also
lookup-base-pointer

Definition