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

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 mentioned this pull request Jan 5, 2026
35 tasks done
@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
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
@reidenong
reidenong deleted the Eliminate-redunant-refcounting-from-TO_BOOL_ALWAYS_TRUE branch September 2, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants