GH-112383: Fix test_loop_quicken when an executor is installed (GH-113153)

This commit is contained in:
Brandt Bucher 2023-12-15 09:27:57 -08:00 committed by GitHub
parent 1addde0c69
commit d07483292b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -1210,8 +1210,13 @@ class DisTests(DisTestBase):
got = self.get_disassembly(loop_test, adaptive=True) got = self.get_disassembly(loop_test, adaptive=True)
expected = dis_loop_test_quickened_code expected = dis_loop_test_quickened_code
if _testinternalcapi.get_optimizer(): if _testinternalcapi.get_optimizer():
# We *may* see ENTER_EXECUTOR in the disassembly # We *may* see ENTER_EXECUTOR in the disassembly. This is a
got = got.replace("ENTER_EXECUTOR", "JUMP_BACKWARD ") # temporary hack to keep the test working until dis is able to
# handle the instruction correctly (GH-112383):
got = got.replace(
"ENTER_EXECUTOR 16",
"JUMP_BACKWARD 16 (to L1)",
)
self.do_disassembly_compare(got, expected) self.do_disassembly_compare(got, expected)
@cpython_only @cpython_only