Skip to content

Fixed block ordering code in compiler.pyassem #46724

Closed

Description

@pitrou
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']

    Activity

    1. pitrou commented on Mar 24, 2008

      @pitrou
      MemberAuthor

      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.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Mar 24, 2008
    3. pitrou commented on Mar 24, 2008

      @pitrou
      MemberAuthor

      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 :-)

    4. pitrou commented on Mar 25, 2008

      @pitrou
      MemberAuthor

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

    5. nascheme commented on Feb 6, 2009

      @nascheme
      Member

      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.

    6. self-assigned this
      on Feb 6, 2009
    7. pitrou commented on Feb 6, 2009

      @pitrou
      MemberAuthor

      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 :)

    8. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions