pub fn mutated_collection_reg(op: &Op) -> Option<Reg>Expand description
Whether forward execution RECORDS a history-tape delta for op — i.e. it destroys data a
reverse pass must restore. Exactly the ops that write a global/output line or a scalar register.
The DUAL of the reverse pass’s pop condition: record_op pushes iff this is true, and
run_reverse pops iff this is true, so the tape stays aligned. A RevClass::Bijection op is
never here — it self-inverts with no tape entry (the zero-garbage core).
The single collection register an op mutates IN PLACE (push / index-set / add / remove) — for the
ops reversed by restoring the pristine pre-mutation snapshot (super::journal::JournalEntry::CollectionMutate).
None for non-mutating ops and for ListPop (which ALSO writes a dst — it carries its own
combined entry). Journaling this register’s value forces the op’s copy-on-write, so the original
stays pristine for the reverse.