diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-06-27 13:06:12 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-06-27 18:42:57 +0100 |
commit | 6ad8f254c95c6d4523948ded91d651dcc490dee5 (patch) | |
tree | 2576b906296333c44a52f734fb2c94b77dbc5b9a /av.c | |
parent | 9fed9930ce50e45354ea3630282369d9cbf41332 (diff) | |
download | perl-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 'av.c')
-rw-r--r-- | av.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -339,7 +339,7 @@ Perl_av_store(pTHX_ register AV *av, I32 key, SV *val) } if (SvREADONLY(av) && key >= AvFILL(av)) - Perl_croak(aTHX_ "%s", PL_no_modify); + Perl_croak_no_modify(aTHX); if (!AvREAL(av) && AvREIFY(av)) av_reify(av); @@ -440,7 +440,7 @@ Perl_av_clear(pTHX_ register AV *av) #endif if (SvREADONLY(av)) - Perl_croak(aTHX_ "%s", PL_no_modify); + Perl_croak_no_modify(aTHX); /* Give any tie a chance to cleanup first */ if (SvRMAGICAL(av)) { @@ -546,7 +546,7 @@ Perl_av_push(pTHX_ register AV *av, SV *val) assert(SvTYPE(av) == SVt_PVAV); if (SvREADONLY(av)) - Perl_croak(aTHX_ "%s", PL_no_modify); + Perl_croak_no_modify(aTHX); if ((mg = SvTIED_mg((const SV *)av, PERL_MAGIC_tied))) { Perl_magic_methcall(aTHX_ MUTABLE_SV(av), mg, "PUSH", G_DISCARD, 1, @@ -576,7 +576,7 @@ Perl_av_pop(pTHX_ register AV *av) assert(SvTYPE(av) == SVt_PVAV); if (SvREADONLY(av)) - Perl_croak(aTHX_ "%s", PL_no_modify); + Perl_croak_no_modify(aTHX); if ((mg = SvTIED_mg((const SV *)av, PERL_MAGIC_tied))) { retval = Perl_magic_methcall(aTHX_ MUTABLE_SV(av), mg, "POP", 0, 0); if (retval) @@ -635,7 +635,7 @@ Perl_av_unshift(pTHX_ register AV *av, register I32 num) assert(SvTYPE(av) == SVt_PVAV); if (SvREADONLY(av)) - Perl_croak(aTHX_ "%s", PL_no_modify); + Perl_croak_no_modify(aTHX); if ((mg = SvTIED_mg((const SV *)av, PERL_MAGIC_tied))) { Perl_magic_methcall(aTHX_ MUTABLE_SV(av), mg, "UNSHIFT", @@ -697,7 +697,7 @@ Perl_av_shift(pTHX_ register AV *av) assert(SvTYPE(av) == SVt_PVAV); if (SvREADONLY(av)) - Perl_croak(aTHX_ "%s", PL_no_modify); + Perl_croak_no_modify(aTHX); if ((mg = SvTIED_mg((const SV *)av, PERL_MAGIC_tied))) { retval = Perl_magic_methcall(aTHX_ MUTABLE_SV(av), mg, "SHIFT", 0, 0); if (retval) @@ -813,7 +813,7 @@ Perl_av_delete(pTHX_ AV *av, I32 key, I32 flags) assert(SvTYPE(av) == SVt_PVAV); if (SvREADONLY(av)) - Perl_croak(aTHX_ "%s", PL_no_modify); + Perl_croak_no_modify(aTHX); if (SvRMAGICAL(av)) { const MAGIC * const tied_magic |