-
Notifications
You must be signed in to change notification settings - Fork 585
pp_split: reify using NULL rather than PL_sv_undef (gh#18077) #18158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, but I'm not an expert here.
Any reason not to apply this patch?
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a protection for AvFILLp(ary) >= 0
@atoomic -
As per review comment above, I'm now wondering if the existing loop is redundant and should be removed.
I've used Zero() in #18072, which hasn't received any review comments to date. |
f9131a6
to
a884502
Compare
D'oh, I added the originally-requested protection for |
a884502
to
9607d52
Compare
Additional push done. Functionally that takes this PR back to its original form, but there is now the additional comment about potentially redundant code. (I may well submit a follow-up PR to remove it.) |
Non-existent array elements have been represented by
NULL
rather than&PL_sv_undef
since ce0d59f. As discussed in #18077, an instance of reification in pp_split seems to have not been updated to match.I'm not sure what ideal Perl code for performance testing is, but trying with @_ suggested that there's little difference between:
and
I just went with the latter because it results in a very slightly (16 bytes) smaller pp.o.
make test succeeds locally (64 bit Linux).