Skip to content

gh-134584: Eliminate redundant refcounting in TO_BOOL_ALWAYS_TRUE#143427

Merged
Fidget-Spinner merged 5 commits into
python:mainfrom
reidenong:Eliminate-redunant-refcounting-from-TO_BOOL_ALWAYS_TRUE
Jan 6, 2026
Merged

gh-134584: Eliminate redundant refcounting in TO_BOOL_ALWAYS_TRUE#143427
Fidget-Spinner merged 5 commits into
python:mainfrom
reidenong:Eliminate-redunant-refcounting-from-TO_BOOL_ALWAYS_TRUE

Conversation

@reidenong

@reidenong reidenong commented Jan 5, 2026

Copy link
Copy Markdown
Contributor
  • Refactor _REPLACE_WITH_TRUE to leave input on TOS, TO_BOOL_ALWAYS_TRUE to use explicit POP_TOP
  • Refactor optimized _REPLACE_WITH_TRUE op to ensure correct stack effects
  • Add unit tests

@python-cla-bot

python-cla-bot Bot commented Jan 5, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented Jan 5, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app

bedevere-app Bot commented Jan 5, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@Fidget-Spinner 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.

Nice, thanks!

@Fidget-Spinner Fidget-Spinner merged commit 54f1ed0 into python:main Jan 6, 2026
68 checks passed
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
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