Branch: refs/heads/yves/regnode_typedefs
Home: https://github.com/Perl/perl5
Commit: 49905010b3bedec2750ff67eb7dbea3fefa72d7a
https://github.com/Perl/perl5/commit/49905010b3bedec2750ff67eb7dbea3fefa72d7a
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M regcomp.c
Log Message:
-----------
regcomp.c - fix comment, change 'x' to 'X'
the rest of the surrounding comments use X not x.
Commit: 65f86886b366d6e9098f6ed0f1130d374371de0d
https://github.com/Perl/perl5/commit/65f86886b366d6e9098f6ed0f1130d374371de0d
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M regcomp.c
Log Message:
-----------
regcomp.c - fixup whitespace in comment so table lines up
The table got a bit out of whack, this fixes it back to what is was
meant to be.
Commit: 44e10cd6dc7eb8bf1c0b10d7038ffff17f27b98e
https://github.com/Perl/perl5/commit/44e10cd6dc7eb8bf1c0b10d7038ffff17f27b98e
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M regen/regcomp.pl
M regnodes.h
Log Message:
-----------
regen/regcomp.pl - create typedefs for all regnode types
Currently we hard code the struct used by the different regop types.
This makes it awkward to change the structure used by a specific regop
as the struct it uses might be used in many contexts, and each cases
of a regop using that structure must be reviewed to see if it needs
to be changed.
This patch adds a typedef for each regnode. The typedefs are named
'tregnode_OP', for instance 'tregnode_TRIE' is typedefed to 'struct
charclass' (at the time of this commit). This allows the code to do
things like 'sizeof(tregnode_TRIE)' and should the exact struct used
for TRIE regops change in the future then no code need be reviewed
or changed.
Commit: 29dfc4e20c5efcc3aa31d1ff2113fcdd792bf204
https://github.com/Perl/perl5/commit/29dfc4e20c5efcc3aa31d1ff2113fcdd792bf204
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M charclass_invlists.h
M globvar.sym
M lib/unicore/uni_keywords.pl
M pod/perlreguts.pod
M regcomp.c
M regcomp.h
M regen/mk_invlists.pl
M regen/regcomp.pl
M regnodes.h
M uni_keywords.h
Log Message:
-----------
regen/regcomp.pl - rename regarglen to PL_regarglen for regexec.c
In a follow up patch we will use this data from regexec.c which
currently cannot see the variable.
This changes a comment in regen/mk_invlists.pl which necessitated
rebuilding several files related to unicode. Only the hashes associated
with mk_invlists.pl were changed.
Commit: be38a78013b6903ad7f31493125763b901b688e2
https://github.com/Perl/perl5/commit/be38a78013b6903ad7f31493125763b901b688e2
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M regcomp.c
Log Message:
-----------
regcomp.c - fixup comment, orig_emit is a node offset
This comment was a bit misleading, as orig_emit is an offset
into the program, not a pointer, it needs the REGNODE_p() macro
to convert from offset to pointer.
Commit: bf8c5b2610e00bad2ea23d8515ffcdef0a6c0509
https://github.com/Perl/perl5/commit/bf8c5b2610e00bad2ea23d8515ffcdef0a6c0509
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M embed.fnc
M embed.h
M proto.h
M regcomp.c
Log Message:
-----------
regcomp.c - add reg_nextoper and check_reg_nextoper
reg_nextoper implements dynamically finding the NEXTOPER(node)
based on the actualy regop that node points at.
check_reg_nextoper implements *checking* that what NEXTOPER(node)
would return is the same as what reg_nextoper would produce.
Commit: 97fbcfdceb58d7286fef5166bd158f536c05fac7
https://github.com/Perl/perl5/commit/97fbcfdceb58d7286fef5166bd158f536c05fac7
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M regcomp.h
Log Message:
-----------
regcomp.h - add more NEXTOPER macros and validation
Commit: ce340165e4e44926559d43df49974b8ba2595ecf
https://github.com/Perl/perl5/commit/ce340165e4e44926559d43df49974b8ba2595ecf
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M regcomp.c
Log Message:
-----------
regcomp.c - use new NEXTOPER macros
Commit: 5707f7e512b88ef1a4424f8c43feed189d9e3e02
https://github.com/Perl/perl5/commit/5707f7e512b88ef1a4424f8c43feed189d9e3e02
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M regexec.c
Log Message:
-----------
regexec.c - use new NEXTOPER macros
Commit: 70cefc9e926b1d14b73fd84a4d9f84e301da0f74
https://github.com/Perl/perl5/commit/70cefc9e926b1d14b73fd84a4d9f84e301da0f74
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M regcomp.c
Log Message:
-----------
regcomp.c - replace OP(o) with const var in Perl_regprop()
OP(o) is used all over the place in Perl_regprop(), replace it with a
const var instead.
Commit: d35af5d8802f10a2246b787b0306928610f80a88
https://github.com/Perl/perl5/commit/d35af5d8802f10a2246b787b0306928610f80a88
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M regcomp.c
Log Message:
-----------
regcomp.c - use a constant var for OP(node) in S_dumpuntil
Simplify the logic of the loop so that we do not have to deal with things like
"While that was not END last time...", use a constant var for op, and remove
unnecessary (U8) casts that just clutter up the code.
Commit: 027177c80fa8d3bdbac11ba11a497be5a883fd95
https://github.com/Perl/perl5/commit/027177c80fa8d3bdbac11ba11a497be5a883fd95
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M pod/perldebguts.pod
M regcomp.c
M regcomp.h
M regcomp.sym
M regexec.c
M regnodes.h
M t/re/pat.t
Log Message:
-----------
code for tracking parens in trie and branch nodes
Commit: 64b452ed63963392e392bbb6c847aa3db532594a
https://github.com/Perl/perl5/commit/64b452ed63963392e392bbb6c847aa3db532594a
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M regcomp.c
Log Message:
-----------
regcomp.c - in Perl_regprop show the capture buffer data we just added
BRANCH, BRANCHJ, and TRIE and TRIEC nodes now store the how many capture
buffers OPEN opcodes (and logical equivalents) were defined BEFORE them.
This adds diagnostic output to Perl_regprop() so this data can be seen
in the dump.
Current notation is "(buf: %d)", this might change in the future.
Commit: 21ff8bcc10eac545314a27766a5315e4fb459567
https://github.com/Perl/perl5/commit/21ff8bcc10eac545314a27766a5315e4fb459567
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M regcomp.c
M regexec.c
M t/re/anyof.t
M t/re/pat.t
Log Message:
-----------
regcomp.c - debug output changes to be less cluttered
The output of use 're' debug was getting very difficult to
understand. This patches declutters the output by removing
most redundant data about the next regop that would be processed
following a given regop. Only when the "next" regop data would
*differ* from the "following regnode" is it shown. When it /is/
shown it is not shown in parenthesis but with an arrow notation.
Previous to this patch we might get output like this:
Compiling REx "foo(?:[Bb]ar|fop)*baz"
Final program:
1: EXACT <foo> (3)
3: CURLYM[0]{0,INFTY} (16)
5: BRANCH (buf:0) (10)
6: ANYOFM[Bb] (8)
8: EXACT <ar> (14)
10: BRANCH (buf:0) (FAIL)
11: EXACT <fop> (14)
13: TAIL (14)
14: SUCCEED (0)
15: NOTHING (16)
16: EXACT <baz> (18)
18: END (0)
After this patch we get more readable (IMO) output like this:
Compiling REx "foo(?:[Bb]ar|fop)*baz"
Final program:
1: EXACT <foo>
3: CURLYM[0]{0,INFTY} -> 18
5: BRANCH (buf:0) -> 11
7: ANYOFM[Bb]
9: EXACT <ar> -> 16
11: BRANCH (buf:0) -> FAIL
13: EXACT <fop> -> 16
15: TAIL
16: SUCCEED.
17: NOTHING
18: EXACT <baz>
20: END.
Transitions to 0, which really mean that the regop is an "END" type
regop are indicated by a full stop. Non linear transitions or
transitions to a regop that is not the physical successor to the
"current" regnode are shown as -> %d, or -> FAIL for fail case branches.
Notice the difference between
5: BRANCH (buf:0) (10)
5: BRANCH (buf:0) -> 11
Commit: 1ff94ebf5fa316b207ae5beb31ca03446c1c3730
https://github.com/Perl/perl5/commit/1ff94ebf5fa316b207ae5beb31ca03446c1c3730
Author: Yves Orton <[email protected]>
Date: 2022-07-15 (Fri, 15 Jul 2022)
Changed paths:
M dist/Devel-PPPort/parts/base/5003007
M embed.fnc
M embed.h
M proto.h
M regcomp.c
M regcomp.h
M regexec.c
Log Message:
-----------
switch to REGNODE_AFTER
Compare: https://github.com/Perl/perl5/compare/caeb4ea392da...1ff94ebf5fa3