summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2012-11-12 00:04:00 -0500
committerFather Chrysostomos <sprout@cpan.org>2012-11-12 06:17:36 -0800
commitcb077ed29694c30e42772d2c1fc2d9a9b3183eca (patch)
treed8af4ba26da3f83b7425214465b2c7d6fc28dd3b /pp.c
parent18c931a3833eccac01983e3e50239ca36de82ec4 (diff)
downloadperl-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.c')
-rw-r--r--pp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pp.c b/pp.c
index 5b0010fb8c..6088a11394 100644
--- a/pp.c
+++ b/pp.c
@@ -231,7 +231,7 @@ S_rv2gv(pTHX_ SV *sv, const bool vivify_sv, const bool strict,
if (vivify_sv && sv != &PL_sv_undef) {
GV *gv;
if (SvREADONLY(sv))
- Perl_croak_no_modify(aTHX);
+ Perl_croak_no_modify();
if (cUNOP->op_targ) {
SV * const namesv = PAD_SV(cUNOP->op_targ);
gv = MUTABLE_GV(newSV(0));
@@ -777,7 +777,7 @@ S_do_chomp(pTHX_ SV *retval, SV *sv, bool chomping)
sv_force_normal_flags(sv, 0);
}
else
- Perl_croak_no_modify(aTHX);
+ Perl_croak_no_modify();
}
if (PL_encoding) {
@@ -1040,7 +1040,7 @@ PP(pp_postinc)
const bool inc =
PL_op->op_type == OP_POSTINC || PL_op->op_type == OP_I_POSTINC;
if (SvTYPE(TOPs) >= SVt_PVAV || (isGV_with_GP(TOPs) && !SvFAKE(TOPs)))
- Perl_croak_no_modify(aTHX);
+ Perl_croak_no_modify();
if (SvROK(TOPs))
TARG = sv_newmortal();
sv_setsv(TARG, TOPs);
@@ -5081,7 +5081,7 @@ PP(pp_push)
SPAGAIN;
}
else {
- if (SvREADONLY(ary) && MARK < SP) Perl_croak_no_modify(aTHX);
+ if (SvREADONLY(ary) && MARK < SP) Perl_croak_no_modify();
PL_delaymagic = DM_DELAY;
for (++MARK; MARK <= SP; MARK++) {
SV *sv;