summaryrefslogtreecommitdiff
path: root/pp_hot.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_hot.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_hot.c')
-rw-r--r--pp_hot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp_hot.c b/pp_hot.c
index dc2c442445..29928d7201 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -405,7 +405,7 @@ PP(pp_preinc)
{
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_MAX)
{
@@ -2111,7 +2111,7 @@ PP(pp_subst)
|| ( ((SvTYPE(TARG) == SVt_PVGV && isGV_with_GP(TARG))
|| SvTYPE(TARG) > SVt_PVLV)
&& !(SvTYPE(TARG) == SVt_PVGV && SvFAKE(TARG)))))
- DIE(aTHX_ "%s", PL_no_modify);
+ Perl_croak_no_modify(aTHX);
PUTBACK;
setup_match:
@@ -3027,7 +3027,7 @@ Perl_vivify_ref(pTHX_ SV *sv, U32 to_what)
SvGETMAGIC(sv);
if (!SvOK(sv)) {
if (SvREADONLY(sv))
- Perl_croak(aTHX_ "%s", PL_no_modify);
+ Perl_croak_no_modify(aTHX);
prepare_SV_for_RV(sv);
switch (to_what) {
case OPpDEREF_SV: