Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Improve string interner ergonomics #18081

Closed
wants to merge 1 commit into from

Conversation

moulins
Copy link
Contributor

@moulins moulins commented Sep 26, 2024

Preparatory work for future PRs introducing the interner in more places.

This tries to make using the interner slightly less verbose, by:

  • Renaming GcContext to StringContext.
  • Renaming context.interner to context.strings.
  • Renaming borrow_gc() methods to strings_mut().
  • Adding Activation::strings() convenience method.
  • Taking a StringContext instead of a &mut StringContext in most methods.

@moulins moulins added A-core Area: Core player, where no other category fits T-refactor Type: Refactor / Cleanup labels Sep 26, 2024
@moulins moulins changed the title Imrpove string interner ergonomics core: Improve string interner ergonomics Sep 26, 2024
- Rename `borrow_gc()` methods to `strings_mut()`.
- Rename `context.interner` to `context.strings`.
- Add `Activation::strings()` convenience method.
- Take a `StringContext` instead of a `&mut StringContext`
  in most methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core player, where no other category fits T-refactor Type: Refactor / Cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant