Branch: refs/heads/smoke-me/davem/rc_stack2
Home: https://github.com/Perl/perl5
Commit: 24b19b5ff0128e55c377933f81cbdada1ce4c4a7
https://github.com/Perl/perl5/commit/24b19b5ff0128e55c377933f81cbdada1ce4c4a7
Author: David Mitchell
Date: 2023-08-04 (Fri, 04 Aug 2023)
Changed paths:
M pp_ctl.c
M t/op/svleak.t
Log Message:
---
fix leaks in new ${^HOOK}{require__*} facility
In the initial implementation, a few temporary SVs ended up with a ref
count one too high.
Commit: af26e127b2471ce18f7cda719f4c91a10a51b3f1
https://github.com/Perl/perl5/commit/af26e127b2471ce18f7cda719f4c91a10a51b3f1
Author: David Mitchell
Date: 2023-08-04 (Fri, 04 Aug 2023)
Changed paths:
M perl.c
M perl.h
Log Message:
---
add PERL_RC_STACK define (not yet defined)
This macro turns on stack reference counting.
Add the macro, but commented out for now.
In addition, temporarily define and enable PERL_XXX_TMP_NORC.
This is a temporary transition measure: even in the presence of
PERL_RC_STACK, do not actually modify reference counts yet. So
PERL_RC_STACK will still define all the new static functions and code
behaviour, except for the bits that actually modify reference counts in
ways that assume the stack is reference counted. It allows this branch
to have many commits which incrementally deal with adding support for
PERL_RC_STACK, with each individual commit still working while half of
the core is still not yet "ref count aware".
Commit: 45c43ff3713fb60dcb508257dc402d4c0e8196e4
https://github.com/Perl/perl5/commit/45c43ff3713fb60dcb508257dc402d4c0e8196e4
Author: David Mitchell
Date: 2023-08-04 (Fri, 04 Aug 2023)
Changed paths:
M lib/Internals.pod
M universal.c
Log Message:
---
add Internals::stack_refcounted()
This indicates whether perl has been built with PERL_RC_STACK.
For now this should only be used by core; It's not yet decided whether
CPAN modules have a use case too.
Commit: 0315e7ccaf8c1d4fd605120946a774608a209ff6
https://github.com/Perl/perl5/commit/0315e7ccaf8c1d4fd605120946a774608a209ff6
Author: David Mitchell
Date: 2023-08-04 (Fri, 04 Aug 2023)
Changed paths:
M ext/Devel-Peek/t/Peek.t
Log Message:
---
ext/Devel-Peek/t/Peek.t: fixup top refcount
There are a few 'expected' Dump() output patterns which expect the
refcount of the top-most SV in the tree to be fixed number like
REFCNT = 1
Change all those occurrences to
REFCNT = \d+
or similar, since a reference-counted stack will cause higher values
Commit: eefb89f8710557e8293fe07268ac60118b4689c0
https://github.com/Perl/perl5/commit/eefb89f8710557e8293fe07268ac60118b4689c0
Author: David Mitchell
Date: 2023-08-04 (Fri, 04 Aug 2023)
Changed paths:
M pp_ctl.c
M scope.c
Log Message:
---
pp_dbstate: skip SAVESTACK_POS()
On PERL_RC_STACK builds, skip the call to SAVESTACK_POS().
I suspect that saving the stack position is no longer
required. It was added in 5.001 by:
NETaa13155: ::DB left trash on the stack.
From: Thomas Koenig
Files patched: lib/perl5db.pl pp_ctl.c
The call by pp_dbstate() to ::DB left trash on the
stack. It now calls DB in list context, and DB returns
().
but the details of what bug it fixed are long lost to history.
SAVESTACK_POS() doesn't work well with stacks which may be split into
partly reference-counted and partly not halves, so skip it and hope it
doesn't cause any problems.
Also, assert that SAVEt_STACK_POS isn't used anywhere any more.
Commit: 483d0748e726d2f2fc3ac0bf08d1c46d00e04835
https://github.com/Perl/perl5/commit/483d0748e726d2f2fc3ac0bf08d1c46d00e04835
Author: David Mitchell
Date: 2023-08-04 (Fri, 04 Aug 2023)
Changed paths:
M pp_ctl.c
Log Message:
---
pp_mapwhile(): null out holes in stack
>From time to time, pp_mapwhile() shifts up any remaining args on the
stack, in order to leave enough space to add the current results to any
accumulated results. This leaves a hole in the stack, which might not be
fully filled until the last iteration. As well as making the output of
perl -Ds confusing, any garbage left in the hole will double-count
towards the reference count of each SV once the stack becomes
reference-counted.
So fill the newly-created hole in the stack with NULL pointers.
Commit: 4450252fdf1e1cfb154100e816b3edf610af2306
https://github.com/Perl/perl5/commit/4450252fdf1e1cfb154100e816b3edf610af2306
Author: David Mitchell
Date: 2023-08-04 (Fri, 04 Aug 2023)
Changed paths:
M av.c
M embed.fnc
M embed.h
M inline.h
M proto.h
Log Message:
---
Add av_remove_offset() core-only function
This function abstracts away removing any AvARRAY(av) - AvALLOC(av)
offset from an array (previously added by av_shift()).
Also use Zero() rather than a loop to NULL out any elements in the
offset area.