This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
-Mre=Debug,ALL: indicate regex state stack pushes
authorDavid Mitchell <davem@iabyn.com>
Tue, 14 Feb 2017 13:32:16 +0000 (13:32 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 14 Feb 2017 17:49:58 +0000 (17:49 +0000)
commitf4197b8e1d1f984eb6635ea41ce14394432b96b1
treefc9b5afbed088ad09c65b1cf8378463eadb325e9
parent4b9c7caeaecf4e9df0be3a2e296644f763f775d6
-Mre=Debug,ALL: indicate regex state stack pushes

At this maximal level of debugging output, it displays the top 3 state
stack entries each time it pushes, but with no obvious indication that
a push is occurring. This commit changes this output:

                             |   1|  Setting an EVAL scope, savestack=9,
                             |   2|   #4   WHILEM_A_max
                             |   2|   #3   WHILEM_A_max
                             |   2|   #2   CURLYX_end yes
   0 <abcdef> <g>            |   2|   4:POSIXD[\w](5)

to be this (which includes the word "push" and extra indentation for the
stack dump):

                             |   1|  Setting an EVAL scope, savestack=9,
                             |   2|   push #4   WHILEM_A_max
                             |   2|        #3   WHILEM_A_max
                             |   2|        #2   CURLYX_end yes
   0 <abcdef> <g>            |   2|   4:POSIXD[\w](5)

Also, replace curd (current depth) var with a positive integer offset
(i) var, to avoid signed/unsigned mixing problems.
regexec.c