This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
extend index(...) == -1 optimisation
authorDavid Mitchell <davem@iabyn.com>
Sat, 5 Aug 2017 11:12:42 +0000 (12:12 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sat, 5 Aug 2017 11:12:42 +0000 (12:12 +0100)
commit400ffcff649c80c7986e4790a425796a250f2d97
treeb5c90764dab7a9885be277f50d6321a76e504016
parentc87834ab4b25b86c759f200680f2de176c7c217c
extend index(...) == -1 optimisation

Recently I made it so that in expression like index(...) == -1, the
const and eq ops are optimised away and a BOOL flag is set on the index
op.

This commit expands this to various permutations of relational ops too,
such as

    index(...) >=  0
    index(...) <   0
    index(...) <= -1
op.c
t/op/index.t
t/perf/opcount.t