-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-130415: Narrowing to constants in branches involving is comparisons with a constant
#143895
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
Merged
markshannon
merged 26 commits into
python:main
from
reidenong:narrowing-to-constants-in-branches-with-is
Jan 22, 2026
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
181d096
Add failing regression tests
reidenong e30a46b
Refine failing regression tests
reidenong eba715e
Add new predicate symbol and IS_OP constant narrowing
reidenong 8834e12
Remove comment
reidenong d828f8c
Refactor predicate optimizer symbol
reidenong 24ac326
Remove unnecessary checks in sym_set_const
reidenong 8c95c5f
Merge branch 'main' into narrowing-to-constants-in-branches-with-is
reidenong d0a3ef7
Merge branch 'main' into narrowing-to-constants-in-branches-with-is
reidenong 33b8920
Add predicate symbol tests
reidenong e9548a2
Merge branch 'main' into narrowing-to-constants-in-branches-with-is
reidenong 156b0df
Add optimizer symbol unit tests
reidenong b84abc3
Add narrowing to constant unit test
reidenong 222c3a7
Merge branch 'main' into narrowing-to-constants-in-branches-with-is
reidenong ceaf091
Remove unit test
reidenong fb0f8dc
Refine narrowing checks
reidenong 4601243
Update symbol lattice diagram
reidenong 142eff4
Change to `switch` in predicate narrowing
reidenong c6f4a6a
Refactor invert in predicate symbol to kind
reidenong d0f799f
Remove whitespace
reidenong d98015f
Merge branch 'main' into narrowing-to-constants-in-branches-with-is
reidenong 21997bf
Fix typo
reidenong bfaa65b
Fix case default
reidenong b6c4019
Fix import styling
reidenong d13b9a3
Merge branch 'main' into narrowing-to-constants-in-branches-with-is
reidenong 23ae776
Regen cases post merge
reidenong 9e34678
Fix whitespace
reidenong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.