Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: e9261c14e9e955ce0dc558fdec6e105f8eefd5f0
      
https://github.com/Perl/perl5/commit/e9261c14e9e955ce0dc558fdec6e105f8eefd5f0
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M embed.fnc
    M proto.h

  Log Message:
  -----------
  embed.fnc: Synchronize formal parameter name with actual

A PERL_ARGS_ASSERT macro will be generated for this function in a future
commit, and compilation will fail unless the names match.


  Commit: 4e7803fff557f4967fdfbc3c79d382521faf6c6f
      
https://github.com/Perl/perl5/commit/4e7803fff557f4967fdfbc3c79d382521faf6c6f
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M embed.fnc

  Log Message:
  -----------
  embed.fnc: Add NOCHECK to three entries

This has no effect currently, but several commits hence, a bug will be
fixed that would otherwise generate a check that actually is
inappropriate for these cases.


  Commit: 801f8b89595312cb7419adc3ab302244f2100357
      
https://github.com/Perl/perl5/commit/801f8b89595312cb7419adc3ab302244f2100357
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M dump.c
    M gv.c
    M hv.c
    M op.c
    M pad.c

  Log Message:
  -----------
  Add some ARGS_ASSERT calls

An ARGS_ASSERT macro is always generated for every function listed in
embed.fnc, unless possibly suppressed with the G flag for that entry.
The generated macro is empty if there is nothing to assert.

It is mandatory (enforced through a porting test) to call that macro
when non-empty.  (Hopefully the call occurs in the function the macro is
designed for, but the porting test is currently simplistic and doesn't
check for that; often compilation would fail anyway if it did get placed
in the wrong function, as the parameter names the macro expects and the
ones in the function could easily not match).

It is optional (but a good idea) to call the macro even when empty.
That way this commit would not have been necessary.  From time to time,
an empty macro becomes non-empty as we figure out more things to check
for.  When that happens, the porting test fails for the newly-non-empty
macros that aren't called.  If the function had originally called the
empty-one, its source wouldn't have to change at all.

Several commits from now will make some ARGS_ASSERT macros non-empty;
this commit adds calls to the ones that weren't already called.


  Commit: 8e030884953df79169ecdce0aba5c37b1b144048
      
https://github.com/Perl/perl5/commit/8e030884953df79169ecdce0aba5c37b1b144048
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: Rm double negative in conditional

As suggested by Bram, this was hard to understand


  Commit: 6eafbbdd5e760c8a932a23426918b51674ac4dc8
      
https://github.com/Perl/perl5/commit/6eafbbdd5e760c8a932a23426918b51674ac4dc8
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: Add a condition to an 'if'

$argname is used inside this 'if' as part of a newly created array
element.  It needs to be defined for the code to work that later looks
at that element.

No current calls result in an undefined value for this.


  Commit: 87c753965f33630a874ce526c7cba0eaa0bda3ef
      
https://github.com/Perl/perl5/commit/87c753965f33630a874ce526c7cba0eaa0bda3ef
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: Add a condition to an 'if'

This is in preparation of combining this if clause with the one just
below to as many of the conditions in common as possible.

In this clause, it applies only to functions, as we don't create
ARGS_ASSERT macros for macros.  However when something is going into
mathoms.c (b flag), it is marked as a macro, but also has a function, so
we need to create the ASSERT in this case.


  Commit: 9b3515f3e9199918542738adce5f2d95794fa979
      
https://github.com/Perl/perl5/commit/9b3515f3e9199918542738adce5f2d95794fa979
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: Swap the order of two blocks

This makes no difference in processing now, but will minimize the 'diff'
output of a future commit.


  Commit: 0ffde36f2624617e700e8d5730f3b348ba9595ab
      
https://github.com/Perl/perl5/commit/0ffde36f2624617e700e8d5730f3b348ba9595ab
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: Combine the common parts of two 'if's

This commit combines two separate 'if' blocks into one big if block with
the conditionals in common to the two blocks, and then the two smaller
blocks, each with the conditions that apply to it individually.

And then everything is reindented to correspond


  Commit: a55c9f71f0ba4e35a06aa2db71e09420f0f557ad
      
https://github.com/Perl/perl5/commit/a55c9f71f0ba4e35a06aa2db71e09420f0f557ad
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

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

  Log Message:
  -----------
  regen/embed.pl: Generate ARGS_ASSERT in more cases

This macro is actually always generated, but is empty if there are no
assertions needed.

Before this commit the code incorrectly generated an empty macro when
there were no arguments marked NN even when types were defined that
would call for asserts to be generated.


  Commit: cf9624ca3e8738578e8868dce80deddfa7abfa8b
      
https://github.com/Perl/perl5/commit/cf9624ca3e8738578e8868dce80deddfa7abfa8b
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: Get rid of ternary

This simple change makes the code a bit easier to understand.


  Commit: c15d579f4fb0a9b2b9f72fc7862528b05ffe6d18
      
https://github.com/Perl/perl5/commit/c15d579f4fb0a9b2b9f72fc7862528b05ffe6d18
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl Move some code to earlier

Prior to this commit, the code created an array describing an input
argument, adding it to a list of all the arguments, and later went
through that list using a grep to reconstruct some information that had
been lost (because the array didn't include all the needed relevant
information), and placed the result in its final form.

This commit moves the calculation of the final form to earlier, where it
first is encountered.  This means all the information is available, and
no grep is needed.

Code review revealed a subtlety here.  The moved code has an

    if $nullok

but prior to this commit, there were two different $nullok variables,
with slightly different meanings.  Prior to this commit, the moved code
was using the second $nullok;  afterwards, the first one.  Hence, even
though the name is the same, before and after, it is a different
variable, with a (slightly) different meaning.

The second $nullok was populated by the grep, and meant that the
argument did not have either a NN nor a NZ modifier.

The first $nullok meant simply that the arg had a NULLOK modifier.

After the commit the single $nullok means that the arg had a NULLOK
modifier.

This change actually has no effect (as demonstrated by the fact that
this commit doesn't change the generated proto.h).  The moved code is
executed only for an argument where $type_asserts{$argtype} exists.
This hash is constant, and has been populated so that only pointer
arguments have entries.  NZ is not valid for pointer arguments, so we
know that both before and after this commit, the arg did not have an NZ
modifier.  Also it is illegal to specify both NN and NULLOK, so both
before and after this commit, the arg did not have a NN modifier.  And
both before and after this commit the arg does have a NULLOK modifier.


  Commit: 5395b0a94fc47691cd7d0566dedd1251fb315053
      
https://github.com/Perl/perl5/commit/5395b0a94fc47691cd7d0566dedd1251fb315053
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

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

  Log Message:
  -----------
  regen/embed.pl: Combine two arrays

These two arrays are combined anyway into a third array later in the
code; this just goes with the third array from the start.

The order of some assertions in the generated proto.h are changed.  But
this makes sure that we continue to assert that an argument is present
before dereferencing it.


  Commit: bcfaa3e15050b3ebe5741a7e6d0ed67b00d9e044
      
https://github.com/Perl/perl5/commit/bcfaa3e15050b3ebe5741a7e6d0ed67b00d9e044
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: Remove a loop

By creating the @asserts array with each element in its final form, the
loop that later did this can be eliminated.


  Commit: 731f586c88f1c131355c6152c13c7593c5f8c93d
      
https://github.com/Perl/perl5/commit/731f586c88f1c131355c6152c13c7593c5f8c93d
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-08-02 (Sat, 02 Aug 2025)

  Changed paths:
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: White-space/comment changes

This removes a misleading comment.  NULLOK now does have some effect.
It changes the actual generated assertion for arguments where a type
assertion is generated.  (This has actually been true since
2463f19365f941f68e9d5eed2f787341df8ccdef)

This also vertically aligns some statements for ease of reading, and
reorders things to group them together in a block.


Compare: https://github.com/Perl/perl5/compare/4b0907939ca8...731f586c88f1

To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to