diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-11-04 13:25:49 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-11-13 04:49:43 -0800 |
commit | 04472a849792297300059ba880a7ad59900aa5b8 (patch) | |
tree | b45e7fedc5d0315db8d05f3f07c88b32a6db882c /scope.c | |
parent | e4211fee6f4152b99074ac26f85747ac3fba448b (diff) | |
download | perl-04472a849792297300059ba880a7ad59900aa5b8.tar.gz |
pad.c:cv_clone_pad: Avoid copying sv
When we capture the lexical variable in order to make sub () {$x}
constant, we don’t have to copy it if it is not modified or referenced
elsewhere.
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -1079,7 +1079,6 @@ Perl_leave_scope(pTHX_ I32 base) SvPADSTALE_on(sv); /* mark as no longer live */ } else { /* Someone has a claim on this, so abandon it. */ - assert(!(SvFLAGS(sv) & SVs_PADTMP)); switch (SvTYPE(sv)) { /* Console ourselves with a new value */ case SVt_PVAV: *svp = MUTABLE_SV(newAV()); break; case SVt_PVHV: *svp = MUTABLE_SV(newHV()); break; |