summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-09-28 11:27:38 +0100
committerDavid Mitchell <davem@iabyn.com>2016-09-28 11:27:38 +0100
commit81b96c32839f3fa3ae70bddf441b4e6827eb93c8 (patch)
tree7b36da3154c18d19385c033cfdaf83ac748dc83e /op.c
parent607ee43568c28c8da9fb4b19d16807dd0214af40 (diff)
downloadperl-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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/op.c b/op.c
index c2f5406348..0fbee4834b 100644
--- a/op.c
+++ b/op.c
@@ -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 &