mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-111848: Tidy up tier 2 handling of FOR_ITER specialization by using DEOPT_IF instead of jumps. (GH-111849)
This commit is contained in:
parent
11e83488c5
commit
06efb60264
8 changed files with 59 additions and 136 deletions
|
@ -2712,7 +2712,7 @@ class TestUops(unittest.TestCase):
|
|||
# for i, (opname, oparg) in enumerate(ex):
|
||||
# print(f"{i:4d}: {opname:<20s} {oparg:3d}")
|
||||
uops = {opname for opname, _, _ in ex}
|
||||
self.assertIn("_IS_ITER_EXHAUSTED_RANGE", uops)
|
||||
self.assertIn("_GUARD_NOT_EXHAUSTED_RANGE", uops)
|
||||
# Verification that the jump goes past END_FOR
|
||||
# is done by manual inspection of the output
|
||||
|
||||
|
@ -2734,7 +2734,7 @@ class TestUops(unittest.TestCase):
|
|||
# for i, (opname, oparg) in enumerate(ex):
|
||||
# print(f"{i:4d}: {opname:<20s} {oparg:3d}")
|
||||
uops = {opname for opname, _, _ in ex}
|
||||
self.assertIn("_IS_ITER_EXHAUSTED_LIST", uops)
|
||||
self.assertIn("_GUARD_NOT_EXHAUSTED_LIST", uops)
|
||||
# Verification that the jump goes past END_FOR
|
||||
# is done by manual inspection of the output
|
||||
|
||||
|
@ -2756,7 +2756,7 @@ class TestUops(unittest.TestCase):
|
|||
# for i, (opname, oparg) in enumerate(ex):
|
||||
# print(f"{i:4d}: {opname:<20s} {oparg:3d}")
|
||||
uops = {opname for opname, _, _ in ex}
|
||||
self.assertIn("_IS_ITER_EXHAUSTED_TUPLE", uops)
|
||||
self.assertIn("_GUARD_NOT_EXHAUSTED_TUPLE", uops)
|
||||
# Verification that the jump goes past END_FOR
|
||||
# is done by manual inspection of the output
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue