Branch: refs/heads/yves/tidy_embed_fnc
  Home:   https://github.com/Perl/perl5
  Commit: fe46a8577afc4347d9f079368d86273affdc6fc5
      
https://github.com/Perl/perl5/commit/fe46a8577afc4347d9f079368d86273affdc6fc5
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-01-31 (Tue, 31 Jan 2023)

  Changed paths:
    M embed.fnc
    M embed.h
    M inline.h
    M proto.h
    M regen/embed.pl

  Log Message:
  -----------
  embed.pl - the 's', 'S', 'i' and 'I' flags are mutually exclusive

We had a bug where we processed the first one in the flags definition. Sorting
the flags or rearranging them changes the output, which shouldn't happen.

This also fixes the handling and specification of PerlEnv_putenv(), which was
marked "si" when it should have been marked "i". This required changing its
implementation from a Perl_ prefix to a S_ prefix and regenerating.

I have run embed.pl in a loop with a local patch to shuffle the flags to see
if there were any other order dependencies. No output files changed so I
assume with this patch we are free of such bugs.


  Commit: 4d23a55748e0f583705f1e518f0674fba969a572
      
https://github.com/Perl/perl5/commit/4d23a55748e0f583705f1e518f0674fba969a572
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-01-31 (Tue, 31 Jan 2023)

  Changed paths:
    M embed.fnc
    M regen/tidy_embed.pl

  Log Message:
  -----------
  embed.fnc - sort entries alphabetically by function name.

This is actually a library sort (lc with underbars removed), followed by a
lexicographical sort. Comment lines are sticky to the line that follows
them.

Somehow the original version of this patch was missed in my earlier work on
tidy_embed.pl, I think I messed up a rebase somehow. I noticed it was missing
when I realized that new entries werent being sorted into place correctly.

While this patch creates a fair bit of churn in the file right now, long
term it will make it easier to use. Also note that the *output* files
have not changed, which validates that the patch did not break anything.


  Commit: 4601075444f0cabcd9c70768b14ce1535e161c45
      
https://github.com/Perl/perl5/commit/4601075444f0cabcd9c70768b14ce1535e161c45
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-01-31 (Tue, 31 Jan 2023)

  Changed paths:
    M embed.fnc
    M regen/HeaderParser.pm

  Log Message:
  -----------
  embed.pl - sort and dedupe flags in embef.fnc as part of tidy

This ensures we use a canonical string for each possible flag variant,
which makes it easier to search for flags with a given flag signature.

It also exposed a mutex bug in flag handling which caused PerlEnv_putenv
to be improperly marked as static, when it is in fact static inline.

To validate there arent any issues like this remaining i set it up so
the flags were shuffled during processing and ran embed.pl in a loop
for a while and none of the output files changed, so I assume there
are no further such issues.


Compare: https://github.com/Perl/perl5/compare/fe46a8577afc%5E...4601075444f0

Reply via email to