Skip to content

One intern pool per compilation, step 1: the Zcu's dead third holder is gone and a phase must hand back the pool it was given (part of #2523) - #3605

Merged
ehartford merged 1 commit into
mainfrom
one-pool
Nov 25, 2026
Merged

ehartford merged 1 commit into
mainfrom
one-pool

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Part of #2523 (its step 3: the pool swaps in Zcu). The issue stays open.

  • Zcu.frontend_pool is removed. It was a third holder of the intern pool that nothing read: it was synced once per compile and printed in two debug lines.
  • Zcu.set_pool is removed: no callers.
  • The two places that took a pool back from a phase, self.pool = sema.pool.clone() in Zcu.sync_from_sema and self.pool = pre_sema.pool.clone() before the comptime transform, now require that it is the same pool (InternPool.require_same_storage, as AstPool already has) and store nothing.

That requirement is the measurement the issue needed: across the stage chain, the behaviour tests, the tool's internals tests and the whole battery (the language server and the other drivers included) it never fires. So in the compiler every phase already interns into the compilation's one pool, and those swaps were no-ops. Four .clone() holder counts are gone; the rest are fields that keep a handle for a phase's lifetime, which is the larger half of the issue.

Evidence at 4fa3749: both compilers check the source; release build; :unit-return-review, :ceremony-census, :self-audit, :behavior-tests, :internals-compiler-tests green; battery green. Compiler internals only: no platform leg.

…and dead setter are gone, and a phase must hand back the pool it was given (part of #2523)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant