In perl.git, the branch sprout/repeat has been created
<http://perl5.git.perl.org/perl.git/commitdiff/54c2338e8b1d062dbaf3cfa3a5682181e41b63af?hp=0000000000000000000000000000000000000000>
at 54c2338e8b1d062dbaf3cfa3a5682181e41b63af (commit)
- Log -----------------------------------------------------------------
commit 54c2338e8b1d062dbaf3cfa3a5682181e41b63af
Author: Father Chrysostomos <[email protected]>
Date: Mon Oct 20 23:29:01 2014 -0700
Optimise ($foo)x1 and ($foo)x0 in list cx
If the repeat count is 1, then we simply remove the repetition operator
and have the ops of the lhs evaluated, regardless of what they are.
If the repeat count is 0, then we only optimise if the lhs is a simple
scalar or constant. We optimise the whole thing down to the empty
list.
M op.c
commit af73103a8959c234faa2c3de70a5174f3f1a886b
Author: Father Chrysostomos <[email protected]>
Date: Mon Oct 20 19:32:44 2014 -0700
pp.c:pp_repeat: Remove #if 0 code
This was intended to fix 20010809.028, but treating
20010809.028 as not-a-bug is the only way to preserve
backward-compatibility. See the previous commitâs
explanation.
M pp.c
commit 3bda218d41b02ec4d46f2f731dce5743247037ef
Author: Father Chrysostomos <[email protected]>
Date: Mon Oct 20 19:29:43 2014 -0700
repeat.t: Remove to-do test for 20010809.028
Aka #7505, the bug was that list repeat didnât copy its
elements. But list repeat hasnât copied its elements for
years now, and code could be relying on the current
behaviour of foreach(($var)x2) { ... } which aliases $_
to $var twice. We also have tests for the current
behaviour.
M t/op/repeat.t
-----------------------------------------------------------------------
--
Perl5 Master Repository