summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2015-05-10 18:38:29 -0400
committerNicholas Clark <nick@ccl4.org>2017-08-08 15:21:42 +0200
commitf01c70a6a11a9c898652aeec8f08f7dcd6b835d2 (patch)
tree9deaa141a597b44ce0f61e2f0116e33ced828448
parentaa036315f696d82d2b87a4bc3c7661522db304f3 (diff)
downloadperl-f01c70a6a11a9c898652aeec8f08f7dcd6b835d2.tar.gz
ExtUtils::Constant - better machine code on threaded perl
croak doesnt require a context param to be pushed on the c stack, Perl_croak does, since Perl_croak/croak is very rarily called, minimize the machine code of the error branches don't do dTHX in thread aware XS code, this just sets up another my_perl var for the scope of const-xs BOOT sum masking the original declared my_perl in the outer C scope
-rw-r--r--cpan/ExtUtils-Constant/lib/ExtUtils/Constant/ProxySubs.pm18
1 files changed, 8 insertions, 10 deletions
diff --git a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/ProxySubs.pm b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/ProxySubs.pm
index c7e6d051e9..3388b988c2 100644
--- a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/ProxySubs.pm
+++ b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/ProxySubs.pm
@@ -268,7 +268,7 @@ EO_NOPCS
SV *sv;
if (!he) {
- Perl_croak($athx "Couldn't add key '%s' to %%$package_sprintf_safe\::",
+ croak("Couldn't add key '%s' to %%$package_sprintf_safe\::",
name);
}
sv = HeVAL(he);
@@ -306,9 +306,8 @@ static int
Im_sorry_Dave(pTHX_ SV *sv, MAGIC *mg)
{
PERL_UNUSED_ARG(mg);
- Perl_croak(aTHX_
- "Your vendor has not defined $package_sprintf_safe macro %"SVf
- " used", sv);
+ croak("Your vendor has not defined $package_sprintf_safe macro %"SVf
+ " used", sv);
NORETURN_FUNCTION_END;
}
@@ -373,7 +372,7 @@ MISSING
print $xs_fh <<"EOBOOT";
BOOT:
{
-#ifdef dTHX
+#if defined(dTHX) && !defined(PERL_NO_GET_CONTEXT)
dTHX;
#endif
HV *symbol_table = get_hv("$symbol_table", GV_ADD);
@@ -491,9 +490,8 @@ EXPLODE
HEK *hek;
#endif
if (!he) {
- Perl_croak($athx
- "Couldn't add key '%s' to %%$package_sprintf_safe\::",
- value_for_notfound->name);
+ croak("Couldn't add key '%s' to %%$package_sprintf_safe\::",
+ value_for_notfound->name);
}
sv = HeVAL(he);
if (!SvOK(sv) && SvTYPE(sv) != SVt_PVGV) {
@@ -521,8 +519,8 @@ EXPLODE
if (!hv_common(${c_subname}_missing, NULL, HEK_KEY(hek),
HEK_LEN(hek), HEK_FLAGS(hek), HV_FETCH_ISSTORE,
&PL_sv_yes, HEK_HASH(hek)))
- Perl_croak($athx "Couldn't add key '%s' to missing_hash",
- value_for_notfound->name);
+ croak("Couldn't add key '%s' to missing_hash",
+ value_for_notfound->name);
#endif
DONT