refactor gv.c:Perl_newGP
authorDaniel Dragan <bulk88@hotmail.com>
Wed, 7 Nov 2012 23:03:10 +0000 (18:03 -0500)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 9 Nov 2012 05:20:23 +0000 (21:20 -0800)
commit2639089b2b71c9124405bd9634b99be22b265f09
tree6a00ec20c791c7bba10b5a00e414ad6f2f914f01
parent9e942bf50af043414de49df7ae0d6fffc515426e
refactor gv.c:Perl_newGP

This commit fixes a scenario was strlen("") was called unnecessarily.
Replaced with 0. Also various func calls were rearranged for more calls
to happen near the beginning to maximize use of volatile registers
towards the end for PERL_HASH. PERL_HASH was moved to be closer to the
first usage of var hash. Setting gp_line to 0 was removed since the block
was just calloced and is already 0. Filling of gp.gp_egv was moved early
so var gv on C stack might get reused by compiler optimizer to store
something else to decrease the stack frame size of Perl_newGP.
PERL_ARGS_ASSERT_NEWGP was moved to be outside of an ifdef.

Also see commits 128165928a7 , 19bad6733a8 , 1df5f7c1950 , f4890806d3 .
gv.c