New submission from Antoine Pitrou <[EMAIL PROTECTED]>: This is a rewrite of the block ordering code in the compiler package (specifically, the flowgraph part). The previous code was littered with self-admitted "hacks", "fixups" and "XXX" :-) They are all removed and replaced with a clean ``order_blocks`` function which does the right thing from the start.
The patch also replaces a wrong startBlock() with a nextBlock() in compiler.pycodegen (startBlock can only be used when the previous block does an unconditional transfer to another one, otherwise the two adjacent blocks may not be emitted in order). I've run test_compiler a couple of times, and tested execution of several functions. They all run fine. Unless someone has specific reasons to reject the patch, I'd recommend applying it even if not many people use the compiler package :) I needed the fixes for my work on #2459. ---------- components: Library (Lib) files: fixcompiler.patch keywords: patch messages: 64410 nosy: pitrou severity: normal status: open title: Fixed block ordering code in compiler.pyassem type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file9838/fixcompiler.patch __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2472> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com