mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-90997: bpo-46841: Disassembly of quickened code (GH-32099)
This commit is contained in:
parent
aa5c0a9f8d
commit
e590379197
4 changed files with 206 additions and 39 deletions
|
@ -18,7 +18,7 @@ class OpcodeTests(unittest.TestCase):
|
|||
self.assertRaises(ValueError, stack_effect, dis.opmap['BUILD_SLICE'])
|
||||
self.assertRaises(ValueError, stack_effect, dis.opmap['POP_TOP'], 0)
|
||||
# All defined opcodes
|
||||
for name, code in dis.opmap.items():
|
||||
for name, code in filter(lambda item: item[0] not in dis.deoptmap, dis.opmap.items()):
|
||||
with self.subTest(opname=name):
|
||||
if code < dis.HAVE_ARGUMENT:
|
||||
stack_effect(code)
|
||||
|
@ -47,7 +47,7 @@ class OpcodeTests(unittest.TestCase):
|
|||
self.assertEqual(stack_effect(JUMP_FORWARD, 0, jump=False), 0)
|
||||
# All defined opcodes
|
||||
has_jump = dis.hasjabs + dis.hasjrel
|
||||
for name, code in dis.opmap.items():
|
||||
for name, code in filter(lambda item: item[0] not in dis.deoptmap, dis.opmap.items()):
|
||||
with self.subTest(opname=name):
|
||||
if code < dis.HAVE_ARGUMENT:
|
||||
common = stack_effect(code)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue