[Patches] [ python-Patches-1013667 ] Cleanup Peepholer Output

SourceForge.net noreply at sourceforge.net
Mon Aug 23 00:18:30 CEST 2004


Patches item #1013667, was opened at 2004-08-22 00:34
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1013667&group_id=5470

Category: Parser/Compiler
Group: Python 2.4
Status: Open
Resolution: None
Priority: 6
Submitted By: Raymond Hettinger (rhettinger)
>Assigned to: Nobody/Anonymous (nobody)
Summary: Cleanup Peepholer Output

Initial Comment:
Makes the peepholer output more compact, more readable,
and a bit faster.  Also saves a bit of space in pyc files.

* Uses NOPs instead of JMP+3 or JMP+2.
* Then, makes a pass to eliminate the NOPs (which
entails re-aligning the jump targets and linenotab).
* Add a transform to get rid of the unnecessary Return
Nones followed by another Return in the same block.
* Fixed the overflow test (codelen < 65000) to coerce
codelen to unsigned before the check.

Michael, I would appreciate it if you could give this a
second look just to make sure before I check it in.  I
would like it to go in well before the next alpha.  The
patch passes the test suite, runs all my own apps, and
has run on my machine for about a week with any issues.
If you don't have time to give it a once over, please
assign to Armin.

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2004-08-22 17:18

Message:
Logged In: YES 
user_id=80475

Added a revision with better formatting and more tests.

This patch is open for whoever has time to look at it first.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1013667&group_id=5470


More information about the Patches mailing list