diff options
author | Hugo van der Sanden <hv@crypt.org> | 2012-12-11 06:17:26 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-12-11 08:59:43 -0800 |
commit | 1d2b3927543a3fa4089c1cee10f3a1a546a02cfe (patch) | |
tree | 8cf9d4ac879d0f2a02f77a76b2abd24003b4f5e0 /pp_hot.c | |
parent | 3d2de69e2d8b4ab2d3b4e978957fce16e6597548 (diff) | |
download | perl-1d2b3927543a3fa4089c1cee10f3a1a546a02cfe.tar.gz |
pp_hot.c: Comments to clarify pp_aassign
[The committer took these from <201210240658.q9O6w1u25266@crypt.org>
and turned them into a patch.]
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1086,7 +1086,8 @@ PP(pp_aassign) odd = ((lastrelem - firsthashrelem)&1)? 0 : 1; if ( odd ) { do_oddball(lastrelem, firsthashrelem); - /* we have lelem to reuse, it's not needed anymore */ + /* we have firstlelem to reuse, it's not needed anymore + */ *(lastrelem+1) = &PL_sv_undef; } @@ -1114,7 +1115,8 @@ PP(pp_aassign) duplicates += 2; else { /* copy element back: possibly to an earlier - * stack location if we encountered dups earlier */ + * stack location if we encountered dups earlier, + * possibly to a later stack location if odd */ *topelem++ = sv; *topelem++ = tmpstr; } @@ -1253,6 +1255,8 @@ PP(pp_aassign) } else { if (ary || hash) + /* note that in this case *firstlelem may have been overwritten + by sv_undef in the odd hash case */ SP = lastrelem; else { SP = firstrelem + (lastlelem - firstlelem); |