Skip to content

Investigate moving StoreGcData into GcStore #13862

Description

@alexcrichton

Spawned from this comment, this is something we may want to push more on in the future. In an initial attempt to do this I was stymied pretty quickly:

  • gc_host_alloc_types would be difficult to move because this field is currently accessed before a GcStore is allocated. Callers would have to switch to ensure_gc_store and async to make this work.
  • pending_exception is difficult because right now barriers require the entire GcStore, so the preexisting barrier functions can't be used if this field is stored witin the GcStore itself.
  • gc_roots is difficult because during timming liveness flags for OwnedRooted that takes a simultaneous borrow on GcStore and the RootSet. If these lived in the same object it's more difficult to handle them in tandem.

However gc_roots_list and subtype_check_cache are likely easy to move. Given the difficulty in moving the prior ones though I didn't want to do a halfway migration so I'm going to leave this for a future refactoring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wasm-proposal:gcIssues with the implementation of the gc wasm proposal

    Type

    No type

    Fields

    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