Skip to content

Track boa_gc to oscars API parity gaps for Boa integration #63

@Flamki

Description

@Flamki

This issue tracks parity gaps between the current Boa-facing boa_gc API surface and the active oscars mark-sweep APIs.

Context:

  • #38 documents the boa_gc surface currently used by Boa.
  • #26 tracks integration into Boa.
  • #28 tracks the staged integration path.
  • #60 drafted the parity analysis in docs form; per maintainer feedback, this issue replaces that notes-file approach so we can track concrete follow-up tasks here.

The goal here is not to restate the entire API surface. The goal is to identify the gaps that matter for staged Boa integration and split them into reviewable follow-up work.

Main parity gaps

1. Allocation / collector context model

  • Decide how staged Boa integration should handle the current mismatch between:
    • Boa-style implicit allocation (Gc::new(value))
    • Oscars-style explicit collector threading (Gc::new_in(value, collector))

2. Gc<T> API parity

  • Gc::ptr_eq parity helper (#62)
  • Gc::new_cyclic
  • Gc::into_raw
  • Gc::from_raw
  • Gc::downcast
  • Gc::cast_unchecked
  • Gc::cast_ref_unchecked

3. Weak API parity

  • WeakGc::new / constructor shape parity
  • WeakGc::upgrade parity
  • WeakMap constructor / insertion shape parity where needed for Boa-facing integration

4. Runtime utility parity

  • force_collect()
  • finalizer_safe()

5. Macro / tracing helper parity

  • unsafe_empty_trace!

Notes

  • This issue is intentionally focused on API parity and adoption shape, not allocator redesign.
  • Active allocator / layout work should continue under their existing PRs and issues.
  • Follow-up work from here should prefer small, focused PRs that close one parity gap at a time.

Candidate follow-up issues

Potential follow-up issues from this tracker include:

  • add Gc::new_cyclic parity helper
  • add raw-pointer roundtrip helpers for Gc<T>
  • add weak upgrade parity for WeakGc<T>
  • add runtime utility parity for integration/test support

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions