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

op_scope/newCONDOP: Optimise away empty else blocks in OP_COND_EXPR #22745

Open
wants to merge 1 commit into
base: blead
Choose a base branch
from

Commits on Nov 13, 2024

  1. op_scope/newCONDOP: Optimise away empty else blocks in OP_COND_EXPR

    This commit comprises two main changes:
    * Not wrapping a bare OP_STUB in an enter/leave pair (Perl_op_scope)
    * Checking for a bare OP_STUB in the `falseop` argument when building
      an OP_COND_EXPR and then freeing it, rather than adding it as a
      sibling to the `first` and `trueop` branches.
    
    The main benefits of this are:
    * lower memory usage due to unnecessary OP removal
    * faster execution due to unnecessary OPs not being executed
    
    There are also some small changes to Deparse.pm and an additional
    Deparse.t test.
    richardleach committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    d7ebbfb View commit details
    Browse the repository at this point in the history