summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST1
-rw-r--r--embed.fnc2
-rw-r--r--perl.h1
-rw-r--r--perlstatic.h33
-rw-r--r--proto.h2
-rw-r--r--util.c9
6 files changed, 37 insertions, 11 deletions
diff --git a/MANIFEST b/MANIFEST
index 3c26c4a2b9..acf636d68c 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -5230,6 +5230,7 @@ perlio.h PerlIO abstraction
perlio.sym Symbols for PerlIO abstraction
perliol.h PerlIO Layer definition
perlsdio.h Fake stdio using perlio
+perlstatic.h Like inline.h, but functions not declared inline
perlvars.h Global variables
perly.act parser actions; derived from perly.y
perly.c parser code (NOT derived from perly.y)
diff --git a/embed.fnc b/embed.fnc
index 16993ae3ae..735715099f 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -2696,7 +2696,7 @@ ATdpa |Malloc_t|safesysmalloc |MEM_SIZE nbytes
ATdpa |Malloc_t|safesyscalloc |MEM_SIZE elements|MEM_SIZE size
ATdpR |Malloc_t|safesysrealloc|Malloc_t where|MEM_SIZE nbytes
AdTp |Free_t |safesysfree |Malloc_t where
-CrTp |void |croak_memory_wrap
+CsrT |void |croak_memory_wrap
Cpdh |int |runops_standard
Cpdh |int |runops_debug
Afpd |void |sv_catpvf_mg |NN SV *const sv|NN const char *const pat|...
diff --git a/perl.h b/perl.h
index 5edc61a384..077d296065 100644
--- a/perl.h
+++ b/perl.h
@@ -7329,6 +7329,7 @@ cannot have changed since the precalculation.
START_EXTERN_C
+# include "perlstatic.h"
# include "inline.h"
# include "sv_inline.h"
diff --git a/perlstatic.h b/perlstatic.h
new file mode 100644
index 0000000000..a698de68bf
--- /dev/null
+++ b/perlstatic.h
@@ -0,0 +1,33 @@
+/* perlstatic.h
+ *
+ * 'I don't know half of you half as well as I should like; and I like less
+ * than half of you half as well as you deserve.'
+ *
+ * Copyright (C) 2020 by Larry Wall and others
+ *
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Artistic License, as specified in the README file.
+ *
+ * This file is a home for static functions that we don't consider suitable for
+ * inlining, but for which giving the compiler full knowledge of may be
+ * advantageous. Functions that have potential tail call optimizations are a
+ * likely component.
+
+ */
+
+/* saves machine code for a common noreturn idiom typically used in Newx*() */
+GCC_DIAG_IGNORE_DECL(-Wunused-function);
+
+STATIC void
+Perl_croak_memory_wrap(void)
+{
+ Perl_croak_nocontext("%s",PL_memory_wrap);
+}
+
+GCC_DIAG_RESTORE_DECL;
+
+
+/*
+ * ex: set ts=8 sts=4 sw=4 et:
+ */
+
diff --git a/proto.h b/proto.h
index 12f9c0202c..5758c9a26c 100644
--- a/proto.h
+++ b/proto.h
@@ -776,7 +776,7 @@ PERL_CALLCONV_NO_RET void Perl_croak_caller(const char* pat, ...)
__attribute__format__null_ok__(__printf__,1,2);
#define PERL_ARGS_ASSERT_CROAK_CALLER
-PERL_CALLCONV_NO_RET void Perl_croak_memory_wrap(void)
+PERL_STATIC_NO_RET void Perl_croak_memory_wrap(void)
__attribute__noreturn__;
#define PERL_ARGS_ASSERT_CROAK_MEMORY_WRAP
diff --git a/util.c b/util.c
index 1212a8368a..59becd4f68 100644
--- a/util.c
+++ b/util.c
@@ -2054,15 +2054,6 @@ Perl_croak_nocontext(const char *pat, ...)
}
#endif /* MULTIPLICITY */
-/* saves machine code for a common noreturn idiom typically used in Newx*() */
-GCC_DIAG_IGNORE_DECL(-Wunused-function);
-void
-Perl_croak_memory_wrap(void)
-{
- Perl_croak_nocontext("%s",PL_memory_wrap);
-}
-GCC_DIAG_RESTORE_DECL;
-
void
Perl_croak(pTHX_ const char *pat, ...)
{