Skip to content

Redundant bytecodes #7

@hyperpape

Description

@hyperpape

While working on needle, I saw a number of places where the bytecode of mako is larger than it should be. This isn't likely to be an issue for correctness, but it's uglier and harder to read. In addition, creating larger methods might sometimes inhibit inlining and cause worse performance.

For once example, while compiling the regex (ab|a|bcdef|g)+ the implementation at the time was producing output like:

       280: goto          283
       283: goto          286
       286: aload_0

In general, I remember having difficulty with the handling of nested control flow, so it's likely that code could be improved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions