diff options
author | David Mitchell <davem@iabyn.com> | 2012-11-12 10:36:55 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2012-11-12 10:36:55 +0000 |
commit | 18c931a3833eccac01983e3e50239ca36de82ec4 (patch) | |
tree | 3f9c5470a898ace34dc8b4feecf9ef025c076790 /op.c | |
parent | 94691b809310834faf58c42ca79fa08825387969 (diff) | |
download | perl-18c931a3833eccac01983e3e50239ca36de82ec4.tar.gz |
PADRANGE: don't assume targs are contiguous
Normally in something like my($x,$y,$z), the 3 targs are contiguous;
however eternal modules like Function::Parameters can break that
assumption, so don't assume it.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -11020,10 +11020,11 @@ Perl_rpeep(pTHX_ register OP *o) else { if ((p->op_private & OPpLVAL_INTRO) != intro) break; - /* we expect targs to be contiguous in my($a,$b,$c) - * but not in ($a, $x, $z). In the latter case, stop - * on the first non-contiguous padop */ - if (!intro && p->op_targ != base + count) + /* Note that you'd normally expect targs to be + * contiguous in my($a,$b,$c), but that's not the case + * when external modules start doing things, e.g. + i* Function::Parameters */ + if (p->op_targ != base + count) break; assert(p->op_targ == base + count); /* all the padops should be in the same context */ |