Skip to content

gh-134584: Eliminate redundant refcounting in TO_BOOL_INT, TO_BOOL_LIST#143759

Merged
Fidget-Spinner merged 2 commits intopython:mainfrom
reidenong:Refactor-TO_BOOL_INT-and-TO_BOOL_LIST
Jan 12, 2026
Merged

gh-134584: Eliminate redundant refcounting in TO_BOOL_INT, TO_BOOL_LIST#143759
Fidget-Spinner merged 2 commits intopython:mainfrom
reidenong:Refactor-TO_BOOL_INT-and-TO_BOOL_LIST

Conversation

@reidenong
Copy link
Contributor

@reidenong reidenong commented Jan 12, 2026

  • Refactor TO_BOOL_INT, add unit tests. A temporary fix is made to a unit test for unary_not as constant folding currently has some issues, and that will be taken care of in a new issue
  • Refactor TO_BOOL_LIST, add unit tests.

Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

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

LGTM. I ran refleak tests on my machine (Ubuntu x86-64) without JIT and it passes.

@Fidget-Spinner Fidget-Spinner merged commit c556786 into python:main Jan 12, 2026
76 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

Comments