Expand description
GcRef<T> — the GC-managed reference handle.
Phase A/B/C: thin newtype around Rc<T>.
Phase D-1e (current): newtype around lua_gc::Gc<T> — Copy under the hood,
tracks allocation in the active Heap (via lua_gc::with_current_heap(...)).
Surface kept stable across the swap: new, ptr_eq, identity,
strong_count, weak_count, downgrade. Existing code touching
gc.0 continues to work — .0 is now Gc<T> instead of Rc<T>.
§Weak refs (D-1)
GcWeak<T> is currently a no-op wrapper: upgrade always returns
Some, strong_count always returns 1. Real weak semantics arrive
in D-2 when the heap learns to mark weak refs separately. For D-1, weak
tables ARE a known semantic gap (see PHASE_D_PLAN.md “Locked Decisions”).