Branch: refs/heads/davem/re_debug
  Home:   https://github.com/Perl/perl5
  Commit: 407267be97c83fd72b334a0953ab6142a27de01f
      
https://github.com/Perl/perl5/commit/407267be97c83fd72b334a0953ab6142a27de01f
  Author: David Mitchell <[email protected]>
  Date:   2025-12-02 (Tue, 02 Dec 2025)

  Changed paths:
    M regcomp.sym
    M regexec.c
    M regnodes.h

  Log Message:
  -----------
  regex engine: split EVAL_postponed_AB state

(This commit makes no practical changes in behaviour except for
debugging output.)

Currently, one of the regex engine stack states is EVAL_postponed_AB.

When executing something like /(??{'A'})B/ where A and B represent
general subpatterns, the engine executes the eval code, which returns
the string 'A', which is compiled into a subpattern. Then the engine
pushes an EVAL_postponed_AB state and runs the subpattern until it
reaches an END op. Then it pushes *another* EVAL_postponed_AB state and
runs the B part of the pattern until the final END. Then before
returning success, it pops EVAL_postponed_AB off the stack (twice),
executing any cleanup required. Similarly during failure, the
EVAL_postponed_AB_fail action will be executed once or twice (depending
on whether it failed during A or B).

This commit splits that state into two,

    EVAL_postponed_A
    EVAL_postponed_B

The first is pushed before running A, the second before running B.
The actions currently remain the same and share the same code; i.e. this
commit just does the equivalent of:

-        case EVAL_postponed_AB:
+        case EVAL_postponed_A:
+        case EVAL_postponed_B:
            ... cleanup code ....

But it makes the code easier to understand, makes debugging output
clearer, and will allow in future for the cleanup behaviours to differ
between A and B.

This commit also fixes up a few debugging messages and code comments
which were still referring to 'EVAL_AB', which was renamed to
EVAL_postponed_AB some years ago.


  Commit: 5e0ff3da62d49aca7f4ad15653d602630d049c87
      
https://github.com/Perl/perl5/commit/5e0ff3da62d49aca7f4ad15653d602630d049c87
  Author: David Mitchell <[email protected]>
  Date:   2025-12-02 (Tue, 02 Dec 2025)

  Changed paths:

  Log Message:
  -----------
  Merge branch 'blead' into davem/re_debug


Compare: https://github.com/Perl/perl5/compare/6dee5e6b86cb...5e0ff3da62d4

To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to