In something like
sub f { goto &g }
normally g's pad[0] is updated to hold the passed-across @_, and the
context block's argarray field is updated to point to g's @_ too.
However in the case of
sub f { undef *_; goto &g }
cx.argarray isn't being updated. This is probably harmless (I couldn't
come up with a test case that fails), but for consistency, update it too.
This is mainly so that over the next few commits, this condition will come
to apply consistently:
cx.argarray == PL_curpad[0]
and so the argarray field can be eliminated.
ence count. */
if (arg) {
SvREFCNT_dec(PAD_SVl(0));
- PAD_SVl(0) = (SV *)(cx->blk_sub.argarray = arg);
+ PAD_SVl(0) = (SV *)arg;
}
+ cx->blk_sub.argarray = (AV*)PAD_SVl(0);
/* GvAV(PL_defgv) might have been modified on scope
exit, so restore it. */