This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make OP_AELEMFAST work with negative indices
authorDavid Mitchell <davem@iabyn.com>
Sun, 23 Feb 2014 00:53:17 +0000 (00:53 +0000)
committerDavid Mitchell <davem@iabyn.com>
Fri, 28 Feb 2014 13:35:12 +0000 (13:35 +0000)
commitb024352e692dd231fd32548e325d75b667bff29f
tree73006fac333d4519790bfac2e8434f555ecc0c9b
parente958ef3d8fccb2d78757ebb06ce8b1030ef4f1d0
make OP_AELEMFAST work with negative indices

Use aelemfast for literal index array access where the index is in the
range -128..127, rather than 0..255.

You'd expect something like $a[-1] or $a[-2] to be a lot more common than
$a[100] say. In fact a quick CPAN grep shows 66 distributions
matching /\$\w+\[\d{3,}\]/, but "at least" 1000 matching /\$\w+\[\-\d\]/.
And most of the former appear to be table initialisations.
ext/B/t/optree_misc.t
lib/B/Deparse.pm
lib/B/Deparse.t
op.c
pp_hot.c
sv.c
t/op/array.t