Branch: refs/heads/yves/auto_embed_fnc
  Home:   https://github.com/Perl/perl5
  Commit: df911cc369bc9fa3fba53183a324dc7e6184c67c
      
https://github.com/Perl/perl5/commit/df911cc369bc9fa3fba53183a324dc7e6184c67c
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-23 (Fri, 23 Dec 2022)

  Changed paths:
    M autodoc.pl
    M makedef.pl
    M regen/embed.pl
    M regen/embed_lib.pl
    M regen/regen_lib.pl
    M regen/tidy_embed.pl
    M t/porting/diag.t
    M t/porting/regen.t

  Log Message:
  -----------
  regen/embed.pl - switch to using HeaderParser for code generation and etc.

HeaderParser was designed to replace the old grouping code in embed.pl and
regen/embed_lib.pl, which is used to generate embed.h and proto.h and
embedvar.h

It can handle "elif" in embed.fnc, and produces more consistently structured
and formatted and readable output than the old code. It also has much better
logic to dedupe expressions. Adding or changing a constraint in embed.fnc
should no longer have any "action at a distance" effects on the output for
other functions which were not changed or obviously affected by the change.
The old code assumed that sorting the constraints applying to a given function
definition was acceptable, with the result that "elif" was impossible to
support properly, and creating the problem that adding a new constraint which
sorted into a different position could change a large amount of the
output, making it hard to verify that the change was correct.

The new logic should, once the initial normalization is applied, ensure that any
further changes are minimal.

This patch also includes a new tool regen/normalize_embed.pl which will be run
by make regen, which consistently formats embed.fnc itself, which should make
maintaining the file easier, especially during code splits and reorgs.
Function definitions can be lifted out, moved to the end, with new
constraints, and the `make regen` will put it all back into the correct place
and order.

A number of tools and tests which use embed_lib.pl to load embed.fnc data have
necessarily been changed to use the new HeaderParser based logic.


  Commit: bb20b37d7a19b0245d0a9b517943cb7d0d9c8cef
      
https://github.com/Perl/perl5/commit/bb20b37d7a19b0245d0a9b517943cb7d0d9c8cef
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-23 (Fri, 23 Dec 2022)

  Changed paths:
    M embed.fnc
    M embed.h
    M embedvar.h
    M proto.h

  Log Message:
  -----------
  embed.h - make regen after recent changes

Note this also tidies embed.fnc as well.


  Commit: ae139de0c54e6597783d9c60528711d6c426135c
      
https://github.com/Perl/perl5/commit/ae139de0c54e6597783d9c60528711d6c426135c
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-23 (Fri, 23 Dec 2022)

  Changed paths:
    M regen/feature.pl

  Log Message:
  -----------
  regen/feature.pl - use regen/HeaderParser to parse perl.h

Using HeaderParser hardens the code against possible future changes
and ensures if there are any parse bugs they get fixed for all our
regen code.


  Commit: cb3c74f9f821266810f6d89e4c2e97c973020841
      
https://github.com/Perl/perl5/commit/cb3c74f9f821266810f6d89e4c2e97c973020841
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-23 (Fri, 23 Dec 2022)

  Changed paths:
    M regen/regcomp.pl

  Log Message:
  -----------
  regen/regcomp.pl - use regen/HeaderParser to read regnodes.h and etc.

regen/regcomp.pl reads several header files, using HeaderParser will
harden against line continuations or multiline comments.  The current
code is actually somewhat fragile, and minor changes to the header files
it reads will break it. With this patch such changes would be dealt
with by HeaderParser, which should already do the right thing.


Compare: https://github.com/Perl/perl5/compare/2566a9e1c2fa...cb3c74f9f821

Reply via email to