8000 GH-130415: Use boolean guards to narrow types to values in the JIT by brandtbucher · Pull Request #130659 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-130415: Use boolean guards to narrow types to values in the JIT #130659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 2, 2025
Prev Previous commit
Next Next commit
is
  • Loading branch information
brandtbucher committed Feb 28, 2025
commit 1d17afe577b2ba8edde2fa8a8d1e8eb226ef803f
4 changes: 2 additions & 2 deletions Lib/test/test_capi/test_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ def test_narrow_type_to_constant_bool_false(self):
def f(n):
trace = []
for i in range(n):
# false *usually* False, but we can only prove that it's a bool:
# false is *usually* False, but we can only prove that it's a bool:
false = i % 100 == 0
trace.append("A")
if not false: # Kept.
Expand Down Expand Up @@ -1472,7 +1472,7 @@ def test_narrow_type_to_constant_bool_true(self):
def f(n):
trace = []
for i in range(n):
# true *usually* True, but we can only prove that it's a bool:
# true is *usually* True, but we can only prove that it's a bool:
true = i % 100 != 0
trace.append("A")
if true: # Kept.
Expand Down
0