mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
gh-108488: Initialize JUMP_BACKWARD cache to 0, not 17 (#108591)
This mis-initialization caused the executor optimization to kick in sooner than intended. It also set the lower 4 bits of the counter to `1` -- those bits are supposed to be reserved (the actual counter is in the upper 12 bits).
This commit is contained in:
parent
4f22152713
commit
59e46932c8
3 changed files with 6 additions and 3 deletions
|
|
@ -2478,7 +2478,7 @@ class TestUops(unittest.TestCase):
|
|||
|
||||
opt = _testinternalcapi.get_uop_optimizer()
|
||||
with temporary_optimizer(opt):
|
||||
testfunc([1, 2, 3])
|
||||
testfunc(range(10))
|
||||
|
||||
ex = get_first_executor(testfunc)
|
||||
self.assertIsNotNone(ex)
|
||||
|
|
@ -2493,7 +2493,7 @@ class TestUops(unittest.TestCase):
|
|||
|
||||
opt = _testinternalcapi.get_uop_optimizer()
|
||||
with temporary_optimizer(opt):
|
||||
testfunc([1, 2, 3])
|
||||
testfunc(range(10))
|
||||
|
||||
ex = get_first_executor(testfunc)
|
||||
self.assertIsNotNone(ex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue