Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: d45dc2cfe6582e88ed49844750eb3ba8b9c74523
https://github.com/Perl/perl5/commit/d45dc2cfe6582e88ed49844750eb3ba8b9c74523
Author: Karl Williamson <[email protected]>
Date: 2025-11-01 (Sat, 01 Nov 2025)
Changed paths:
M gv.c
Log Message:
-----------
gv_magicalize: Length 0 input=>Immediately return false
If you trace the execution of what happens to 0 length input, it relies
on a NUL terminator in the string, and does nothing. Simply return
false immediately instead.
Commit: 5ed61ab9d91d4e935535c97b6ac038ce9d2eac82
https://github.com/Perl/perl5/commit/5ed61ab9d91d4e935535c97b6ac038ce9d2eac82
Author: Karl Williamson <[email protected]>
Date: 2025-11-01 (Sat, 01 Nov 2025)
Changed paths:
M charclass_invlists.inc
M handy.h
M l1_char_class_tab.h
M lib/unicore/uni_keywords.pl
M regen/mk_PL_charclass.pl
M regexp_constants.h
M uni_keywords.h
Log Message:
-----------
Add "magical" chars to l1_char_class_tab.h
Some characters have special meaning to gv_magicalize(). This commit
marks those in PL_charclass. This allows the next commit to more
quickly than currently rule them out during processing.
Commit: 35a285ae4cec88aebfcd453ec570db20318cf580
https://github.com/Perl/perl5/commit/35a285ae4cec88aebfcd453ec570db20318cf580
Author: Karl Williamson <[email protected]>
Date: 2025-11-01 (Sat, 01 Nov 2025)
Changed paths:
M gv.c
Log Message:
-----------
gv_magicalize: Quickly rule non-magical input out
This uses the data structure introduced in the previous commit to
quickly test the input first character. If it isn't a potential magical
one, it could apply to CORE, so move the block that checks for that to
here, eliminating a conditional. In either case, no need to look further.
Commit: 6f79dbb4ea7bdc022815d2d923a4f530e21a5a7f
https://github.com/Perl/perl5/commit/6f79dbb4ea7bdc022815d2d923a4f530e21a5a7f
Author: Karl Williamson <[email protected]>
Date: 2025-11-01 (Sat, 01 Nov 2025)
Changed paths:
M gv.c
Log Message:
-----------
gv_magicalize: remove three goto's, and dest label
The previous commit moved a block, so two of these aren't necessary, and
the final one can be removed by adding an else
Commit: 185e5d87eb5689c95831da5319eb9e60a76bf497
https://github.com/Perl/perl5/commit/185e5d87eb5689c95831da5319eb9e60a76bf497
Author: Karl Williamson <[email protected]>
Date: 2025-11-01 (Sat, 01 Nov 2025)
Changed paths:
M gv.c
Log Message:
-----------
gv_magicalize: Replace FALLTHROUGH by what it does
This is just to make the next commit differences a bit smaller
Commit: 8b7ca19d085a0ce44518c88e09b18de1311fe893
https://github.com/Perl/perl5/commit/8b7ca19d085a0ce44518c88e09b18de1311fe893
Author: Karl Williamson <[email protected]>
Date: 2025-11-01 (Sat, 01 Nov 2025)
Changed paths:
M gv.c
Log Message:
-----------
gv_magicalize: Refactor
This refactors to eliminate redundant code. Some things are magical
only if we are using the main stash; others in any stash; one only in
PL_debstash.
Previously, the switches were structured thusly:
1) if we aren't using the main stash, handle things not requiring the
main stash
2) if we are using the main stash, handle all len > 1 things that can
be in the main stash. This duplicates much of item 1)
3) if we are using the main stash, handle all len == 1 things that can
be in the main stash. This duplicates some of item 1)
The new structure is
if (len > 1) {
1) handle len > 1 things not requiring main stash, regardless of the
stash we are in
2) handle len > 1 things requiring main stash
} else {
3) handle len == 1 things, regardless of the stash we are in.
}
This removes the duplicated code.
The case for 'a' and 'b' are special. When 'a' stands for "args" it is
len > 1 and that is handled in 1).
But 'a' can also mean a single character, as 'b' always does. These
cases are handled in 3). These are the only two len == 1 characters
that don't have to be in the main package, so there is an extra
conditional clause to allow that.
Commit: c1b70c86594ebdff7528d3dd8111699e76a32773
https://github.com/Perl/perl5/commit/c1b70c86594ebdff7528d3dd8111699e76a32773
Author: Karl Williamson <[email protected]>
Date: 2025-11-01 (Sat, 01 Nov 2025)
Changed paths:
M gv.c
Log Message:
-----------
gv_magicalize: Essentially white space
This indents things to nicely align vertically and moves some braces in
the process
Commit: 1f3c53ebd07a5ce998faea2db98dffcb4d107a29
https://github.com/Perl/perl5/commit/1f3c53ebd07a5ce998faea2db98dffcb4d107a29
Author: Karl Williamson <[email protected]>
Date: 2025-11-01 (Sat, 01 Nov 2025)
Changed paths:
M mg.c
Log Message:
-----------
mg.c: Add asserts
These two switch() statements handle magic names. We now have a quick
way to determine if the first character of a name is magic. Assert that
the cases of the switch match. This will tell us if something gets
out-of-sync.
Compare: https://github.com/Perl/perl5/compare/c1746e5a96ac...1f3c53ebd07a
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications