Repository navigation
refactor(compiler): remove write-only collections from template pipeline phases - #70690
Merged
pkozlowski-opensource merged 1 commit intoSep 16, 2026
Conversation
…ine phases `allocateSlots` built a `slotMap` of every declaration's slot, and its comment said the second scan would use it to propagate slot indexes into expressions. The second scan never reads it: slot indexes reach expressions through the shared `op.handle`, and the scan only copies each view's `decls` onto the op that declares it. The comment now describes what the scan does. `generateTemporaries` added each temporary to a `released` set on its final read, but nothing read the set; name reuse is driven by `count` alone.
yoominho91
force-pushed
the
refactor/compiler-drop-write-only-collections
branch
from
September 11, 2026 13:37
c11aa6e to
9a04682
Compare
JeanMeche
approved these changes
Sep 11, 2026
Member
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
PR Type
What is the current behavior?
Issue Number: N/A
Two phases in the template pipeline fill a collection that is never read:
allocateSlotsbuildsslotMap(xref → slot) for every declaration. Thecomment above the second scan says
slotMapwill be used to propagate slotindexes into expressions, but the scan never reads it. Slot indexes already
reach expressions through the shared
op.handle, and the scan only copieseach view's
declsonto the op that declares it.generateTemporariesadds each temporary toreleasedon its final read,but nothing reads the set. Name reuse is driven by
countalone.What is the new behavior?
Both collections are removed. The comment on the second scan in
allocateSlotsnow describes what it does. Emitted output is unchanged, sinceneither value was ever read.
Does this PR introduce a breaking change?
Other information
Found with a static check for collections that are only ever written, then
confirmed by reading each phase.
https://claude.ai/code/session_01ABuXgtVFhvgie5kXCPcBja