Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: 876fe29b1de46f7d14c7a0a360ff1079060e3e39 https://github.com/Perl/perl5/commit/876fe29b1de46f7d14c7a0a360ff1079060e3e39 Author: Karl Williamson <k...@cpan.org> Date: 2025-07-28 (Mon, 28 Jul 2025)
Changed paths: M regen/embed.pl Log Message: ----------- regen/embed.pl: Fix auto longname gen when no arglist 93f23f07eb96405fee8dab2028e2f7b0cc8b88e8 failed to account for the case where the macro has an empty arglist. Future commits will apply to such macros, so fix now. Commit: a3bd1cdbc1851618a9b3062cd901276f7d3a83d3 https://github.com/Perl/perl5/commit/a3bd1cdbc1851618a9b3062cd901276f7d3a83d3 Author: Karl Williamson <k...@cpan.org> Date: 2025-07-28 (Mon, 28 Jul 2025) Changed paths: M mathoms.c M sv.h Log Message: ----------- Move pod from mathoms.c to respective files The documentation belongs where the implementing macro is #defined Commit: b7a7434345a06e5d95cb747b545da0c987aa5fc6 https://github.com/Perl/perl5/commit/b7a7434345a06e5d95cb747b545da0c987aa5fc6 Author: Karl Williamson <k...@cpan.org> Date: 2025-07-28 (Mon, 28 Jul 2025) Changed paths: M embed.fnc M embed.h M mathoms.c M proto.h Log Message: ----------- mathoms.c Remove functions that just call their macro The long name Perl_foo functions that merely call their implementing macro 'foo', can themselves just be #defined as that macro instead of being functions. Since 93f23f07eb96405fee8dab2028e2f7b0cc8b88e8, it is now easy to make them into macros by specifying the appropriate flags in embed.fnc. So the mathoms.c function implementations can be removed, and regen/embed.pl will generate the equivalent macro definitions. Commit: 5b36fc695957614ac37d49575b9105af1eedc05a https://github.com/Perl/perl5/commit/5b36fc695957614ac37d49575b9105af1eedc05a Author: Karl Williamson <k...@cpan.org> Date: 2025-07-28 (Mon, 28 Jul 2025) Changed paths: M mathoms.c Log Message: ----------- mathoms.c: Convert Perl_foo definitions to call foo Unless there is some reason not to, a mathoms Perl_ function should just call the macro it is the long name for. That way, when the macro changes, the function automatically correspondingly does too. I discovered the hard way that one reason not to change is if the macro expands differently depending on where in the code it is called from. sv_setsv() always calls sv_setsv_flags(), but one of the flags it passes is 0 when not called from the perl core. When mathoms is compiled, we don't know the caller, so the code assumes it isn't called from core (which it isn't). This commit changes all the functions in mathoms whose definitions expand exactly to the macro they are supposed to wrap, into calling that macro instead of duplicating the expansion in their mathoms.c bodies. I checked this by having cpp create mathoms.i and then I saved it under a different name. Then I changed all the functions to call their implementing macro. Then I ran cpp again to create a revised mathoms.i. Then I compared the two .i files. I backed out the changes to those functions whose expansions differed between the two files. The result is this commit Commit: a5fc9ab124f4f767af9a70b894029765eaa65ce2 https://github.com/Perl/perl5/commit/a5fc9ab124f4f767af9a70b894029765eaa65ce2 Author: Karl Williamson <k...@cpan.org> Date: 2025-07-28 (Mon, 28 Jul 2025) Changed paths: M embed.fnc M embed.h M mathoms.c M proto.h Log Message: ----------- mathoms.c Remove functions that just call their macro The functions that merely call their implementing macro can themselves just be #defined as that macro. Two commits ago, this was done on the functions in mathoms.c that have this form. Then one commit ago, a bunch of functions in mathoms were converted to have this form. This commit just removes these newly converted functions. There could have been fewer commits if I had reversed the order of the previous two, but doing it this way may help in bisecting, should problems arise. After this commit mathoms.c has been reduced to fewer than 20 functions. Commit: ca4ce29c796a67528d7f926d20f8e47d2d8cff1f https://github.com/Perl/perl5/commit/ca4ce29c796a67528d7f926d20f8e47d2d8cff1f Author: Karl Williamson <k...@cpan.org> Date: 2025-07-28 (Mon, 28 Jul 2025) Changed paths: M embed.fnc M embed.h M mathoms.c M proto.h Log Message: ----------- Make Perl_sv_mortalcopy a macro and rm from mathoms 93f23f07eb96405fee8dab2028e2f7b0cc8b88e8 made the Perl_ name generation automatic given the flags in embed.fnc. This function behaves differently when called from core than not, but making it into a macro that gets expanded as needed means it automatically gets expanded correctly. Commit: c1ae415246f1e0bd2f6317a31be484b14037e29f https://github.com/Perl/perl5/commit/c1ae415246f1e0bd2f6317a31be484b14037e29f Author: Karl Williamson <k...@cpan.org> Date: 2025-07-28 (Mon, 28 Jul 2025) Changed paths: M embed.fnc M embed.h M mathoms.c M proto.h Log Message: ----------- Make Perl_sv_setsv a macro and rm from mathoms 93f23f07eb96405fee8dab2028e2f7b0cc8b88e8 made the Perl_ name generation automatic given the flags in embed.fnc. This function behaves differently when called from core than not, but making it into a macro that gets expanded as needed means it automatically gets expanded correctly. Commit: 5144e0d9e6751711e79419c7cac5729f043b2cc8 https://github.com/Perl/perl5/commit/5144e0d9e6751711e79419c7cac5729f043b2cc8 Author: Karl Williamson <k...@cpan.org> Date: 2025-07-28 (Mon, 28 Jul 2025) Changed paths: M embed.fnc M embed.h M mathoms.c M proto.h Log Message: ----------- Convert Perl_hv_foo to hv_foo and rm from mathoms These four functions (example Perl_hv_delete), can be converted to call their plain macro (e.g. hv_delete) without changing their behavior. I verified this by eyeballing their implementations in mathoms.c and comparing that with what happens with just the plain macro. That means embed.fnc can be changed to generate the Perl_ forms automatically, and the mathoms functions can be removed. Commit: a810de6508814172a0c91495bd12bb79b6b4151d https://github.com/Perl/perl5/commit/a810de6508814172a0c91495bd12bb79b6b4151d Author: Karl Williamson <k...@cpan.org> Date: 2025-07-28 (Mon, 28 Jul 2025) Changed paths: M embed.fnc M embed.h M mathoms.c M proto.h Log Message: ----------- Rm Perl_sv_utf8_upgrade() from mathoms This function can be converted to call plain sv_utf8_upgrade without changing its behavior. I verified this by eyeballing its implementation in mathoms.c and comparing that with what happens with just the plain macro. That means embed.fnc can be changed to generate the Perl_ form automatically, and the mathoms function can be removed. Commit: 10e38d94b58fffcba9d6246b9b70c5e021814b0f https://github.com/Perl/perl5/commit/10e38d94b58fffcba9d6246b9b70c5e021814b0f Author: Karl Williamson <k...@cpan.org> Date: 2025-07-28 (Mon, 28 Jul 2025) Changed paths: M embed.fnc M embed.h M mathoms.c M proto.h Log Message: ----------- Rm Perl_sv_pvutf8() from mathoms This function can be converted to call plain sv_pvutf8 without changing its behavior. I verified this by eyeballing its implementation in mathoms.c and comparing that with what happens with just the plain macro. That means embed.fnc can be changed to generate the Perl_ form automatically, and the mathoms function can be removed. Commit: c13b3b863b3836be10953f4acbb6be115f5494c1 https://github.com/Perl/perl5/commit/c13b3b863b3836be10953f4acbb6be115f5494c1 Author: Karl Williamson <k...@cpan.org> Date: 2025-07-28 (Mon, 28 Jul 2025) Changed paths: M embed.fnc M embed.h M mathoms.c M proto.h Log Message: ----------- Rm Perl_newHV() from mathoms This function can be converted to call plain newHV without changing its behavior. I verified this by eyeballing its implementation in mathoms.c and comparing that with what happens with just the plain macro. That means embed.fnc can be changed to generate the Perl_ form automatically, and the mathoms function can be removed. Commit: 5df7a2e2277b18032ce45c73ac07c2b42393251b https://github.com/Perl/perl5/commit/5df7a2e2277b18032ce45c73ac07c2b42393251b Author: Karl Williamson <k...@cpan.org> Date: 2025-07-28 (Mon, 28 Jul 2025) Changed paths: M embed.fnc M embed.h M mathoms.c M proto.h Log Message: ----------- Rm Perl_sv_pv(byte)? from mathoms These functions can be converted to call their plain macro equivalents without changing their behavior. I verified this by eyeballing their implementations in mathoms.c and comparing that with what happens with just the plain macros. That means embed.fnc can be changed to generate the Perl_ forms automatically, and the mathoms functions can be removed. Compare: https://github.com/Perl/perl5/compare/96a7727df081...5df7a2e2277b To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications