mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-41323: Perform 'peephole' optimizations directly on the CFG. (GH-21517)
* Move 'peephole' optimizations into compile.c and perform them directly on the CFG.
This commit is contained in:
parent
ba18c0b13b
commit
6e8128f02e
12 changed files with 4365 additions and 4584 deletions
|
@ -948,7 +948,7 @@ class JumpTestCase(unittest.TestCase):
|
|||
output.append(11)
|
||||
output.append(12)
|
||||
|
||||
@jump_test(5, 11, [2, 4], (ValueError, 'unreachable'))
|
||||
@jump_test(5, 11, [2, 4], (ValueError, 'after'))
|
||||
def test_no_jump_over_return_try_finally_in_finally_block(output):
|
||||
try:
|
||||
output.append(2)
|
||||
|
@ -1457,7 +1457,7 @@ class JumpTestCase(unittest.TestCase):
|
|||
async with asynctracecontext(output, 4):
|
||||
output.append(5)
|
||||
|
||||
@jump_test(5, 7, [2, 4], (ValueError, "unreachable"))
|
||||
@jump_test(5, 7, [2, 4], (ValueError, "after"))
|
||||
def test_no_jump_over_return_out_of_finally_block(output):
|
||||
try:
|
||||
output.append(2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue