This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make RC-stack-aware: map and grep
authorDavid Mitchell <davem@iabyn.com>
Sun, 4 Dec 2022 14:30:39 +0000 (14:30 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 16 Aug 2023 16:16:58 +0000 (17:16 +0100)
commit5a00f5987ca1150e26214504c6070608c85f940f
tree0df2c5edaf3fae628e6a623bac1885dddea62922
parent40a56abf75d068063b16737e9acc3cea519ba57f
make RC-stack-aware: map and grep

Update pp_grepstart(), pp_grepwhile() and pp_mapwhile() to handle a
reference-counted stack environment in the presence of PERL_RC_STACK.

But in the presence of PERL_XXX_TMP_NORC, don't actually manipulate
reference counts yet. This will be turned off in a few commits' time.

Also add some tests to op/grep.t to check for stuff being freed at an
appropriate time  (they weren't being at one iteration of this commit).
pp_ctl.c
pp_hot.c
t/op/grep.t