Expand description
Phase-D Trace implementations for GC-rooted types defined in this
crate. Types in lua-types (LuaValue, LuaString, UpVal) have their
Trace impls in lua-types/src/trace_impls.rs because of Rust’s orphan
rule.
Each impl below is a todo!("phase-d: trace X") stub. The
panic-driven mega-loop surfaces each one when a runtime path triggers
Heap::full_collect. Each agent works on ONE type — no family
expansion (Trace impls have subtle invariants).
Implementation guidance for agents:
- Read the type definition; enumerate every field
- For every
Gc<T>,GcRef<T>, or container (Vec/Option/HashMap) thereof, callm.mark(field)orfield.trace(m)appropriately - Skip non-GC fields (primitives,
String,Vec<u8>) - Skip “intentionally not traced” fields (weak refs)
- Reference
reference/lua-5.4.7/src/lgc.c’sreallymarkobject