mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-17611. Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. (GH-5006)
Co-authored-by: Mark Shannon <mark@hotpy.org> Co-authored-by: Antoine Pitrou <antoine@python.org>
This commit is contained in:
parent
4af8fd5614
commit
520b7ae27e
19 changed files with 4506 additions and 4392 deletions
|
@ -268,7 +268,7 @@ class TestTranforms(BytecodeTestCase):
|
|||
self.assertNotInBytecode(f, 'JUMP_ABSOLUTE')
|
||||
returns = [instr for instr in dis.get_instructions(f)
|
||||
if instr.opname == 'RETURN_VALUE']
|
||||
self.assertEqual(len(returns), 6)
|
||||
self.assertLessEqual(len(returns), 6)
|
||||
|
||||
def test_elim_jump_after_return2(self):
|
||||
# Eliminate dead code: jumps immediately after returns can't be reached
|
||||
|
@ -282,7 +282,7 @@ class TestTranforms(BytecodeTestCase):
|
|||
self.assertEqual(len(returns), 1)
|
||||
returns = [instr for instr in dis.get_instructions(f)
|
||||
if instr.opname == 'RETURN_VALUE']
|
||||
self.assertEqual(len(returns), 2)
|
||||
self.assertLessEqual(len(returns), 2)
|
||||
|
||||
def test_make_function_doesnt_bail(self):
|
||||
def f():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue