diff options
author | Richard Leach <richardleach@users.noreply.github.com> | 2021-12-09 22:25:38 +0000 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-12-24 08:35:35 -0700 |
commit | 28b7611abf757b803ec5b296d60fc99763c1c8d0 (patch) | |
tree | f01a2cb947a60e447f443705a2fc9dcdaf6ba6f2 /sv.c | |
parent | b135e9358aa994456ec32ccfe7a73e685f598797 (diff) | |
download | perl-28b7611abf757b803ec5b296d60fc99763c1c8d0.tar.gz |
sv_upgrade: remove redundant AvALLOC(sv) = 0
xav_alloc is a member of the xpvav struct. The instance modified
here would have been Zero()ed several lines previously, so both
sides of this if() branch should be no-ops.
With gcc 8.3.0 the compiled function is about 6 instructions smaller.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 7 |
1 files changed, 0 insertions, 7 deletions
@@ -1371,13 +1371,6 @@ Perl_sv_upgrade(pTHX_ SV *const sv, svtype new_type) AvMAX(sv) = -1; AvFILLp(sv) = -1; AvREAL_only(sv); - if (old_type_details->body_size) { - AvALLOC(sv) = 0; - } else { - /* It will have been zeroed when the new body was allocated. - Lets not write to it, in case it confuses a write-back - cache. */ - } } else { assert(!SvOK(sv)); SvOK_off(sv); |