summaryrefslogtreecommitdiff
path: root/doop.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 /doop.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 'doop.c')
-rw-r--r--doop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/doop.c b/doop.c
index c43ecb111c..c1a357cc3e 100644
--- a/doop.c
+++ b/doop.c
@@ -635,7 +635,7 @@ Perl_do_trans(pTHX_ SV *sv)
if (SvIsCOW(sv))
sv_force_normal_flags(sv, 0);
if (SvREADONLY(sv))
- Perl_croak(aTHX_ "%s", PL_no_modify);
+ Perl_croak_no_modify(aTHX);
}
(void)SvPV_const(sv, len);
if (!len)
@@ -1017,7 +1017,7 @@ Perl_do_chop(pTHX_ register SV *astr, register SV *sv)
sv_force_normal_flags(sv, 0);
}
if (SvREADONLY(sv))
- Perl_croak(aTHX_ "%s", PL_no_modify);
+ Perl_croak_no_modify(aTHX);
}
if (PL_encoding && !SvUTF8(sv)) {
@@ -1103,7 +1103,7 @@ Perl_do_chomp(pTHX_ register SV *sv)
sv_force_normal_flags(sv, 0);
}
if (SvREADONLY(sv))
- Perl_croak(aTHX_ "%s", PL_no_modify);
+ Perl_croak_no_modify(aTHX);
}
if (PL_encoding) {