summaryrefslogtreecommitdiff
path: root/util.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 /util.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 'util.c')
-rw-r--r--util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/util.c b/util.c
index 666f99fc0f..0e265beb7c 100644
--- a/util.c
+++ b/util.c
@@ -1638,6 +1638,21 @@ Perl_croak(pTHX_ const char *pat, ...)
}
/*
+=for apidoc Am|void|croak_no_modify
+
+Exactly equivalent to C<Perl_croak(aTHX_ "%s", PL_no_modify)>, but generates
+terser object code than using C<Perl_croak>. Less code used on exception code
+paths reduces CPU cache pressure.
+
+*/
+
+void
+Perl_croak_no_modify(pTHX)
+{
+ Perl_croak(aTHX_ "%s", PL_no_modify);
+}
+
+/*
=for apidoc Am|void|warn_sv|SV *baseex
This is an XS interface to Perl's C<warn> function.