Skip to content

gh-149238: avoid bool objects when branching on int/str in JIT#149418

Open
NekoAsakura wants to merge 2 commits intopython:mainfrom
NekoAsakura:gh-149238/bit-to-bool
Open

gh-149238: avoid bool objects when branching on int/str in JIT#149418
NekoAsakura wants to merge 2 commits intopython:mainfrom
NekoAsakura:gh-149238/bit-to-bool

Conversation

@NekoAsakura
Copy link
Copy Markdown
Contributor

@NekoAsakura NekoAsakura commented May 5, 2026

In Py_STACKREF_DEBUG builds the stack slot holds index, so I've added _Py_STACKREF_BIT_{0,1}_INDEX.
I tried LIST as well, but it doesn't work. In order for deopt to work properly, we can't leave a bare 0 or 1 on the stack, or the interpreter would read it as a wild pointer.

@read-the-docs-community
Copy link
Copy Markdown

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.

1 participant