Skip to content

gc: add unsafe_empty_trace! parity and make trace helper macros collector-agnostic #76

Description

@Flamki

Context

  • #63 still lists unsafe_empty_trace! as an open parity item.
  • mark_sweep_arena2/trace.rs currently notes helper macro path coupling to mark_sweep internals.

Problem

  • unsafe_empty_trace! parity is still missing against the Boa-facing boa_gc contract.
  • Trace helper macros are collector-coupled, which is brittle for multi-collector work and staged Boa integration.

Proposed scope

  1. Add unsafe_empty_trace! helper macro parity in Oscars trace helpers.
  2. Refactor helper macro paths so they are collector-agnostic (not hardcoded to mark_sweep).
  3. Keep behavior unchanged for existing empty_trace! / custom_trace! users.
  4. Add focused tests/compile checks that validate helper usage from both mark_sweep and mark_sweep_arena2 contexts.

Non-goals

  • No collector algorithm changes.
  • No allocator/layout changes.
  • No Boa integration wiring in this issue.

Acceptance criteria

  • unsafe_empty_trace! exists and is usable where expected.
  • Trace helper macros no longer rely on mark_sweep-only paths.
  • Workspace checks pass (fmt, test, clippy; miri where applicable).
  • #63 macro parity gap can be marked addressed by follow-up PR(s).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions