mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -360,8 +360,6 @@ dis_tryfinally = """\
|
|||
16 CALL_FUNCTION 0
|
||||
18 POP_TOP
|
||||
20 RERAISE
|
||||
22 LOAD_CONST 0 (None)
|
||||
24 RETURN_VALUE
|
||||
""" % (_tryfinally.__code__.co_firstlineno + 1,
|
||||
_tryfinally.__code__.co_firstlineno + 2,
|
||||
_tryfinally.__code__.co_firstlineno + 4,
|
||||
|
@ -385,8 +383,6 @@ dis_tryfinallyconst = """\
|
|||
16 CALL_FUNCTION 0
|
||||
18 POP_TOP
|
||||
20 RERAISE
|
||||
22 LOAD_CONST 0 (None)
|
||||
24 RETURN_VALUE
|
||||
""" % (_tryfinallyconst.__code__.co_firstlineno + 1,
|
||||
_tryfinallyconst.__code__.co_firstlineno + 2,
|
||||
_tryfinallyconst.__code__.co_firstlineno + 4,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue