diff options
author | David Mitchell <davem@iabyn.com> | 2016-09-28 11:27:38 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-09-28 11:27:38 +0100 |
commit | 81b96c32839f3fa3ae70bddf441b4e6827eb93c8 (patch) | |
tree | 7b36da3154c18d19385c033cfdaf83ac748dc83e /op.c | |
parent | 607ee43568c28c8da9fb4b19d16807dd0214af40 (diff) | |
download | perl-81b96c32839f3fa3ae70bddf441b4e6827eb93c8.tar.gz |
OP_MULTIDEREF: ignore customised delete/exists
We already skip optmising to a multideref if an aelem op has a customised
PL_check[] routine; extend this skip to OP_EXISTS and OP_DELETE too.
See http://nntp.perl.org/group/perl.perl5.porters/227545
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -12992,6 +12992,13 @@ S_maybe_multideref(pTHX_ OP *start, OP *orig_o, UV orig_action, U8 hints) if ( (o->op_type == OP_AELEM || o->op_type == OP_HELEM) && PL_check[o->op_type] != Perl_ck_null) return; + /* similarly for customised exists and delete */ + if ( (o->op_type == OP_EXISTS) + && PL_check[o->op_type] != Perl_ck_exists) + return; + if ( (o->op_type == OP_DELETE) + && PL_check[o->op_type] != Perl_ck_delete) + return; if ( o->op_type != OP_AELEM || (o->op_private & |