summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-06-27 13:06:12 +0100
committerNicholas Clark <nick@ccl4.org>2010-06-27 18:42:57 +0100
commit6ad8f254c95c6d4523948ded91d651dcc490dee5 (patch)
tree2576b906296333c44a52f734fb2c94b77dbc5b9a /pp.c
parent9fed9930ce50e45354ea3630282369d9cbf41332 (diff)
downloadperl-6ad8f254c95c6d4523948ded91d651dcc490dee5.tar.gz
Add Perl_croak_no_modify() to implement Perl_croak("%s", PL_no_modify).
This reduces object code size, reducing CPU cache pressure on the non-exception paths.
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 ab1c680579..a596ad3d66 100644
--- a/pp.c
+++ b/pp.c
@@ -162,7 +162,7 @@ PP(pp_rv2gv)
* NI-S 1999/05/07
*/
if (SvREADONLY(sv))
- Perl_croak(aTHX_ "%s", PL_no_modify);
+ Perl_croak_no_modify(aTHX);
if (PL_op->op_private & OPpDEREF) {
GV *gv;
if (cUNOP->op_targ) {
@@ -885,7 +885,7 @@ PP(pp_predec)
{
dVAR; dSP;
if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs))
- DIE(aTHX_ "%s", PL_no_modify);
+ Perl_croak_no_modify(aTHX);
if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs)
&& SvIVX(TOPs) != IV_MIN)
{
@@ -902,7 +902,7 @@ PP(pp_postinc)
{
dVAR; dSP; dTARGET;
if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs))
- DIE(aTHX_ "%s", PL_no_modify);
+ Perl_croak_no_modify(aTHX);
sv_setsv(TARG, TOPs);
if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs)
&& SvIVX(TOPs) != IV_MAX)
@@ -924,7 +924,7 @@ PP(pp_postdec)
{
dVAR; dSP; dTARGET;
if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs))
- DIE(aTHX_ "%s", PL_no_modify);
+ Perl_croak_no_modify(aTHX);
sv_setsv(TARG, TOPs);
if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs)
&& SvIVX(TOPs) != IV_MIN)