This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
undef *_; goto &f: update cx.argarray
authorDavid Mitchell <davem@iabyn.com>
Tue, 30 Jun 2015 07:03:43 +0000 (08:03 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 3 Feb 2016 08:59:33 +0000 (08:59 +0000)
commitfed4514af16b82213bfcf80aa6ecdabe7cfa401c
tree83d106ff0324cc5a08c64317f1c5277c8ad9b353
parentb52de9641f23b23bce1ec76375ae19bd7202b24a
undef *_; goto &f: update cx.argarray

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.
pp_ctl.c