This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_entersub(): don't prematurely calc hasargs
authorDavid Mitchell <davem@iabyn.com>
Mon, 13 Jul 2015 12:11:01 +0000 (13:11 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 3 Feb 2016 08:59:37 +0000 (08:59 +0000)
commit44dd5d499eefd4eb00b900e79a48e299c7e368d6
tree02d4a1656da9a347633e66e20df653e8a71bacc6
parent1ff56747187edf1f59cfa937d579cc52a48084a8
pp_entersub(): don't prematurely calc hasargs

Currently at the top of pp_entersub() is:

    const bool hasargs = (PL_op->op_flags & OPf_STACKED) != 0;

Defer testing this flag and/or saving it to a local var until
its actually needed. This is a micro-optimisation.
pp_hot.c