Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed block ordering code in compiler.pyassem #46724

Closed
pitrou opened this issue Mar 24, 2008 · 5 comments
Closed

Fixed block ordering code in compiler.pyassem #46724

pitrou opened this issue Mar 24, 2008 · 5 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@pitrou
Copy link
Member

pitrou commented Mar 24, 2008

BPO 2472
Nosy @nascheme, @pitrou
Files
  • fixcompiler.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/nascheme'
    closed_at = <Date 2009-02-06.21:11:25.677>
    created_at = <Date 2008-03-24.12:09:38.554>
    labels = ['type-bug', 'library']
    title = 'Fixed block ordering code in compiler.pyassem'
    updated_at = <Date 2009-02-06.22:26:41.855>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2009-02-06.22:26:41.855>
    actor = 'pitrou'
    assignee = 'nascheme'
    closed = True
    closed_date = <Date 2009-02-06.21:11:25.677>
    closer = 'nascheme'
    components = ['Library (Lib)']
    creation = <Date 2008-03-24.12:09:38.554>
    creator = 'pitrou'
    dependencies = []
    files = ['9839']
    hgrepos = []
    issue_num = 2472
    keywords = ['patch']
    message_count = 5.0
    messages = ['64410', '64412', '64473', '81300', '81312']
    nosy_count = 2.0
    nosy_names = ['nascheme', 'pitrou']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2472'
    versions = ['Python 2.6']

    @pitrou
    Copy link
    Member Author

    pitrou commented Mar 24, 2008

    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 bpo-2459.

    @pitrou pitrou added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Mar 24, 2008
    @pitrou
    Copy link
    Member Author

    pitrou commented Mar 24, 2008

    By enabling TEST_ALL I've just run
    test_compiler.CompilerTest.testCompileLibrary against the whole
    stdlib, and there were no errors. It's a good sign :-)

    @pitrou
    Copy link
    Member Author

    pitrou commented Mar 25, 2008

    Neal, I don't have sufficient permissions to assign bugs to anybody, but
    here you are in the nosy list. :)

    @nascheme
    Copy link
    Member

    nascheme commented Feb 6, 2009

    Thanks Antoine. For some reason I don't think I ever got an email about
    this issue. I did some further cleanups and optimizations. Committed
    as SVN rev 69373.

    Lib/compiler is still in need of some fixing since it doesn't handle
    decorators and some other new language features. I'll try to keep at it.

    @nascheme nascheme closed this as completed Feb 6, 2009
    @nascheme nascheme self-assigned this Feb 6, 2009
    @pitrou
    Copy link
    Member Author

    pitrou commented Feb 6, 2009

    Thanks Antoine. For some reason I don't think I ever got an email about
    this issue. I did some further cleanups and optimizations. Committed
    as SVN rev 69373.

    Thanks! If I knew you hadn't received any notification I would have
    tried to ping you... I'm glad this is finally accepted :)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants