FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-130415: Narrow types to constants in branches involving specialized comparisons with a constant by reidenong · Pull Request #144150 · python/cpython · GitHub

Repository navigation

gh-130415: Narrow types to constants in branches involving specialized comparisons with a constant - #144150

Merged
Fidget-Spinner merged 9 commits into
python:mainfrom
reidenong:narrow-types-to-constants-for-int-comparisons
Jan 24, 2026
Merged

Fidget-Spinner merged 9 commits into
python:mainfrom
reidenong:narrow-types-to-constants-for-int-comparisons

Conversation

reidenong commented Jan 22, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

This uses the new predicate optimizer symbol to narrow types to constants in branches involving comparisons with a constant.

This PR provides the implementation for _COMPARE_OP_INT , _COMPARE_OP_STR, _COMPARE_OP_FLOAT.

Copy link
Copy Markdown
Contributor Author

After discussion with Ken Jin I will be adding implementations for all _COMPARE_OP_* in this PR

reidenong changed the title gh-130415: Narrow types to constants in branches involving comparisons with a constant gh-130415: Narrow types to constants in branches involving specialized comparisons with a constant Jan 22, 2026

Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks

Fidget-Spinner merged commit 6d972e0 into python:main Jan 24, 2026
68 of 69 checks passed
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
reidenong deleted the narrow-types-to-constants-for-int-comparisons branch September 2, 2026 04:20
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 join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL