mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-112383: teach dis how to interpret ENTER_EXECUTOR (#117171)
This commit is contained in:
parent
6c83352bfe
commit
d610d821fd
7 changed files with 120 additions and 50 deletions
|
@ -1201,19 +1201,10 @@ class DisTests(DisTestBase):
|
|||
@cpython_only
|
||||
@requires_specialization
|
||||
def test_loop_quicken(self):
|
||||
import _testinternalcapi
|
||||
# Loop can trigger a quicken where the loop is located
|
||||
self.code_quicken(loop_test, 1)
|
||||
self.code_quicken(loop_test, 4)
|
||||
got = self.get_disassembly(loop_test, adaptive=True)
|
||||
expected = dis_loop_test_quickened_code
|
||||
if _testinternalcapi.get_optimizer():
|
||||
# We *may* see ENTER_EXECUTOR in the disassembly. This is a
|
||||
# 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)
|
||||
|
||||
@cpython_only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue