diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2012-11-12 00:04:00 -0500 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-11-12 06:17:36 -0800 |
commit | cb077ed29694c30e42772d2c1fc2d9a9b3183eca (patch) | |
tree | d8af4ba26da3f83b7425214465b2c7d6fc28dd3b /pp_hot.c | |
parent | 18c931a3833eccac01983e3e50239ca36de82ec4 (diff) | |
download | perl-cb077ed29694c30e42772d2c1fc2d9a9b3183eca.tar.gz |
rmv context from Perl_croak_no_modify and Perl_croak_xs_usage
Remove the context/pTHX from Perl_croak_no_modify and Perl_croak_xs_usage.
For croak_no_modify, it now has no parameters (and always has been
no return), and on some compilers will now be optimized to a conditional
jump. For Perl_croak_xs_usage one push asm opcode is removed at the caller.
For both funcs, their footprint in their callers (which probably are hot
code) is smaller, which means a tiny bit more room in the cache. My text
section went from 0xC1A2F to 0xC198F after apply this. Also see
http://www.nntp.perl.org/group/perl.perl5.porters/2012/11/msg195233.html .
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -438,7 +438,7 @@ PP(pp_preinc) const bool inc = PL_op->op_type == OP_PREINC || PL_op->op_type == OP_I_PREINC; if (SvTYPE(TOPs) >= SVt_PVAV || (isGV_with_GP(TOPs) && !SvFAKE(TOPs))) - Perl_croak_no_modify(aTHX); + Perl_croak_no_modify(); if (!SvREADONLY(TOPs) && !SvGMAGICAL(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs) && SvIVX(TOPs) != (inc ? IV_MAX : IV_MIN)) { @@ -2161,7 +2161,7 @@ PP(pp_subst) || ( ((SvTYPE(TARG) == SVt_PVGV && isGV_with_GP(TARG)) || SvTYPE(TARG) > SVt_PVLV) && !(SvTYPE(TARG) == SVt_PVGV && SvFAKE(TARG))))) - Perl_croak_no_modify(aTHX); + Perl_croak_no_modify(); PUTBACK; s = SvPV_nomg(TARG, len); @@ -2946,7 +2946,7 @@ Perl_vivify_ref(pTHX_ SV *sv, U32 to_what) SvGETMAGIC(sv); if (!SvOK(sv)) { if (SvREADONLY(sv)) - Perl_croak_no_modify(aTHX); + Perl_croak_no_modify(); prepare_SV_for_RV(sv); switch (to_what) { case OPpDEREF_SV: |