remove redundant Zero() from JMPENV_BOOTSTRAP
authorDaniel Dragan <bulk88@hotmail.com>
Fri, 1 Nov 2013 21:50:39 +0000 (17:50 -0400)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 2 Nov 2013 12:39:00 +0000 (05:39 -0700)
commitcaa674f3cc1c9e05da7c41f3dffbea4b2640af3c
tree167ea4dfd31450a20a1f6200957a3e4bd4d4780d
parentb82e68e8acf012df784511a23ba8b2dfbc3853b8
remove redundant Zero() from JMPENV_BOOTSTRAP

In commit 14dd3ad8c9 , a 3 NULL assigns were converted to a Zero() for what
I guess was an optimization. This also caused the large je_buf to be
zeroed even though je_buf was uninit before. At that time, JMPENV had
2 extra members that don't exist anymore. The 2 extra members in JMPENV
were removed in commit 766f891612 . The comment about je_throw was made
obsolete in commit 766f891612 so rework it.

One function call free NULL assign is faster than a memset() call.
je_buf is 0x40 bytes long on 32 bit VC2003 Win32 Perl. No need to zero it
since je_buf is never read unless je_prev is not NULL. Also there is no
need to zero the last 2 members je_ret and je_mustcatch since they are
immediatley assigned to. Move PL_top_env assignment to near je_prev so
compiler tries to optimize better since je_prev is the start of the struct
and hopefully will calculate the pointer once.

Also put some poisoning in case JMPENV gets new members in the future.
To conditionally poison in a macro, PERL_POISON_EXPR is being introduced
instead of 2 different definitions of JMPENV_BOOTSTRAP.
cop.h
handy.h