develooper Front page | perl.perl5.changes | Postings from August 2022

[Perl/perl5] 9af444: regex engine - wrap PL_regnode_kind with macroREG...

From:
Yves Orton via perl5-changes
Date:
August 3, 2022 14:26
Subject:
[Perl/perl5] 9af444: regex engine - wrap PL_regnode_kind with macroREG...
Message ID:
Perl/perl5/push/refs/heads/yves/PL_regnode_info/000000-6d93de@github.com
  Branch: refs/heads/yves/PL_regnode_info
  Home:   https://github.com/Perl/perl5
  Commit: 9af444d30c30d692337a3d8142017e13bae96502
      https://github.com/Perl/perl5/commit/9af444d30c30d692337a3d8142017e13bae96502
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-08-03 (Wed, 03 Aug 2022)

  Changed paths:
    M regcomp.c
    M regcomp.h
    M regexec.c
    M regnodes.h

  Log Message:
  -----------
  regex engine - wrap PL_regnode_kind with macro REGNODE_TYPE()

The code confusing uses type and kind as synonyms. Lets end that bad habit


  Commit: 2a0b76bb2a9d6e25638bf99f5d328bee899bb524
      https://github.com/Perl/perl5/commit/2a0b76bb2a9d6e25638bf99f5d328bee899bb524
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-08-03 (Wed, 03 Aug 2022)

  Changed paths:
    M regcomp.c
    M regcomp.h
    M reginline.h

  Log Message:
  -----------
  regex engine - wrap PL_regnode_off_by_arg with macro REGNODE_OFF_BY_ARG()


  Commit: 7c0c76bf55ff6ded63600b9bf39f8f8f0788ac31
      https://github.com/Perl/perl5/commit/7c0c76bf55ff6ded63600b9bf39f8f8f0788ac31
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-08-03 (Wed, 03 Aug 2022)

  Changed paths:
    M regcomp.c
    M regcomp.h
    M reginline.h

  Log Message:
  -----------
  regex engine - wrap PL_regnode_arg_len with macro REGNODE_ARG_LEN()


  Commit: 8e93b83f0e74a49e8a3f62149e751a1d872270c5
      https://github.com/Perl/perl5/commit/8e93b83f0e74a49e8a3f62149e751a1d872270c5
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-08-03 (Wed, 03 Aug 2022)

  Changed paths:
    M regcomp.h
    M reginline.h

  Log Message:
  -----------
  regex engine - wrap PL_regnode_arg_len_varies with macro REGNODE_ARG_LEN_VARIES()


  Commit: 227b29c4ca69da4749cd5c730b13d1829f215502
      https://github.com/Perl/perl5/commit/227b29c4ca69da4749cd5c730b13d1829f215502
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-08-03 (Wed, 03 Aug 2022)

  Changed paths:
    M regcomp.c
    M regcomp.h
    M regexec.c

  Log Message:
  -----------
  regex engine - wrap PL_regnode_name with macro REGNODE_NAME()


  Commit: 6d93def0b220269921709d029e5d9682aafa9c85
      https://github.com/Perl/perl5/commit/6d93def0b220269921709d029e5d9682aafa9c85
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-08-03 (Wed, 03 Aug 2022)

  Changed paths:
    M globvar.sym
    M regcomp.h
    M regen/regcomp.pl
    M regexp.h
    M regnodes.h

  Log Message:
  -----------
  regex engine - replace many attribute arrays with one

This replaces PL_regnode_arg_len, PL_regnode_arg_len_varies,
PL_regnode_off_by_arg and PL_regnode_kind with a single PL_regnode_info
array, which is an array of struct regnode_meta, which contains the same
data but as a struct. Since PL_regnode_name is only used in debugging
builds of the regex engine we keep it separate. If we add more debug
properties it might be good to create a PL_regnode_debug_info[] to hold
that data instead.

This means when we add new properties we do not need to modify any
secondary sources to add new properites, just the struct definition
and regen/regcomp.pl


Compare: https://github.com/Perl/perl5/compare/9af444d30c30%5E...6d93def0b220



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About