Skip to content

One pool per compilation, step 2: a backend run holds the compilation's intern pool and tree (part of #2523) - #3606

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

ehartford merged 1 commit into
mainfrom
one-pool-2

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Part of #2523; the issue stays open.

src/compiler/Backend.with chose its pools eight times with if the Sema has symbols: sema.pool.clone() else: self.pool.clone() (five for the intern pool, three for the tree). Two helpers on Zcu replace them: backend_intern() and backend_ast(tree) return the compilation's own, and require that a Sema that has checked the program holds the same storage (a blank one, between a take and its return, holds none).

The requirement never fires in the stage chain, the behaviour tests or the battery, so the two arms of each choice were always the same pool. Fifteen .clone() spellings become two.

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

…'s intern pool and tree, and a checked Sema must hold the same ones (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