Skip multideref for PL_check[OP_HELEM] tinkering blead
authorFather Chrysostomos <sprout@cpan.org>
Sat, 20 Dec 2014 13:26:02 +0000 (05:26 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 20 Dec 2014 13:29:46 +0000 (05:29 -0800)
We already do it when PL_check[OP_AELEM] is modified.  Do it
also for PL_check[OP_HELEM].  This will make it easier to get
Data::Alias working.

op.c

index ec80a59..d62e2d4 100644 (file)
--- a/op.c
+++ b/op.c
@@ -12498,7 +12498,8 @@ S_maybe_multideref(pTHX_ OP *start, OP *orig_o, UV orig_action, U8 hints)
 
             /* if something like arybase (a.k.a $[ ) is in scope,
              * abandon optimisation attempt */
-            if (o->op_type == OP_AELEM && PL_check[OP_AELEM] != Perl_ck_null)
+            if (  (o->op_type == OP_AELEM || o->op_type == OP_HELEM)
+               && PL_check[o->op_type] != Perl_ck_null)
                 return;
 
             if (   o->op_type != OP_AELEM