From 7918f24d20384771923d344a382e1d16d9552018 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 12 Feb 2008 13:15:20 +0000 Subject: [PATCH] assert() that every NN argument is not NULL. Otherwise we have the ability to create landmines that will explode under someone in the future when they upgrade their compiler to one with better optimisation. We've already done this at least twice. (Yes, some of the assertions are after code that would already have SEGVd because it already deferences a pointer, but they are put in to make it easier to automate checking that each and every case is covered.) Add a tool, checkARGS_ASSERT.pl, to check that every case is covered. p4raw-id: //depot/perl@33291 --- MANIFEST | 1 + NetWare/nw5.c | 2 +- Porting/checkARGS_ASSERT.pl | 32 + av.c | 40 +- deb.c | 7 + doio.c | 38 +- doop.c | 37 +- dump.c | 72 +- embed.pl | 22 +- gv.c | 65 +- hv.c | 78 +- locale.c | 7 + malloc.c | 7 + mathoms.c | 123 +++ mg.c | 134 +++- mro.c | 14 +- numeric.c | 36 +- op.c | 259 +++++- pad.c | 30 + perl.c | 83 +- perlio.c | 6 + pp.c | 4 + pp_ctl.c | 40 +- pp_hot.c | 9 + pp_pack.c | 35 +- pp_sort.c | 33 +- pp_sys.c | 6 + proto.h | 1866 +++++++++++++++++++++++++++++++++++++++++++ reentr.c | 5 + reentr.pl | 5 + regcomp.c | 147 +++- regexec.c | 64 +- scope.c | 83 ++ sv.c | 314 +++++++- taint.c | 3 + toke.c | 106 ++- universal.c | 8 +- utf8.c | 127 ++- util.c | 121 ++- vms/vms.c | 4 + win32/win32.c | 10 + win32/wince.c | 8 + 42 files changed, 4006 insertions(+), 85 deletions(-) create mode 100755 Porting/checkARGS_ASSERT.pl diff --git a/MANIFEST b/MANIFEST index 740c740..3f083b5 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3292,6 +3292,7 @@ Porting/add-package.pl Add/Update CPAN modules that are part of Core Porting/apply Apply patches sent by mail Porting/check83.pl Check whether we are 8.3-friendly Porting/checkansi.pl Check source code for ANSI-C violations +Porting/checkARGS_ASSERT.pl Check we use every PERL_ARGS_ASSERT* macro Porting/checkAUTHORS.pl Check that the AUTHORS file is complete Porting/checkcase.pl Check whether we are case-insensitive-fs-friendly Porting/checkcfgvar.pl Check that config scripts define all symbols diff --git a/NetWare/nw5.c b/NetWare/nw5.c index 552106a..56d3a62 100644 --- a/NetWare/nw5.c +++ b/NetWare/nw5.c @@ -843,7 +843,7 @@ sys_intern_clear(pTHX) void sys_intern_dup(pTHX_ struct interp_intern *src, struct interp_intern *dst) { - + PERL_ARGS_ASSERT_SYS_INTERN_DUP; } #endif /* HAVE_INTERP_INTERN */ diff --git a/Porting/checkARGS_ASSERT.pl b/Porting/checkARGS_ASSERT.pl new file mode 100755 index 0000000..3d8e2fc --- /dev/null +++ b/Porting/checkARGS_ASSERT.pl @@ -0,0 +1,32 @@ +#!/usr/bin/perl -w +use strict; + +# Print out any PERL_ARGS_ASSERT* macro that was declared but not used. + +my %declared; +my %used; + +open my $fh, '<', 'proto.h' or die "Can't open proto.h: $!"; +while (<$fh>) { + $declared{$1}++ if /^#define\s+(PERL_ARGS_ASSERT[A-Za-z_]+)\s+/; +} + +if (!@ARGV) { + open my $fh, '<', 'MANIFEST' or die "Can't open MANIFEST: $!"; + while (<$fh>) { + # *.c or */*.c + push @ARGV, $1 if m!^((?:[^/]+/)?[^/]+\.c)\t!; + } +} + +while (<>) { + $used{$1}++ if /^\s+(PERL_ARGS_ASSERT_[A-Za-z_]+);$/; +} + +my %unused; + +foreach (keys %declared) { + $unused{$_}++ unless $used{$_}; +} + +print $_, "\n" foreach sort keys %unused; diff --git a/av.c b/av.c index 343274f..cf95d61 100644 --- a/av.c +++ b/av.c @@ -27,7 +27,7 @@ Perl_av_reify(pTHX_ AV *av) dVAR; I32 key; - assert(av); + PERL_ARGS_ASSERT_AV_REIFY; if (AvREAL(av)) return; @@ -66,7 +66,7 @@ Perl_av_extend(pTHX_ AV *av, I32 key) dVAR; MAGIC *mg; - assert(av); + PERL_ARGS_ASSERT_AV_EXTEND; mg = SvTIED_mg((SV*)av, PERL_MAGIC_tied); if (mg) { @@ -195,7 +195,7 @@ Perl_av_fetch(pTHX_ register AV *av, I32 key, I32 lval) { dVAR; - assert(av); + PERL_ARGS_ASSERT_AV_FETCH; if (SvRMAGICAL(av)) { const MAGIC * const tied_magic = mg_find((SV*)av, PERL_MAGIC_tied); @@ -278,7 +278,7 @@ Perl_av_store(pTHX_ register AV *av, I32 key, SV *val) dVAR; SV** ary; - assert(av); + PERL_ARGS_ASSERT_AV_STORE; /* S_regclass relies on being able to pass in a NULL sv (unicode_alternate may be NULL). @@ -369,6 +369,7 @@ Perl_av_make(pTHX_ register I32 size, register SV **strp) { register AV * const av = (AV*)newSV_type(SVt_PVAV); /* sv_upgrade does AvREAL_only() */ + PERL_ARGS_ASSERT_AV_MAKE; if (size) { /* "defined" was returning undef for size==0 anyway. */ register SV** ary; register I32 i; @@ -401,7 +402,7 @@ Perl_av_clear(pTHX_ register AV *av) dVAR; I32 extra; - assert(av); + PERL_ARGS_ASSERT_AV_CLEAR; #ifdef DEBUGGING if (SvREFCNT(av) == 0 && ckWARN_d(WARN_DEBUGGING)) { Perl_warner(aTHX_ packWARN(WARN_DEBUGGING), "Attempt to clear deleted array"); @@ -454,7 +455,7 @@ Undefines the array. Frees the memory used by the array itself. void Perl_av_undef(pTHX_ register AV *av) { - assert(av); + PERL_ARGS_ASSERT_AV_UNDEF; /* Give any tie a chance to cleanup first */ if (SvTIED_mg((SV*)av, PERL_MAGIC_tied)) @@ -487,6 +488,7 @@ A small internal helper function to remove a commonly duplicated idiom. void Perl_av_create_and_push(pTHX_ AV **const avp, SV *const val) { + PERL_ARGS_ASSERT_AV_CREATE_AND_PUSH; if (!*avp) *avp = newAV(); av_push(*avp, val); @@ -506,7 +508,8 @@ Perl_av_push(pTHX_ register AV *av, SV *val) { dVAR; MAGIC *mg; - assert(av); + + PERL_ARGS_ASSERT_AV_PUSH; if (SvREADONLY(av)) Perl_croak(aTHX_ PL_no_modify); @@ -544,7 +547,7 @@ Perl_av_pop(pTHX_ register AV *av) SV *retval; MAGIC* mg; - assert(av); + PERL_ARGS_ASSERT_AV_POP; if (SvREADONLY(av)) Perl_croak(aTHX_ PL_no_modify); @@ -587,6 +590,7 @@ A small internal helper function to remove a commonly duplicated idiom. SV ** Perl_av_create_and_unshift_one(pTHX_ AV **const avp, SV *const val) { + PERL_ARGS_ASSERT_AV_CREATE_AND_UNSHIFT_ONE; if (!*avp) *avp = newAV(); av_unshift(*avp, 1); @@ -610,7 +614,7 @@ Perl_av_unshift(pTHX_ register AV *av, register I32 num) register I32 i; MAGIC* mg; - assert(av); + PERL_ARGS_ASSERT_AV_UNSHIFT; if (SvREADONLY(av)) Perl_croak(aTHX_ PL_no_modify); @@ -681,7 +685,7 @@ Perl_av_shift(pTHX_ register AV *av) SV *retval; MAGIC* mg; - assert(av); + PERL_ARGS_ASSERT_AV_SHIFT; if (SvREADONLY(av)) Perl_croak(aTHX_ PL_no_modify); @@ -726,7 +730,7 @@ array is C. Returns -1 if the array is empty. I32 Perl_av_len(pTHX_ register const AV *av) { - assert(av); + PERL_ARGS_ASSERT_AV_LEN; return AvFILL(av); } @@ -750,7 +754,7 @@ Perl_av_fill(pTHX_ register AV *av, I32 fill) dVAR; MAGIC *mg; - assert(av); + PERL_ARGS_ASSERT_AV_FILL; if (fill < 0) fill = -1; @@ -808,7 +812,7 @@ Perl_av_delete(pTHX_ AV *av, I32 key, I32 flags) dVAR; SV *sv; - assert(av); + PERL_ARGS_ASSERT_AV_DELETE; if (SvREADONLY(av)) Perl_croak(aTHX_ PL_no_modify); @@ -894,7 +898,7 @@ bool Perl_av_exists(pTHX_ AV *av, I32 key) { dVAR; - assert(av); + PERL_ARGS_ASSERT_AV_EXISTS; if (SvRMAGICAL(av)) { const MAGIC * const tied_magic = mg_find((SV*)av, PERL_MAGIC_tied); @@ -950,7 +954,7 @@ S_get_aux_mg(pTHX_ AV *av) { dVAR; MAGIC *mg; - assert(av); + PERL_ARGS_ASSERT_GET_AUX_MG; mg = mg_find((SV*)av, PERL_MAGIC_arylen_p); @@ -967,12 +971,18 @@ S_get_aux_mg(pTHX_ AV *av) { SV ** Perl_av_arylen_p(pTHX_ AV *av) { MAGIC *const mg = get_aux_mg(av); + + PERL_ARGS_ASSERT_AV_ARYLEN_P; + return &(mg->mg_obj); } IV * Perl_av_iter_p(pTHX_ AV *av) { MAGIC *const mg = get_aux_mg(av); + + PERL_ARGS_ASSERT_AV_ITER_P; + #if IVSIZE == I32SIZE return (IV *)&(mg->mg_len); #else diff --git a/deb.c b/deb.c index 5e20dee..bc7e419 100644 --- a/deb.c +++ b/deb.c @@ -29,6 +29,7 @@ Perl_deb_nocontext(const char *pat, ...) #ifdef DEBUGGING dTHX; va_list args; + PERL_ARGS_ASSERT_DEB_NOCONTEXT; va_start(args, pat); vdeb(pat, &args); va_end(args); @@ -42,6 +43,7 @@ void Perl_deb(pTHX_ const char *pat, ...) { va_list args; + PERL_ARGS_ASSERT_DEB; va_start(args, pat); #ifdef DEBUGGING vdeb(pat, &args); @@ -60,6 +62,8 @@ Perl_vdeb(pTHX_ const char *pat, va_list *args) const char* const display_file = file ? file : ""; const long line = PL_curcop ? (long)CopLINE(PL_curcop) : 0; + PERL_ARGS_ASSERT_VDEB; + if (DEBUG_v_TEST) PerlIO_printf(Perl_debug_log, "(%ld:%s:%ld)\t", (long)PerlProc_getpid(), display_file, line); @@ -110,6 +114,9 @@ S_deb_stack_n(pTHX_ SV** stack_base, I32 stack_min, I32 stack_max, dVAR; register I32 i = stack_max - 30; const I32 *markscan = PL_markstack + mark_min; + + PERL_ARGS_ASSERT_DEB_STACK_N; + if (i < stack_min) i = stack_min; diff --git a/doio.c b/doio.c index ba096ef..16d8d01 100644 --- a/doio.c +++ b/doio.c @@ -79,6 +79,8 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw, char mode[PERL_MODE_MAX]; /* file mode ("r\0", "rb\0", "ab\0" etc.) */ SV *namesv; + PERL_ARGS_ASSERT_DO_OPENN; + Zero(mode,sizeof(mode),char); PL_forkprocess = 1; /* assume true if no fork */ @@ -705,6 +707,8 @@ Perl_nextargv(pTHX_ register GV *gv) Gid_t filegid; IO * const io = GvIOp(gv); + PERL_ARGS_ASSERT_NEXTARGV; + if (!PL_argvoutgv) PL_argvoutgv = gv_fetchpvs("ARGVOUT", GV_ADD|GV_NOTQUAL, SVt_PVIO); if (io && (IoFLAGS(io) & IOf_ARGV) && (IoFLAGS(io) & IOf_START)) { @@ -952,6 +956,8 @@ Perl_io_close(pTHX_ IO *io, bool not_implicit) dVAR; bool retval = FALSE; + PERL_ARGS_ASSERT_IO_CLOSE; + if (IoIFP(io)) { if (IoTYPE(io) == IoTYPE_PIPE) { const int status = PerlProc_pclose(IoIFP(io)); @@ -991,6 +997,8 @@ Perl_do_eof(pTHX_ GV *gv) dVAR; register IO * const io = GvIO(gv); + PERL_ARGS_ASSERT_DO_EOF; + if (!io) return TRUE; else if ((IoTYPE(io) == IoTYPE_WRONLY) && ckWARN(WARN_IO)) @@ -1035,6 +1043,8 @@ Perl_do_tell(pTHX_ GV *gv) register IO *io = NULL; register PerlIO *fp; + PERL_ARGS_ASSERT_DO_TELL; + if (gv && (io = GvIO(gv)) && (fp = IoIFP(io))) { #ifdef ULTRIX_STDIO_BOTCH if (PerlIO_eof(fp)) @@ -1075,6 +1085,8 @@ Perl_do_sysseek(pTHX_ GV *gv, Off_t pos, int whence) register IO *io = NULL; register PerlIO *fp; + PERL_ARGS_ASSERT_DO_SYSSEEK; + if (gv && (io = GvIO(gv)) && (fp = IoIFP(io))) return PerlLIO_lseek(PerlIO_fileno(fp), pos, whence); if (ckWARN2(WARN_UNOPENED,WARN_CLOSED)) @@ -1196,6 +1208,9 @@ bool Perl_do_print(pTHX_ register SV *sv, PerlIO *fp) { dVAR; + + PERL_ARGS_ASSERT_DO_PRINT; + /* assuming fp is checked earlier */ if (!sv) return TRUE; @@ -1366,6 +1381,7 @@ static void S_exec_failed(pTHX_ const char *cmd, int fd, int do_report) { const int e = errno; + PERL_ARGS_ASSERT_EXEC_FAILED; if (ckWARN(WARN_EXEC)) Perl_warner(aTHX_ packWARN(WARN_EXEC), "Can't exec \"%s\": %s", cmd, Strerror(e)); @@ -1380,6 +1396,7 @@ Perl_do_aexec5(pTHX_ SV *really, register SV **mark, register SV **sp, int fd, int do_report) { dVAR; + PERL_ARGS_ASSERT_DO_AEXEC5; #if defined(MACOS_TRADITIONAL) || defined(__SYMBIAN32__) || defined(__LIBCATAMOUNT__) Perl_croak(aTHX_ "exec? I'm not *that* kind of operating system"); #else @@ -1434,9 +1451,11 @@ Perl_do_exec3(pTHX_ const char *incmd, int fd, int do_report) register char *s; char *buf; char *cmd; - /* Make a copy so we can change it */ const Size_t cmdlen = strlen(incmd) + 1; + + PERL_ARGS_ASSERT_DO_EXEC3; + Newx(buf, cmdlen, char); cmd = buf; memcpy(cmd, incmd, cmdlen); @@ -1567,6 +1586,8 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) const char *s; SV ** const oldmark = mark; + PERL_ARGS_ASSERT_APPLY; + /* Doing this ahead of the switch statement preserves the old behaviour, where attempting to use kill as a taint test test would fail on platforms where kill was not defined. */ @@ -1869,6 +1890,9 @@ Perl_cando(pTHX_ Mode_t mode, bool effective, register const Stat_t *statbufp) */ { dVAR; + + PERL_ARGS_ASSERT_CANDO; + #ifdef DOSISH /* [Comments and code from Len Reed] * MS-DOS "user" is similar to UNIX's "superuser," but can't write @@ -1962,6 +1986,7 @@ Perl_do_ipcget(pTHX_ I32 optype, SV **mark, SV **sp) const I32 n = (optype == OP_MSGGET) ? 0 : SvIVx(*++mark); const I32 flags = SvIVx(*++mark); + PERL_ARGS_ASSERT_DO_IPCGET; PERL_UNUSED_ARG(sp); SETERRNO(0,0); @@ -2002,6 +2027,7 @@ Perl_do_ipcctl(pTHX_ I32 optype, SV **mark, SV **sp) STRLEN infosize = 0; I32 getinfo = (cmd == IPC_STAT); + PERL_ARGS_ASSERT_DO_IPCCTL; PERL_UNUSED_ARG(sp); switch (optype) @@ -2124,6 +2150,7 @@ Perl_do_msgsnd(pTHX_ SV **mark, SV **sp) const char * const mbuf = SvPV_const(mstr, len); const I32 msize = len - sizeof(long); + PERL_ARGS_ASSERT_DO_MSGSND; PERL_UNUSED_ARG(sp); if (msize < 0) @@ -2147,6 +2174,8 @@ Perl_do_msgrcv(pTHX_ SV **mark, SV **sp) I32 msize, flags, ret; const I32 id = SvIVx(*++mark); SV * const mstr = *++mark; + + PERL_ARGS_ASSERT_DO_MSGRCV; PERL_UNUSED_ARG(sp); /* suppress warning when reading into undef var --jhi */ @@ -2185,6 +2214,8 @@ Perl_do_semop(pTHX_ SV **mark, SV **sp) const I32 id = SvIVx(*++mark); SV * const opstr = *++mark; const char * const opbuf = SvPV_const(opstr, opsize); + + PERL_ARGS_ASSERT_DO_SEMOP; PERL_UNUSED_ARG(sp); if (opsize < 3 * SHORTSIZE @@ -2239,6 +2270,8 @@ Perl_do_shmio(pTHX_ I32 optype, SV **mark, SV **sp) SV * const mstr = *++mark; const I32 mpos = SvIVx(*++mark); const I32 msize = SvIVx(*++mark); + + PERL_ARGS_ASSERT_DO_SHMIO; PERL_UNUSED_ARG(sp); SETERRNO(0,0); @@ -2305,6 +2338,9 @@ Perl_start_glob (pTHX_ SV *tmpglob, IO *io) dVAR; SV * const tmpcmd = newSV(0); PerlIO *fp; + + PERL_ARGS_ASSERT_START_GLOB; + ENTER; SAVEFREESV(tmpcmd); #ifdef VMS /* expand the wildcards right here, rather than opening a pipe, */ diff --git a/doop.c b/doop.c index 59aa807..1a5c829 100644 --- a/doop.c +++ b/doop.c @@ -33,8 +33,10 @@ S_do_trans_simple(pTHX_ SV * const sv) STRLEN len; U8 *s = (U8*)SvPV(sv,len); U8 * const send = s+len; - const short * const tbl = (short*)cPVOP->op_pv; + + PERL_ARGS_ASSERT_DO_TRANS_SIMPLE; + if (!tbl) Perl_croak(aTHX_ "panic: do_trans_simple line %d",__LINE__); @@ -100,8 +102,10 @@ S_do_trans_count(pTHX_ SV * const sv) const U8 *s = (const U8*)SvPV_const(sv, len); const U8 * const send = s + len; I32 matches = 0; - const short * const tbl = (short*)cPVOP->op_pv; + + PERL_ARGS_ASSERT_DO_TRANS_COUNT; + if (!tbl) Perl_croak(aTHX_ "panic: do_trans_count line %d",__LINE__); @@ -136,8 +140,10 @@ S_do_trans_complex(pTHX_ SV * const sv) U8 *s = (U8*)SvPV(sv, len); U8 * const send = s+len; I32 matches = 0; - const short * const tbl = (short*)cPVOP->op_pv; + + PERL_ARGS_ASSERT_DO_TRANS_COMPLEX; + if (!tbl) Perl_croak(aTHX_ "panic: do_trans_complex line %d",__LINE__); @@ -306,7 +312,6 @@ S_do_trans_simple_utf8(pTHX_ SV * const sv) I32 matches = 0; const I32 grows = PL_op->op_private & OPpTRANS_GROWS; STRLEN len; - SV* const rv = #ifdef USE_ITHREADS PAD_SVl(cPADOP->op_padix); @@ -320,6 +325,8 @@ S_do_trans_simple_utf8(pTHX_ SV * const sv) UV final = 0; U8 hibit = 0; + PERL_ARGS_ASSERT_DO_TRANS_SIMPLE_UTF8; + s = (U8*)SvPV(sv, len); if (!SvUTF8(sv)) { const U8 *t = s; @@ -407,7 +414,6 @@ S_do_trans_count_utf8(pTHX_ SV * const sv) const U8 *send; I32 matches = 0; STRLEN len; - SV* const rv = #ifdef USE_ITHREADS PAD_SVl(cPADOP->op_padix); @@ -420,6 +426,8 @@ S_do_trans_count_utf8(pTHX_ SV * const sv) const UV extra = none + 1; U8 hibit = 0; + PERL_ARGS_ASSERT_DO_TRANS_COUNT_UTF8; + s = (const U8*)SvPV_const(sv, len); if (!SvUTF8(sv)) { const U8 *t = s; @@ -472,8 +480,10 @@ S_do_trans_complex_utf8(pTHX_ SV * const sv) STRLEN len; U8 *dstart, *dend; U8 hibit = 0; - U8 *s = (U8*)SvPV(sv, len); + + PERL_ARGS_ASSERT_DO_TRANS_COMPLEX_UTF8; + if (!SvUTF8(sv)) { const U8 *t = s; const U8 * const e = s + len; @@ -621,6 +631,8 @@ Perl_do_trans(pTHX_ SV *sv) const I32 hasutf = (PL_op->op_private & (OPpTRANS_FROM_UTF|OPpTRANS_TO_UTF)); + PERL_ARGS_ASSERT_DO_TRANS; + if (SvREADONLY(sv)) { if (SvIsCOW(sv)) sv_force_normal_flags(sv, 0); @@ -671,6 +683,8 @@ Perl_do_join(pTHX_ register SV *sv, SV *delim, register SV **mark, register SV * register STRLEN len; STRLEN delimlen; + PERL_ARGS_ASSERT_DO_JOIN; + (void) SvPV_const(delim, delimlen); /* stringify and get the delimlen */ /* SvCUR assumes it's SvPOK() and woe betide you if it's not. */ @@ -727,6 +741,8 @@ Perl_do_sprintf(pTHX_ SV *sv, I32 len, SV **sarg) const char * const pat = SvPV_const(*sarg, patlen); bool do_taint = FALSE; + PERL_ARGS_ASSERT_DO_SPRINTF; + SvUTF8_off(sv); if (DO_UTF8(*sarg)) SvUTF8_on(sv); @@ -745,6 +761,8 @@ Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size) const unsigned char *s = (const unsigned char *) SvPV_const(sv, srclen); UV retnum = 0; + PERL_ARGS_ASSERT_DO_VECGET; + if (offset < 0) return 0; if (size < 1 || (size & (size-1))) /* size < 1 or not a power of two */ @@ -895,6 +913,8 @@ Perl_do_vecset(pTHX_ SV *sv) STRLEN len; SV * const targ = LvTARG(sv); + PERL_ARGS_ASSERT_DO_VECSET; + if (!targ) return; s = (unsigned char*)SvPV_force(targ, targlen); @@ -974,6 +994,8 @@ Perl_do_chop(pTHX_ register SV *astr, register SV *sv) STRLEN len; char *s; + PERL_ARGS_ASSERT_DO_CHOP; + if (SvTYPE(sv) == SVt_PVAV) { register I32 i; AV* const av = (AV*)sv; @@ -1053,6 +1075,8 @@ Perl_do_chomp(pTHX_ register SV *sv) char *temp_buffer = NULL; SV* svrecode = NULL; + PERL_ARGS_ASSERT_DO_CHOMP; + if (RsSNARF(PL_rs)) return 0; if (RsRECORD(PL_rs)) @@ -1201,6 +1225,7 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) bool right_utf; STRLEN needlen = 0; + PERL_ARGS_ASSERT_DO_VOP; if (sv != left || (optype != OP_BIT_AND && !SvOK(sv) && !SvGMAGICAL(sv))) sv_setpvn(sv, "", 0); /* avoid undef warning on |= and ^= */ diff --git a/dump.c b/dump.c index 7d8bf0a..52ac050 100644 --- a/dump.c +++ b/dump.c @@ -72,6 +72,7 @@ void Perl_dump_indent(pTHX_ I32 level, PerlIO *file, const char* pat, ...) { va_list args; + PERL_ARGS_ASSERT_DUMP_INDENT; va_start(args, pat); dump_vindent(level, file, pat, &args); va_end(args); @@ -81,6 +82,7 @@ void Perl_dump_vindent(pTHX_ I32 level, PerlIO *file, const char* pat, va_list *args) { dVAR; + PERL_ARGS_ASSERT_DUMP_VINDENT; PerlIO_printf(file, "%*s", (int)(level*PL_dumpindent), ""); PerlIO_vprintf(file, pat, *args); } @@ -101,6 +103,8 @@ Perl_dump_packsubs(pTHX_ const HV *stash) dVAR; I32 i; + PERL_ARGS_ASSERT_DUMP_PACKSUBS; + if (!HvARRAY(stash)) return; for (i = 0; i <= (I32) HvMAX(stash); i++) { @@ -127,6 +131,8 @@ Perl_dump_sub(pTHX_ const GV *gv) { SV * const sv = sv_newmortal(); + PERL_ARGS_ASSERT_DUMP_SUB; + gv_fullname3(sv, gv, NULL); Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nSUB %s = ", SvPVX_const(sv)); if (CvISXSUB(GvCV(gv))) @@ -144,6 +150,8 @@ Perl_dump_form(pTHX_ const GV *gv) { SV * const sv = sv_newmortal(); + PERL_ARGS_ASSERT_DUMP_FORM; + gv_fullname3(sv, gv, NULL); Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nFORMAT %s = ", SvPVX_const(sv)); if (CvROOT(GvFORM(gv))) @@ -219,6 +227,8 @@ Perl_pv_escape( pTHX_ SV *dsv, char const * const str, const char * const end = pv + count; /* end of string */ octbuf[0] = esc; + PERL_ARGS_ASSERT_PV_ESCAPE; + if (!(flags & PERL_PV_ESCAPE_NOCLEAR)) { /* This won't alter the UTF-8 flag */ sv_setpvn(dsv, "", 0); @@ -332,7 +342,9 @@ Perl_pv_pretty( pTHX_ SV *dsv, char const * const str, const STRLEN count, { const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%'; STRLEN escaped; - + + PERL_ARGS_ASSERT_PV_PRETTY; + if (!(flags & PERL_PV_PRETTY_NOCLEAR)) { /* This won't alter the UTF-8 flag */ sv_setpvn(dsv, "", 0); @@ -383,6 +395,8 @@ Note that the final string may be up to 7 chars longer than pvlim. char * Perl_pv_display(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim) { + PERL_ARGS_ASSERT_PV_DISPLAY; + pv_pretty( dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP); if (len > cur && pv[cur] == '\0') sv_catpvn( dsv, "\\0", 2 ); @@ -532,6 +546,8 @@ Perl_do_pmop_dump(pTHX_ I32 level, PerlIO *file, const PMOP *pm) { char ch; + PERL_ARGS_ASSERT_DO_PMOP_DUMP; + if (!pm) { Perl_dump_indent(aTHX_ level, file, "{}\n"); return; @@ -568,6 +584,8 @@ S_pm_description(pTHX_ const PMOP *pm) const REGEXP * const regex = PM_GETRE(pm); const U32 pmflags = pm->op_pmflags; + PERL_ARGS_ASSERT_PM_DESCRIPTION; + if (pmflags & PMf_ONCE) sv_catpv(desc, ",ONCE"); #ifdef USE_ITHREADS @@ -733,6 +751,8 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o) UV seq; const OPCODE optype = o->op_type; + PERL_ARGS_ASSERT_DO_OP_DUMP; + sequence(o); Perl_dump_indent(aTHX_ level, file, "{\n"); level++; @@ -1122,6 +1142,7 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o) void Perl_op_dump(pTHX_ const OP *o) { + PERL_ARGS_ASSERT_OP_DUMP; do_op_dump(0, Perl_debug_log, o); } @@ -1130,6 +1151,8 @@ Perl_gv_dump(pTHX_ GV *gv) { SV *sv; + PERL_ARGS_ASSERT_GV_DUMP; + if (!gv) { PerlIO_printf(Perl_debug_log, "{}\n"); return; @@ -1201,6 +1224,8 @@ static const struct { const char type; const char *name; } magic_names[] = { void Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, const MAGIC *mg, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim) { + PERL_ARGS_ASSERT_DO_MAGIC_DUMP; + for (; mg; mg = mg->mg_moremagic) { Perl_dump_indent(aTHX_ level, file, " MAGIC = 0x%"UVxf"\n", PTR2UV(mg)); @@ -1342,6 +1367,9 @@ void Perl_do_hv_dump(pTHX_ I32 level, PerlIO *file, const char *name, HV *sv) { const char *hvname; + + PERL_ARGS_ASSERT_DO_HV_DUMP; + Perl_dump_indent(aTHX_ level, file, "%s = 0x%"UVxf, name, PTR2UV(sv)); if (sv && (hvname = HvNAME_get(sv))) PerlIO_printf(file, "\t\"%s\"\n", hvname); @@ -1352,6 +1380,8 @@ Perl_do_hv_dump(pTHX_ I32 level, PerlIO *file, const char *name, HV *sv) void Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, const char *name, GV *sv) { + PERL_ARGS_ASSERT_DO_GV_DUMP; + Perl_dump_indent(aTHX_ level, file, "%s = 0x%"UVxf, name, PTR2UV(sv)); if (sv && GvNAME(sv)) PerlIO_printf(file, "\t\"%s\"\n", GvNAME(sv)); @@ -1362,6 +1392,8 @@ Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, const char *name, GV *sv) void Perl_do_gvgv_dump(pTHX_ I32 level, PerlIO *file, const char *name, GV *sv) { + PERL_ARGS_ASSERT_DO_GVGV_DUMP; + Perl_dump_indent(aTHX_ level, file, "%s = 0x%"UVxf, name, PTR2UV(sv)); if (sv && GvNAME(sv)) { const char *hvname; @@ -1383,6 +1415,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo U32 flags; U32 type; + PERL_ARGS_ASSERT_DO_SV_DUMP; + if (!sv) { Perl_dump_indent(aTHX_ level, file, "SV = 0\n"); return; @@ -1905,6 +1939,9 @@ void Perl_sv_dump(pTHX_ SV *sv) { dVAR; + + PERL_ARGS_ASSERT_SV_DUMP; + if (SvROK(sv)) do_sv_dump(0, Perl_debug_log, sv, 0, 4, 0, 0); else @@ -1954,6 +1991,9 @@ I32 Perl_debop(pTHX_ const OP *o) { dVAR; + + PERL_ARGS_ASSERT_DEBOP; + if (CopSTASH_eq(PL_curcop, PL_debstash) && !DEBUG_J_TEST_) return 0; @@ -2025,6 +2065,9 @@ void Perl_watch(pTHX_ char **addr) { dVAR; + + PERL_ARGS_ASSERT_WATCH; + PL_watchaddr = addr; PL_watchok = *addr; PerlIO_printf(Perl_debug_log, "WATCHING, %"UVxf" is currently %"UVxf"\n", @@ -2035,6 +2078,9 @@ STATIC void S_debprof(pTHX_ const OP *o) { dVAR; + + PERL_ARGS_ASSERT_DEBPROF; + if (!DEBUG_J_TEST_ && CopSTASH_eq(PL_curcop, PL_debstash)) return; if (!PL_profiledata) @@ -2066,6 +2112,9 @@ STATIC void S_xmldump_attr(pTHX_ I32 level, PerlIO *file, const char* pat, ...) { va_list args; + + PERL_ARGS_ASSERT_XMLDUMP_ATTR; + PerlIO_printf(file, "\n "); va_start(args, pat); xmldump_vindent(level, file, pat, &args); @@ -2077,6 +2126,7 @@ void Perl_xmldump_indent(pTHX_ I32 level, PerlIO *file, const char* pat, ...) { va_list args; + PERL_ARGS_ASSERT_XMLDUMP_INDENT; va_start(args, pat); xmldump_vindent(level, file, pat, &args); va_end(args); @@ -2085,6 +2135,8 @@ Perl_xmldump_indent(pTHX_ I32 level, PerlIO *file, const char* pat, ...) void Perl_xmldump_vindent(pTHX_ I32 level, PerlIO *file, const char* pat, va_list *args) { + PERL_ARGS_ASSERT_XMLDUMP_VINDENT; + PerlIO_printf(file, "%*s", (int)(level*PL_dumpindent), ""); PerlIO_vprintf(file, pat, *args); } @@ -2106,6 +2158,8 @@ Perl_xmldump_packsubs(pTHX_ const HV *stash) I32 i; HE *entry; + PERL_ARGS_ASSERT_XMLDUMP_PACKSUBS; + if (!HvARRAY(stash)) return; for (i = 0; i <= (I32) HvMAX(stash); i++) { @@ -2130,6 +2184,8 @@ Perl_xmldump_sub(pTHX_ const GV *gv) { SV * const sv = sv_newmortal(); + PERL_ARGS_ASSERT_XMLDUMP_SUB; + gv_fullname3(sv, gv, NULL); Perl_xmldump_indent(aTHX_ 0, PL_xmlfp, "\nSUB %s = ", SvPVX(sv)); if (CvXSUB(GvCV(gv))) @@ -2147,6 +2203,8 @@ Perl_xmldump_form(pTHX_ const GV *gv) { SV * const sv = sv_newmortal(); + PERL_ARGS_ASSERT_XMLDUMP_FORM; + gv_fullname3(sv, gv, NULL); Perl_xmldump_indent(aTHX_ 0, PL_xmlfp, "\nFORMAT %s = ", SvPVX(sv)); if (CvROOT(GvFORM(gv))) @@ -2164,6 +2222,7 @@ Perl_xmldump_eval(pTHX) char * Perl_sv_catxmlsv(pTHX_ SV *dsv, SV *ssv) { + PERL_ARGS_ASSERT_SV_CATXMLSV; return sv_catxmlpvn(dsv, SvPVX(ssv), SvCUR(ssv), SvUTF8(ssv)); } @@ -2176,6 +2235,8 @@ Perl_sv_catxmlpvn(pTHX_ SV *dsv, const char *pv, STRLEN len, int utf8) STRLEN dsvcur; STRLEN cl; + PERL_ARGS_ASSERT_SV_CATXMLPVN; + sv_catpvn(dsv,"",0); dsvcur = SvCUR(dsv); /* in case we have to restart */ @@ -2299,6 +2360,8 @@ Perl_sv_xmlpeek(pTHX_ SV *sv) STRLEN n_a; int unref = 0; + PERL_ARGS_ASSERT_SV_XMLPEEK; + sv_utf8_upgrade(t); sv_setpvn(t, "", 0); /* retry: */ @@ -2459,6 +2522,8 @@ Perl_sv_xmlpeek(pTHX_ SV *sv) void Perl_do_pmop_xmldump(pTHX_ I32 level, PerlIO *file, const PMOP *pm) { + PERL_ARGS_ASSERT_DO_PMOP_XMLDUMP; + if (!pm) { Perl_xmldump_indent(aTHX_ level, file, "\n"); return; @@ -2506,6 +2571,9 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o) { UV seq; int contents = 0; + + PERL_ARGS_ASSERT_DO_OP_XMLDUMP; + if (!o) return; sequence(o); @@ -2930,6 +2998,8 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o) void Perl_op_xmldump(pTHX_ const OP *o) { + PERL_ARGS_ASSERT_OP_XMLDUMP; + do_op_xmldump(0, PL_xmlfp, o); } #endif diff --git a/embed.pl b/embed.pl index 964406f..97f0d83 100755 --- a/embed.pl +++ b/embed.pl @@ -156,13 +156,15 @@ sub write_protos { $ret .= "$arg\n"; } else { - my ($flags,$retval,$func,@args) = @_; + my ($flags,$retval,$plain_func,@args) = @_; my @nonnull; my $has_context = ( $flags !~ /n/ ); my $never_returns = ( $flags =~ /r/ ); my $commented_out = ( $flags =~ /m/ ); my $is_malloc = ( $flags =~ /a/ ); my $can_ignore = ( $flags !~ /R/ ) && !$is_malloc; + my @names_of_nn; + my $func; my $splint_flags = ""; if ( $SPLINT && !$commented_out ) { @@ -174,12 +176,14 @@ sub write_protos { if ($flags =~ /s/) { $retval = "STATIC $splint_flags$retval"; - $func = "S_$func"; + $func = "S_$plain_func"; } else { $retval = "PERL_CALLCONV $splint_flags$retval"; if ($flags =~ /[bp]/) { - $func = "Perl_$func"; + $func = "Perl_$plain_func"; + } else { + $func = $plain_func; } } $ret .= "$retval\t$func("; @@ -205,12 +209,16 @@ sub write_protos { my $temp_arg = $arg; $temp_arg =~ s/\*//g; $temp_arg =~ s/\s*\bstruct\b\s*/ /g; - if ( ($temp_arg ne "...") && ($temp_arg !~ /\w+\s+\w+/) ) { - warn "$func: $arg doesn't have a name\n"; + if ( ($temp_arg ne "...") + && ($temp_arg !~ /\w+\s+(\w+)(?:\[\d+\])?\s*$/) ) { + warn "$func: $arg ($n) doesn't have a name\n"; } if ( $SPLINT && $nullok && !$commented_out ) { $arg = '/*@null@*/ ' . $arg; } + if (defined $1 && $nn) { + push @names_of_nn, $1; + } } $ret .= join ", ", @args; } @@ -251,6 +259,10 @@ sub write_protos { } $ret .= ";"; $ret = "/* $ret */" if $commented_out; + if (@names_of_nn) { + $ret .= "\n#define PERL_ARGS_ASSERT_\U$plain_func\E\t\\\n\t" + . join '; ', map "assert($_)", @names_of_nn; + } $ret .= @attrs ? "\n\n" : "\n"; } $ret; diff --git a/gv.c b/gv.c index ebcfabb..223e318 100644 --- a/gv.c +++ b/gv.c @@ -43,6 +43,8 @@ static const STRLEN S_autolen = sizeof(S_autoload)-1; GV * Perl_gv_SVadd(pTHX_ GV *gv) { + PERL_ARGS_ASSERT_GV_SVADD; + if (!gv || SvTYPE((SV*)gv) != SVt_PVGV) Perl_croak(aTHX_ "Bad symbol for scalar"); if (!GvSV(gv)) @@ -54,6 +56,8 @@ Perl_gv_SVadd(pTHX_ GV *gv) GV * Perl_gv_AVadd(pTHX_ register GV *gv) { + PERL_ARGS_ASSERT_GV_AVADD; + if (!gv || SvTYPE((SV*)gv) != SVt_PVGV) Perl_croak(aTHX_ "Bad symbol for array"); if (!GvAV(gv)) @@ -64,6 +68,8 @@ Perl_gv_AVadd(pTHX_ register GV *gv) GV * Perl_gv_HVadd(pTHX_ register GV *gv) { + PERL_ARGS_ASSERT_GV_HVADD; + if (!gv || SvTYPE((SV*)gv) != SVt_PVGV) Perl_croak(aTHX_ "Bad symbol for hash"); if (!GvHV(gv)) @@ -75,6 +81,9 @@ GV * Perl_gv_IOadd(pTHX_ register GV *gv) { dVAR; + + PERL_ARGS_ASSERT_GV_IOADD; + if (!gv || SvTYPE((SV*)gv) != SVt_PVGV) { /* @@ -105,6 +114,7 @@ Perl_gv_IOadd(pTHX_ register GV *gv) GV * Perl_gv_fetchfile(pTHX_ const char *name) { + PERL_ARGS_ASSERT_GV_FETCHFILE; return gv_fetchfile_flags(name, strlen(name), 0); } @@ -118,6 +128,7 @@ Perl_gv_fetchfile_flags(pTHX_ const char *const name, const STRLEN namelen, const STRLEN tmplen = namelen + 2; GV *gv; + PERL_ARGS_ASSERT_GV_FETCHFILE_FLAGS; PERL_UNUSED_ARG(flags); if (!PL_defstash) @@ -161,6 +172,8 @@ NULL. SV * Perl_gv_const_sv(pTHX_ GV *gv) { + PERL_ARGS_ASSERT_GV_CONST_SV; + if (SvTYPE(gv) == SVt_PVGV) return cv_const_sv(GvCVu(gv)); return SvROK(gv) ? SvRV(gv) : NULL; @@ -180,6 +193,8 @@ Perl_newGP(pTHX_ GV *const gv) const char *file; STRLEN len; + PERL_ARGS_ASSERT_NEWGP; + if (temp_sv) { file = SvPVX(temp_sv); len = SvCUR(temp_sv); @@ -218,6 +233,7 @@ Perl_gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi) SV *const has_constant = doproto && SvROK(gv) ? SvRV(gv) : NULL; const U32 exported_constant = has_constant ? SvPCS_IMPORTED(gv) : 0; + PERL_ARGS_ASSERT_GV_INIT; assert (!(proto && has_constant)); if (has_constant) { @@ -290,6 +306,8 @@ Perl_gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi) STATIC void S_gv_init_sv(pTHX_ GV *gv, I32 sv_type) { + PERL_ARGS_ASSERT_GV_INIT_SV; + switch (sv_type) { case SVt_PVIO: (void)GvIOn(gv); @@ -358,6 +376,8 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) STRLEN packlen; U32 topgen_cmp; + PERL_ARGS_ASSERT_GV_FETCHMETH; + /* UNIVERSAL methods should be callable without a stash */ if (!stash) { create = 0; /* probably appropriate */ @@ -492,6 +512,8 @@ Perl_gv_fetchmeth_autoload(pTHX_ HV *stash, const char *name, STRLEN len, I32 le { GV *gv = gv_fetchmeth(stash, name, len, level); + PERL_ARGS_ASSERT_GV_FETCHMETH_AUTOLOAD; + if (!gv) { CV *cv; GV **gvp; @@ -552,6 +574,8 @@ S_gv_get_super_pkg(pTHX_ const char* name, I32 namelen) GV* gv; HV* stash; + PERL_ARGS_ASSERT_GV_GET_SUPER_PKG; + stash = gv_stashpvn(name, namelen, 0); if(stash) return stash; @@ -595,6 +619,8 @@ Perl_gv_fetchmethod_autoload(pTHX_ HV *stash, const char *name, I32 autoload) GV* gv; HV* ostash = stash; + PERL_ARGS_ASSERT_GV_FETCHMETHOD_AUTOLOAD; + if (stash && SvTYPE(stash) < SVt_PVHV) stash = NULL; @@ -674,6 +700,8 @@ Perl_gv_autoload4(pTHX_ HV *stash, const char *name, STRLEN len, I32 method) const char *packname = ""; STRLEN packname_len = 0; + PERL_ARGS_ASSERT_GV_AUTOLOAD4; + if (len == S_autolen && strnEQ(name, S_autoload, S_autolen)) return NULL; if (stash) { @@ -758,6 +786,8 @@ S_require_tie_mod(pTHX_ GV *gv, const char *varpv, SV* namesv, const char *methp dVAR; HV* stash = gv_stashsv(namesv, 0); + PERL_ARGS_ASSERT_REQUIRE_TIE_MOD; + if (!stash || !(gv_fetchmethod(stash, methpv))) { SV *module = newSVsv(namesv); char varname = *varpv; /* varpv might be clobbered by load_module, @@ -796,6 +826,7 @@ determine the length of C, then calls C. HV* Perl_gv_stashpv(pTHX_ const char *name, I32 create) { + PERL_ARGS_ASSERT_GV_STASHPV; return gv_stashpvn(name, strlen(name), create); } @@ -821,6 +852,8 @@ Perl_gv_stashpvn(pTHX_ const char *name, U32 namelen, I32 flags) HV *stash; GV *tmpgv; + PERL_ARGS_ASSERT_GV_STASHPVN; + if (namelen + 2 <= sizeof smallbuf) tmpbuf = smallbuf; else @@ -854,12 +887,16 @@ Perl_gv_stashsv(pTHX_ SV *sv, I32 flags) { STRLEN len; const char * const ptr = SvPV_const(sv,len); + + PERL_ARGS_ASSERT_GV_STASHSV; + return gv_stashpvn(ptr, len, flags); } GV * Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) { + PERL_ARGS_ASSERT_GV_FETCHPV; return gv_fetchpvn_flags(nambeg, strlen(nambeg), add, sv_type); } @@ -867,6 +904,7 @@ GV * Perl_gv_fetchsv(pTHX_ SV *name, I32 flags, I32 sv_type) { STRLEN len; const char * const nambeg = SvPV_const(name, len); + PERL_ARGS_ASSERT_GV_FETCHSV; return gv_fetchpvn_flags(nambeg, len, flags | SvUTF8(name), sv_type); } @@ -888,6 +926,8 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, const char *const name_em1 = name_end - 1; U32 faking_it; + PERL_ARGS_ASSERT_GV_FETCHPVN_FLAGS; + if (flags & GV_NOTQUAL) { /* Caller promised that there is no stash, so we can skip the check. */ len = full_len; @@ -1387,6 +1427,9 @@ Perl_gv_fullname4(pTHX_ SV *sv, const GV *gv, const char *prefix, bool keepmain) const char *name; STRLEN namelen; const HV * const hv = GvSTASH(gv); + + PERL_ARGS_ASSERT_GV_FULLNAME4; + if (!hv) { SvOK_off(sv); return; @@ -1412,6 +1455,9 @@ void Perl_gv_efullname4(pTHX_ SV *sv, const GV *gv, const char *prefix, bool keepmain) { const GV * const egv = GvEGV(gv); + + PERL_ARGS_ASSERT_GV_EFULLNAME4; + gv_fullname4(sv, egv ? egv : gv, prefix, keepmain); } @@ -1442,6 +1488,8 @@ Perl_gv_check(pTHX_ const HV *stash) dVAR; register I32 i; + PERL_ARGS_ASSERT_GV_CHECK; + if (!HvARRAY(stash)) return; for (i = 0; i <= (I32) HvMAX(stash); i++) { @@ -1480,6 +1528,9 @@ GV * Perl_newGVgen(pTHX_ const char *pack) { dVAR; + + PERL_ARGS_ASSERT_NEWGVGEN; + return gv_fetchpv(Perl_form(aTHX_ "%s::_GEN_%ld", pack, (long)PL_gensym++), GV_ADD, SVt_PVGV); } @@ -1555,6 +1606,8 @@ Perl_magic_freeovrld(pTHX_ SV *sv, MAGIC *mg) AMT * const amtp = (AMT*)mg->mg_ptr; PERL_UNUSED_ARG(sv); + PERL_ARGS_ASSERT_MAGIC_FREEOVRLD; + if (amtp && AMT_AMAGIC(amtp)) { int i; for (i = 1; i < NofAMmeth; i++) { @@ -1579,6 +1632,8 @@ Perl_Gv_AMupdate(pTHX_ HV *stash) const struct mro_meta* stash_meta = HvMROMETA(stash); U32 newgen; + PERL_ARGS_ASSERT_GV_AMUPDATE; + newgen = PL_sub_generation + stash_meta->pkg_gen + stash_meta->cache_gen; if (mg) { const AMT * const amtp = (AMT*)mg->mg_ptr; @@ -1760,6 +1815,9 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags) int fl=0; #endif HV* stash=NULL; + + PERL_ARGS_ASSERT_AMAGIC_CALL; + if (!(AMGf_noleft & flags) && SvAMAGIC(left) && (stash = SvSTASH(SvRV(left))) && (mg = mg_find((SV*)stash, PERL_MAGIC_overload_table)) @@ -2127,6 +2185,9 @@ Perl_is_gv_magical_sv(pTHX_ SV *name, U32 flags) { STRLEN len; const char * const temp = SvPV_const(name, len); + + PERL_ARGS_ASSERT_IS_GV_MAGICAL_SV; + return is_gv_magical(temp, len, flags); } @@ -2153,6 +2214,8 @@ Perl_is_gv_magical(pTHX_ const char *name, STRLEN len, U32 flags) PERL_UNUSED_CONTEXT; PERL_UNUSED_ARG(flags); + PERL_ARGS_ASSERT_IS_GV_MAGICAL; + if (len > 1) { const char * const name1 = name + 1; switch (*name) { @@ -2275,7 +2338,7 @@ Perl_gv_name_set(pTHX_ GV *gv, const char *name, U32 len, U32 flags) dVAR; U32 hash; - assert(name); + PERL_ARGS_ASSERT_GV_NAME_SET; PERL_UNUSED_ARG(flags); if (len > I32_MAX) diff --git a/hv.c b/hv.c index f0d8033..a532b14 100644 --- a/hv.c +++ b/hv.c @@ -91,6 +91,8 @@ S_save_hek_flags(const char *str, I32 len, U32 hash, int flags) char *k; register HEK *hek; + PERL_ARGS_ASSERT_SAVE_HEK_FLAGS; + Newx(k, HEK_BASESIZE + len + 2, char); hek = (HEK*)k; Copy(str, HEK_KEY(hek), len, char); @@ -127,6 +129,7 @@ Perl_hek_dup(pTHX_ HEK *source, CLONE_PARAMS* param) { HEK *shared = (HEK*)ptr_table_fetch(PL_ptr_table, source); + PERL_ARGS_ASSERT_HEK_DUP; PERL_UNUSED_ARG(param); if (shared) { @@ -147,6 +150,8 @@ Perl_he_dup(pTHX_ const HE *e, bool shared, CLONE_PARAMS* param) { HE *ret; + PERL_ARGS_ASSERT_HE_DUP; + if (!e) return NULL; /* look for it in the table first */ @@ -196,6 +201,9 @@ S_hv_notallowed(pTHX_ int flags, const char *key, I32 klen, const char *msg) { SV * const sv = sv_newmortal(); + + PERL_ARGS_ASSERT_HV_NOTALLOWED; + if (!(flags & HVhek_FREEKEY)) { sv_setpvn(sv, key, klen); } @@ -312,6 +320,8 @@ Perl_hv_common_key_len(pTHX_ HV *hv, const char *key, I32 klen_i32, STRLEN klen; int flags; + PERL_ARGS_ASSERT_HV_COMMON_KEY_LEN; + if (klen_i32 < 0) { klen = -klen_i32; flags = HVhek_UTF8; @@ -814,6 +824,9 @@ STATIC void S_hv_magic_check(HV *hv, bool *needs_copy, bool *needs_store) { const MAGIC *mg = SvMAGIC(hv); + + PERL_ARGS_ASSERT_HV_MAGIC_CHECK; + *needs_copy = FALSE; *needs_store = TRUE; while (mg) { @@ -841,6 +854,8 @@ Perl_hv_scalar(pTHX_ HV *hv) { SV *sv; + PERL_ARGS_ASSERT_HV_SCALAR; + if (SvRMAGICAL(hv)) { MAGIC * const mg = mg_find((SV*)hv, PERL_MAGIC_tied); if (mg) @@ -1054,6 +1069,8 @@ S_hsplit(pTHX_ HV *hv) int longest_chain = 0; int was_shared; + PERL_ARGS_ASSERT_HSPLIT; + /*PerlIO_printf(PerlIO_stderr(), "hsplit called for %p which had %d\n", (void*)hv, (int) oldsize);*/ @@ -1223,6 +1240,8 @@ Perl_hv_ksplit(pTHX_ HV *hv, IV newmax) register HE *entry; register HE **oentry; + PERL_ARGS_ASSERT_HV_KSPLIT; + newsize = (I32) newmax; /* possible truncation here */ if (newsize != newmax || newmax <= oldsize) return; @@ -1418,6 +1437,8 @@ Perl_hv_free_ent(pTHX_ HV *hv, register HE *entry) dVAR; SV *val; + PERL_ARGS_ASSERT_HV_FREE_ENT; + if (!entry) return; val = HeVAL(entry); @@ -1439,6 +1460,9 @@ void Perl_hv_delayfree_ent(pTHX_ HV *hv, register HE *entry) { dVAR; + + PERL_ARGS_ASSERT_HV_DELAYFREE_ENT; + if (!entry) return; /* SvREFCNT_inc to counter the SvREFCNT_dec in hv_free_ent */ @@ -1530,6 +1554,8 @@ Perl_hv_clear_placeholders(pTHX_ HV *hv) dVAR; const U32 items = (U32)HvPLACEHOLDERS_get(hv); + PERL_ARGS_ASSERT_HV_CLEAR_PLACEHOLDERS; + if (items) clear_placeholders(hv, items); } @@ -1540,6 +1566,8 @@ S_clear_placeholders(pTHX_ HV *hv, U32 items) dVAR; I32 i; + PERL_ARGS_ASSERT_CLEAR_PLACEHOLDERS; + if (items == 0) return; @@ -1587,6 +1615,8 @@ S_hfreeentries(pTHX_ HV *hv) HEK *name; int attempts = 100; + PERL_ARGS_ASSERT_HFREEENTRIES; + if (!orig_array) return; @@ -1767,6 +1797,8 @@ S_hv_auxinit(HV *hv) { struct xpvhv_aux *iter; char *array; + PERL_ARGS_ASSERT_HV_AUXINIT; + if (!HvARRAY(hv)) { Newxz(array, PERL_HV_ARRAY_ALLOC_BYTES(HvMAX(hv) + 1) + sizeof(struct xpvhv_aux), char); @@ -1806,6 +1838,10 @@ value, you can get it through the macro C. I32 Perl_hv_iterinit(pTHX_ HV *hv) { + PERL_ARGS_ASSERT_HV_ITERINIT; + + /* FIXME: Are we not NULL, or do we croak? Place bets now! */ + if (!hv) Perl_croak(aTHX_ "Bad hash"); @@ -1830,6 +1866,8 @@ I32 * Perl_hv_riter_p(pTHX_ HV *hv) { struct xpvhv_aux *iter; + PERL_ARGS_ASSERT_HV_RITER_P; + if (!hv) Perl_croak(aTHX_ "Bad hash"); @@ -1841,6 +1879,8 @@ HE ** Perl_hv_eiter_p(pTHX_ HV *hv) { struct xpvhv_aux *iter; + PERL_ARGS_ASSERT_HV_EITER_P; + if (!hv) Perl_croak(aTHX_ "Bad hash"); @@ -1852,6 +1892,8 @@ void Perl_hv_riter_set(pTHX_ HV *hv, I32 riter) { struct xpvhv_aux *iter; + PERL_ARGS_ASSERT_HV_RITER_SET; + if (!hv) Perl_croak(aTHX_ "Bad hash"); @@ -1870,6 +1912,8 @@ void Perl_hv_eiter_set(pTHX_ HV *hv, HE *eiter) { struct xpvhv_aux *iter; + PERL_ARGS_ASSERT_HV_EITER_SET; + if (!hv) Perl_croak(aTHX_ "Bad hash"); @@ -1893,6 +1937,7 @@ Perl_hv_name_set(pTHX_ HV *hv, const char *name, U32 len, U32 flags) struct xpvhv_aux *iter; U32 hash; + PERL_ARGS_ASSERT_HV_NAME_SET; PERL_UNUSED_ARG(flags); if (len > I32_MAX) @@ -1916,7 +1961,10 @@ Perl_hv_name_set(pTHX_ HV *hv, const char *name, U32 len, U32 flags) AV ** Perl_hv_backreferences_p(pTHX_ HV *hv) { struct xpvhv_aux * const iter = SvOOK(hv) ? HvAUX(hv) : hv_auxinit(hv); + + PERL_ARGS_ASSERT_HV_BACKREFERENCES_P; PERL_UNUSED_CONTEXT; + return &(iter->xhv_backreferences); } @@ -1924,6 +1972,8 @@ void Perl_hv_kill_backrefs(pTHX_ HV *hv) { AV *av; + PERL_ARGS_ASSERT_HV_KILL_BACKREFS; + if (!SvOOK(hv)) return; @@ -1974,6 +2024,8 @@ Perl_hv_iternext_flags(pTHX_ HV *hv, I32 flags) MAGIC* mg; struct xpvhv_aux *iter; + PERL_ARGS_ASSERT_HV_ITERNEXT_FLAGS; + if (!hv) Perl_croak(aTHX_ "Bad hash"); @@ -2098,6 +2150,8 @@ C. char * Perl_hv_iterkey(pTHX_ register HE *entry, I32 *retlen) { + PERL_ARGS_ASSERT_HV_ITERKEY; + if (HeKLEN(entry) == HEf_SVKEY) { STRLEN len; char * const p = SvPV(HeKEY_sv(entry), len); @@ -2124,6 +2178,8 @@ see C. SV * Perl_hv_iterkeysv(pTHX_ register HE *entry) { + PERL_ARGS_ASSERT_HV_ITERKEYSV; + return sv_2mortal(newSVhek(HeKEY_hek(entry))); } @@ -2139,6 +2195,8 @@ C. SV * Perl_hv_iterval(pTHX_ HV *hv, register HE *entry) { + PERL_ARGS_ASSERT_HV_ITERVAL; + if (SvRMAGICAL(hv)) { if (mg_find((SV*)hv, PERL_MAGIC_tied)) { SV* const sv = sv_newmortal(); @@ -2166,6 +2224,8 @@ Perl_hv_iternextsv(pTHX_ HV *hv, char **key, I32 *retlen) { HE * const he = hv_iternext_flags(hv, 0); + PERL_ARGS_ASSERT_HV_ITERNEXTSV; + if (!he) return NULL; *key = hv_iterkey(he, retlen); @@ -2312,6 +2372,8 @@ Perl_share_hek(pTHX_ const char *str, I32 len, register U32 hash) int flags = 0; const char * const save = str; + PERL_ARGS_ASSERT_SHARE_HEK; + if (len < 0) { STRLEN tmplen = -len; is_utf8 = TRUE; @@ -2339,6 +2401,9 @@ S_share_hek_flags(pTHX_ const char *str, I32 len, register U32 hash, int flags) register HE *entry; const int flags_masked = flags & HVhek_MASK; const U32 hindex = hash & (I32) HvMAX(PL_strtab); + register XPVHV * const xhv = (XPVHV*)SvANY(PL_strtab); + + PERL_ARGS_ASSERT_SHARE_HEK_FLAGS; /* what follows is the moral equivalent of: @@ -2348,7 +2413,7 @@ S_share_hek_flags(pTHX_ const char *str, I32 len, register U32 hash, int flags) Can't rehash the shared string table, so not sure if it's worth counting the number of entries in the linked list */ - register XPVHV * const xhv = (XPVHV*)SvANY(PL_strtab); + /* assert(xhv_array != 0) */ LOCK_STRTAB_MUTEX; entry = (HvARRAY(PL_strtab))[hindex]; @@ -2422,6 +2487,8 @@ Perl_hv_placeholders_p(pTHX_ HV *hv) dVAR; MAGIC *mg = mg_find((SV*)hv, PERL_MAGIC_rhash); + PERL_ARGS_ASSERT_HV_PLACEHOLDERS_P; + if (!mg) { mg = sv_magicext((SV*)hv, 0, PERL_MAGIC_rhash, 0, 0, 0); @@ -2439,6 +2506,8 @@ Perl_hv_placeholders_get(pTHX_ HV *hv) dVAR; MAGIC * const mg = mg_find((SV*)hv, PERL_MAGIC_rhash); + PERL_ARGS_ASSERT_HV_PLACEHOLDERS_GET; + return mg ? mg->mg_len : 0; } @@ -2448,6 +2517,8 @@ Perl_hv_placeholders_set(pTHX_ HV *hv, I32 ph) dVAR; MAGIC * const mg = mg_find((SV*)hv, PERL_MAGIC_rhash); + PERL_ARGS_ASSERT_HV_PLACEHOLDERS_SET; + if (mg) { mg->mg_len = ph; } else if (ph) { @@ -2462,6 +2533,9 @@ S_refcounted_he_value(pTHX_ const struct refcounted_he *he) { dVAR; SV *value; + + PERL_ARGS_ASSERT_REFCOUNTED_HE_VALUE; + switch(he->refcounted_he_data[0] & HVrhek_typemask) { case HVrhek_undef: value = newSV(0); @@ -2823,6 +2897,8 @@ Perl_hv_assert(pTHX_ HV *hv) const I32 riter = HvRITER_get(hv); HE *eiter = HvEITER_get(hv); + PERL_ARGS_ASSERT_HV_ASSERT; + (void)hv_iterinit(hv); while ((entry = hv_iternext_flags(hv, HV_ITERNEXT_WANTPLACEHOLDERS))) { diff --git a/locale.c b/locale.c index bcae800..9cd82b8 100644 --- a/locale.c +++ b/locale.c @@ -56,6 +56,8 @@ S_stdize_locale(pTHX_ char *locs) const char * const s = strchr(locs, '='); bool okay = TRUE; + PERL_ARGS_ASSERT_STDIZE_LOCALE; + if (s) { const char * const t = strchr(s, '.'); okay = FALSE; @@ -174,6 +176,8 @@ Perl_new_ctype(pTHX_ const char *newctype) dVAR; int i; + PERL_ARGS_ASSERT_NEW_CTYPE; + for (i = 0; i < 256; i++) { if (isUPPER_LC(i)) PL_fold_locale[i] = toLOWER_LC(i); @@ -184,6 +188,7 @@ Perl_new_ctype(pTHX_ const char *newctype) } #endif /* USE_LOCALE_CTYPE */ + PERL_ARGS_ASSERT_NEW_CTYPE; PERL_UNUSED_ARG(newctype); PERL_UNUSED_CONTEXT; } @@ -577,6 +582,8 @@ Perl_mem_collxfrm(pTHX_ const char *s, STRLEN len, STRLEN *xlen) char *xbuf; STRLEN xAlloc, xin, xout; /* xalloc is a reserved word in VC */ + PERL_ARGS_ASSERT_MEM_COLLXFRM; + /* the first sizeof(collationix) bytes are used by sv_collxfrm(). */ /* the +1 is for the terminating NUL. */ diff --git a/malloc.c b/malloc.c index 7c78913..46a80a4 100644 --- a/malloc.c +++ b/malloc.c @@ -2361,6 +2361,9 @@ Perl_malloced_size(void *p) union overhead * const ovp = (union overhead *) ((caddr_t)p - sizeof (union overhead) * CHUNK_SHIFT); const int bucket = OV_INDEX(ovp); + + PERL_ARGS_ASSERT_MALLOCED_SIZE; + #ifdef RCHECK /* The caller wants to have a complete control over the chunk, disable the memory checking inside the chunk. */ @@ -2387,6 +2390,8 @@ Perl_get_mstats(pTHX_ perl_mstats_t *buf, int buflen, int level) register union overhead *p; struct chunk_chain_s* nextchain; + PERL_ARGS_ASSERT_GET_MSTATS; + buf->topbucket = buf->topbucket_ev = buf->topbucket_odd = buf->totfree = buf->total = buf->total_chain = 0; @@ -2446,6 +2451,8 @@ Perl_dump_mstats(pTHX_ char *s) UV nf[NBUCKETS]; UV nt[NBUCKETS]; + PERL_ARGS_ASSERT_DUMP_MSTATS; + buffer.nfree = nf; buffer.ntotal = nt; get_mstats(&buffer, NBUCKETS, 0); diff --git a/mathoms.c b/mathoms.c index 9e1c546..e0cefb0 100644 --- a/mathoms.c +++ b/mathoms.c @@ -92,6 +92,8 @@ being zero. See C. void Perl_sv_unref(pTHX_ SV *sv) { + PERL_ARGS_ASSERT_SV_UNREF; + sv_unref_flags(sv, 0); } @@ -105,6 +107,8 @@ Taint an SV. Use C instead. void Perl_sv_taint(pTHX_ SV *sv) { + PERL_ARGS_ASSERT_SV_TAINT; + sv_magic((sv), NULL, PERL_MAGIC_taint, NULL, 0); } @@ -166,6 +170,8 @@ Usually accessed via the C macro. char * Perl_sv_2pvbyte_nolen(pTHX_ register SV *sv) { + PERL_ARGS_ASSERT_SV_2PVBYTE_NOLEN; + return sv_2pvbyte(sv, NULL); } @@ -183,6 +189,8 @@ Usually accessed via the C macro. char * Perl_sv_2pvutf8_nolen(pTHX_ register SV *sv) { + PERL_ARGS_ASSERT_SV_2PVUTF8_NOLEN; + return sv_2pvutf8(sv, NULL); } @@ -199,6 +207,8 @@ an xpvmg. See also C. void Perl_sv_force_normal(pTHX_ register SV *sv) { + PERL_ARGS_ASSERT_SV_FORCE_NORMAL; + sv_force_normal_flags(sv, 0); } @@ -209,6 +219,8 @@ Perl_sv_force_normal(pTHX_ register SV *sv) void Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr) { + PERL_ARGS_ASSERT_SV_SETSV; + sv_setsv_flags(dstr, sstr, SV_GMAGIC); } @@ -219,6 +231,8 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr) void Perl_sv_catpvn(pTHX_ SV *dsv, const char* sstr, STRLEN slen) { + PERL_ARGS_ASSERT_SV_CATPVN; + sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC); } @@ -233,6 +247,8 @@ Like C, but also handles 'set' magic. void Perl_sv_catpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRLEN len) { + PERL_ARGS_ASSERT_SV_CATPVN_MG; + sv_catpvn_flags(sv,ptr,len,SV_GMAGIC|SV_SMAGIC); } @@ -243,6 +259,8 @@ Perl_sv_catpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRL void Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr) { + PERL_ARGS_ASSERT_SV_CATSV; + sv_catsv_flags(dstr, sstr, SV_GMAGIC); } @@ -257,6 +275,8 @@ Like C, but also handles 'set' magic. void Perl_sv_catsv_mg(pTHX_ SV *dsv, register SV *ssv) { + PERL_ARGS_ASSERT_SV_CATSV_MG; + sv_catsv_flags(dsv,ssv,SV_GMAGIC|SV_SMAGIC); } @@ -272,6 +292,8 @@ cope with complex macro expressions. Always use the macro instead. IV Perl_sv_iv(pTHX_ register SV *sv) { + PERL_ARGS_ASSERT_SV_IV; + if (SvIOK(sv)) { if (SvIsUV(sv)) return (IV)SvUVX(sv); @@ -292,6 +314,8 @@ cope with complex macro expressions. Always use the macro instead. UV Perl_sv_uv(pTHX_ register SV *sv) { + PERL_ARGS_ASSERT_SV_UV; + if (SvIOK(sv)) { if (SvIsUV(sv)) return SvUVX(sv); @@ -312,6 +336,8 @@ cope with complex macro expressions. Always use the macro instead. NV Perl_sv_nv(pTHX_ register SV *sv) { + PERL_ARGS_ASSERT_SV_NV; + if (SvNOK(sv)) return SvNVX(sv); return sv_2nv(sv); @@ -333,6 +359,8 @@ cope with complex macro expressions. Always use the macro instead. char * Perl_sv_pvn(pTHX_ SV *sv, STRLEN *lp) { + PERL_ARGS_ASSERT_SV_PVN; + if (SvPOK(sv)) { *lp = SvCUR(sv); return SvPVX(sv); @@ -344,6 +372,8 @@ Perl_sv_pvn(pTHX_ SV *sv, STRLEN *lp) char * Perl_sv_pvn_nomg(pTHX_ register SV *sv, STRLEN *lp) { + PERL_ARGS_ASSERT_SV_PVN_NOMG; + if (SvPOK(sv)) { *lp = SvCUR(sv); return SvPVX(sv); @@ -358,6 +388,8 @@ Perl_sv_pvn_nomg(pTHX_ register SV *sv, STRLEN *lp) char * Perl_sv_pv(pTHX_ SV *sv) { + PERL_ARGS_ASSERT_SV_PV; + if (SvPOK(sv)) return SvPVX(sv); @@ -371,6 +403,8 @@ Perl_sv_pv(pTHX_ SV *sv) char * Perl_sv_pvn_force(pTHX_ SV *sv, STRLEN *lp) { + PERL_ARGS_ASSERT_SV_PVN_FORCE; + return sv_pvn_force_flags(sv, lp, SV_GMAGIC); } @@ -381,6 +415,8 @@ Perl_sv_pvn_force(pTHX_ SV *sv, STRLEN *lp) char * Perl_sv_pvbyte(pTHX_ SV *sv) { + PERL_ARGS_ASSERT_SV_PVBYTE; + sv_utf8_downgrade(sv, FALSE); return sv_pv(sv); } @@ -402,6 +438,8 @@ instead. char * Perl_sv_pvbyten(pTHX_ SV *sv, STRLEN *lp) { + PERL_ARGS_ASSERT_SV_PVBYTEN; + sv_utf8_downgrade(sv, FALSE); return sv_pvn(sv,lp); } @@ -413,6 +451,8 @@ Perl_sv_pvbyten(pTHX_ SV *sv, STRLEN *lp) char * Perl_sv_pvutf8(pTHX_ SV *sv) { + PERL_ARGS_ASSERT_SV_PVUTF8; + sv_utf8_upgrade(sv); return sv_pv(sv); } @@ -434,6 +474,8 @@ instead. char * Perl_sv_pvutf8n(pTHX_ SV *sv, STRLEN *lp) { + PERL_ARGS_ASSERT_SV_PVUTF8N; + sv_utf8_upgrade(sv); return sv_pvn(sv,lp); } @@ -445,6 +487,8 @@ Perl_sv_pvutf8n(pTHX_ SV *sv, STRLEN *lp) STRLEN Perl_sv_utf8_upgrade(pTHX_ register SV *sv) { + PERL_ARGS_ASSERT_SV_UTF8_UPGRADE; + return sv_utf8_upgrade_flags(sv, SV_GMAGIC); } @@ -453,6 +497,13 @@ Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) { dTHXs; va_list(arglist); + + /* Easier to special case this here than in embed.pl. (Look at what it + generates for proto.h) */ +#ifdef PERL_IMPLICIT_CONTEXT + PERL_ARGS_ASSERT_FPRINTF_NOCONTEXT; +#endif + va_start(arglist, format); return PerlIO_vprintf(stream, format, arglist); } @@ -462,6 +513,11 @@ Perl_printf_nocontext(const char *format, ...) { dTHX; va_list(arglist); + +#ifdef PERL_IMPLICIT_CONTEXT + PERL_ARGS_ASSERT_PRINTF_NOCONTEXT; +#endif + va_start(arglist, format); return PerlIO_vprintf(PerlIO_stdout(), format, arglist); } @@ -487,6 +543,8 @@ Perl_huge(void) void Perl_gv_fullname(pTHX_ SV *sv, const GV *gv) { + PERL_ARGS_ASSERT_GV_FULLNAME; + gv_fullname3(sv, gv, sv == (const SV*)gv ? "*" : ""); } @@ -494,18 +552,24 @@ Perl_gv_fullname(pTHX_ SV *sv, const GV *gv) void Perl_gv_efullname(pTHX_ SV *sv, const GV *gv) { + PERL_ARGS_ASSERT_GV_EFULLNAME; + gv_efullname3(sv, gv, sv == (const SV*)gv ? "*" : ""); } void Perl_gv_fullname3(pTHX_ SV *sv, const GV *gv, const char *prefix) { + PERL_ARGS_ASSERT_GV_FULLNAME3; + gv_fullname4(sv, gv, prefix, TRUE); } void Perl_gv_efullname3(pTHX_ SV *sv, const GV *gv, const char *prefix) { + PERL_ARGS_ASSERT_GV_EFULLNAME3; + gv_efullname4(sv, gv, prefix, TRUE); } @@ -520,18 +584,24 @@ See L. GV * Perl_gv_fetchmethod(pTHX_ HV *stash, const char *name) { + PERL_ARGS_ASSERT_GV_FETCHMETHOD; + return gv_fetchmethod_autoload(stash, name, TRUE); } HE * Perl_hv_iternext(pTHX_ HV *hv) { + PERL_ARGS_ASSERT_HV_ITERNEXT; + return hv_iternext_flags(hv, 0); } void Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how) { + PERL_ARGS_ASSERT_HV_MAGIC; + sv_magic((SV*)hv, (SV*)gv, how, NULL, 0); } @@ -540,6 +610,9 @@ Perl_av_fake(pTHX_ register I32 size, register SV **strp) { register SV** ary; register AV * const av = (AV*)newSV_type(SVt_PVAV); + + PERL_ARGS_ASSERT_AV_FAKE; + Newx(ary,size+1,SV*); AvALLOC(av) = ary; Copy(strp,ary,size,SV*); @@ -559,6 +632,8 @@ bool Perl_do_open(pTHX_ GV *gv, register const char *name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp) { + PERL_ARGS_ASSERT_DO_OPEN; + return do_openn(gv, name, len, as_raw, rawmode, rawperm, supplied_fp, (SV **) NULL, 0); } @@ -569,6 +644,8 @@ as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs, I32 num_svs) { + PERL_ARGS_ASSERT_DO_OPEN9; + PERL_UNUSED_ARG(num_svs); return do_openn(gv, name, len, as_raw, rawmode, rawperm, supplied_fp, &svs, 1); @@ -581,6 +658,9 @@ Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode) * This is a stub for any XS code which might have been calling it. */ const char *name = ":raw"; + + PERL_ARGS_ASSERT_DO_BINMODE; + #ifdef PERLIO_USING_CRLF if (!(mode & O_BINARY)) name = ":crlf"; @@ -592,6 +672,8 @@ Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode) bool Perl_do_aexec(pTHX_ SV *really, register SV **mark, register SV **sp) { + PERL_ARGS_ASSERT_DO_AEXEC; + return do_aexec5(really, mark, sp, 0, 0); } #endif @@ -600,6 +682,8 @@ Perl_do_aexec(pTHX_ SV *really, register SV **mark, register SV **sp) bool Perl_do_exec(pTHX_ const char *cmd) { + PERL_ARGS_ASSERT_DO_EXEC; + return do_exec3(cmd,0,0); } #endif @@ -614,6 +698,8 @@ Perl_init_i18nl14n(pTHX_ int printwarn) OP * Perl_oopsCV(pTHX_ OP *o) { + PERL_ARGS_ASSERT_OOPSCV; + Perl_croak(aTHX_ "NOT IMPL LINE %d",__LINE__); /* STUB */ PERL_UNUSED_ARG(o); @@ -1046,12 +1132,16 @@ PP(pp_rv2hv) U8 * Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv) { + PERL_ARGS_ASSERT_UVUNI_TO_UTF8; + return Perl_uvuni_to_utf8_flags(aTHX_ d, uv, 0); } bool Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **ep) { + PERL_ARGS_ASSERT_IS_UTF8_STRING_LOC; + return is_utf8_string_loclen(s, len, ep, 0); } @@ -1098,6 +1188,9 @@ void Perl_save_long(pTHX_ long int *longp) { dVAR; + + PERL_ARGS_ASSERT_SAVE_LONG; + SSCHECK(3); SSPUSHLONG(*longp); SSPUSHPTR(longp); @@ -1108,6 +1201,9 @@ void Perl_save_iv(pTHX_ IV *ivp) { dVAR; + + PERL_ARGS_ASSERT_SAVE_IV; + SSCHECK(3); SSPUSHIV(*ivp); SSPUSHPTR(ivp); @@ -1118,6 +1214,9 @@ void Perl_save_nogv(pTHX_ GV *gv) { dVAR; + + PERL_ARGS_ASSERT_SAVE_NOGV; + SSCHECK(2); SSPUSHPTR(gv); SSPUSHINT(SAVEt_NSTAB); @@ -1129,6 +1228,8 @@ Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg) dVAR; register I32 i; + PERL_ARGS_ASSERT_SAVE_LIST; + for (i = 1; i <= maxsarg; i++) { register SV * const sv = newSV(0); sv_setsv(sv,sarg[i]); @@ -1150,6 +1251,8 @@ Like C, but also handles 'set' magic. void Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len) { + PERL_ARGS_ASSERT_SV_USEPVN_MG; + sv_usepvn_flags(sv,ptr,len, SV_SMAGIC); } @@ -1166,12 +1269,16 @@ magic. See C. void Perl_sv_usepvn(pTHX_ SV *sv, char *ptr, STRLEN len) { + PERL_ARGS_ASSERT_SV_USEPVN; + sv_usepvn_flags(sv,ptr,len, 0); } void Perl_cv_ckproto(pTHX_ const CV *cv, const GV *gv, const char *p) { + PERL_ARGS_ASSERT_CV_CKPROTO; + cv_ckproto_len(cv, gv, p, p ? strlen(p) : 0); } @@ -1188,6 +1295,8 @@ Perl_unpack_str(pTHX_ const char *pat, const char *patend, const char *s, const char *strbeg, const char *strend, char **new_s, I32 ocnt, U32 flags) { + PERL_ARGS_ASSERT_UNPACK_STR; + PERL_UNUSED_ARG(strbeg); PERL_UNUSED_ARG(new_s); PERL_UNUSED_ARG(ocnt); @@ -1207,6 +1316,8 @@ flags are not used. This call should not be used; use packlist instead. void Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *patend, register SV **beglist, SV **endlist, SV ***next_in_list, U32 flags) { + PERL_ARGS_ASSERT_PACK_CAT; + PERL_UNUSED_ARG(next_in_list); PERL_UNUSED_ARG(flags); @@ -1222,6 +1333,8 @@ Perl_hv_store_ent(pTHX_ HV *hv, SV *keysv, SV *val, U32 hash) bool Perl_hv_exists_ent(pTHX_ HV *hv, SV *keysv, U32 hash) { + PERL_ARGS_ASSERT_HV_EXISTS_ENT; + return hv_common(hv, keysv, NULL, 0, 0, HV_FETCH_ISEXISTS, 0, hash) ? TRUE : FALSE; } @@ -1229,6 +1342,8 @@ Perl_hv_exists_ent(pTHX_ HV *hv, SV *keysv, U32 hash) HE * Perl_hv_fetch_ent(pTHX_ HV *hv, SV *keysv, I32 lval, U32 hash) { + PERL_ARGS_ASSERT_HV_FETCH_ENT; + return (HE *)hv_common(hv, keysv, NULL, 0, 0, (lval ? HV_FETCH_LVALUE : 0), NULL, hash); } @@ -1236,6 +1351,8 @@ Perl_hv_fetch_ent(pTHX_ HV *hv, SV *keysv, I32 lval, U32 hash) SV * Perl_hv_delete_ent(pTHX_ HV *hv, SV *keysv, I32 flags, U32 hash) { + PERL_ARGS_ASSERT_HV_DELETE_ENT; + return (SV *) hv_common(hv, keysv, NULL, 0, 0, flags | HV_DELETE, NULL, hash); } @@ -1271,6 +1388,8 @@ Perl_hv_exists(pTHX_ HV *hv, const char *key, I32 klen_i32) STRLEN klen; int flags; + PERL_ARGS_ASSERT_HV_EXISTS; + if (klen_i32 < 0) { klen = -klen_i32; flags = HVhek_UTF8; @@ -1288,6 +1407,8 @@ Perl_hv_fetch(pTHX_ HV *hv, const char *key, I32 klen_i32, I32 lval) STRLEN klen; int flags; + PERL_ARGS_ASSERT_HV_FETCH; + if (klen_i32 < 0) { klen = -klen_i32; flags = HVhek_UTF8; @@ -1306,6 +1427,8 @@ Perl_hv_delete(pTHX_ HV *hv, const char *key, I32 klen_i32, I32 flags) STRLEN klen; int k_flags; + PERL_ARGS_ASSERT_HV_DELETE; + if (klen_i32 < 0) { klen = -klen_i32; k_flags = HVhek_UTF8; diff --git a/mg.c b/mg.c index b64a778..5cfcc46 100644 --- a/mg.c +++ b/mg.c @@ -85,6 +85,9 @@ S_save_magic(pTHX_ I32 mgs_ix, SV *sv) { dVAR; MGS* mgs; + + PERL_ARGS_ASSERT_SAVE_MAGIC; + assert(SvMAGICAL(sv)); /* Turning READONLY off for a copy-on-write scalar (including shared hash keys) is a bad idea. */ @@ -118,6 +121,7 @@ void Perl_mg_magical(pTHX_ SV *sv) { const MAGIC* mg; + PERL_ARGS_ASSERT_MG_MAGICAL; PERL_UNUSED_CONTEXT; for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) { const MGVTBL* const vtbl = mg->mg_virtual; @@ -138,6 +142,7 @@ Perl_mg_magical(pTHX_ SV *sv) STATIC bool S_is_container_magic(const MAGIC *mg) { + assert(mg); switch (mg->mg_type) { case PERL_MAGIC_bm: case PERL_MAGIC_fm: @@ -184,6 +189,8 @@ Perl_mg_get(pTHX_ SV *sv) /* guard against sv having being freed midway by holding a private reference. */ + PERL_ARGS_ASSERT_MG_GET; + /* sv_2mortal has this side effect of turning on the TEMP flag, which can cause the SV's buffer to get stolen (and maybe other stuff). So restore it. @@ -262,6 +269,8 @@ Perl_mg_set(pTHX_ SV *sv) MAGIC* mg; MAGIC* nextmg; + PERL_ARGS_ASSERT_MG_SET; + save_magic(mgs_ix, sv); for (mg = SvMAGIC(sv); mg; mg = nextmg) { @@ -296,6 +305,8 @@ Perl_mg_length(pTHX_ SV *sv) MAGIC* mg; STRLEN len; + PERL_ARGS_ASSERT_MG_LENGTH; + for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) { const MGVTBL * const vtbl = mg->mg_virtual; if (vtbl && vtbl->svt_len) { @@ -325,6 +336,8 @@ Perl_mg_size(pTHX_ SV *sv) { MAGIC* mg; + PERL_ARGS_ASSERT_MG_SIZE; + for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) { const MGVTBL* const vtbl = mg->mg_virtual; if (vtbl && vtbl->svt_len) { @@ -364,6 +377,8 @@ Perl_mg_clear(pTHX_ SV *sv) const I32 mgs_ix = SSNEW(sizeof(MGS)); MAGIC* mg; + PERL_ARGS_ASSERT_MG_CLEAR; + save_magic(mgs_ix, sv); for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) { @@ -413,6 +428,9 @@ Perl_mg_copy(pTHX_ SV *sv, SV *nsv, const char *key, I32 klen) { int count = 0; MAGIC* mg; + + PERL_ARGS_ASSERT_MG_COPY; + for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) { const MGVTBL* const vtbl = mg->mg_virtual; if ((mg->mg_flags & MGf_COPY) && vtbl->svt_copy){ @@ -450,6 +468,9 @@ Perl_mg_localize(pTHX_ SV *sv, SV *nsv) { dVAR; MAGIC *mg; + + PERL_ARGS_ASSERT_MG_LOCALIZE; + for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) { const MGVTBL* const vtbl = mg->mg_virtual; if (!S_is_container_magic(mg)) @@ -486,6 +507,9 @@ Perl_mg_free(pTHX_ SV *sv) { MAGIC* mg; MAGIC* moremagic; + + PERL_ARGS_ASSERT_MG_FREE; + for (mg = SvMAGIC(sv); mg; mg = moremagic) { const MGVTBL* const vtbl = mg->mg_virtual; moremagic = mg->mg_moremagic; @@ -514,6 +538,8 @@ Perl_magic_regdata_cnt(pTHX_ SV *sv, MAGIC *mg) dVAR; PERL_UNUSED_ARG(sv); + PERL_ARGS_ASSERT_MAGIC_REGDATA_CNT; + if (PL_curpm) { register const REGEXP * const rx = PM_GETRE(PL_curpm); if (rx) { @@ -540,6 +566,9 @@ int Perl_magic_regdatum_get(pTHX_ SV *sv, MAGIC *mg) { dVAR; + + PERL_ARGS_ASSERT_MAGIC_REGDATUM_GET; + if (PL_curpm) { register const REGEXP * const rx = PM_GETRE(PL_curpm); if (rx) { @@ -574,6 +603,7 @@ Perl_magic_regdatum_get(pTHX_ SV *sv, MAGIC *mg) int Perl_magic_regdatum_set(pTHX_ SV *sv, MAGIC *mg) { + PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET; PERL_UNUSED_ARG(sv); PERL_UNUSED_ARG(mg); Perl_croak(aTHX_ PL_no_modify); @@ -589,6 +619,8 @@ Perl_magic_len(pTHX_ SV *sv, MAGIC *mg) register const REGEXP * rx; const char * const remaining = mg->mg_ptr + 1; + PERL_ARGS_ASSERT_MAGIC_LEN; + switch (*mg->mg_ptr) { case '\020': if (*remaining == '\0') { /* ^P */ @@ -671,6 +703,8 @@ Perl_magic_len(pTHX_ SV *sv, MAGIC *mg) void Perl_emulate_cop_io(pTHX_ const COP *const c, SV *const sv) { + PERL_ARGS_ASSERT_EMULATE_COP_IO; + if (!(CopHINTS_get(c) & (HINT_LEXICAL_IO_IN|HINT_LEXICAL_IO_OUT))) sv_setsv(sv, &PL_sv_undef); else { @@ -704,6 +738,8 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) const char * const remaining = mg->mg_ptr + 1; const char nextchar = *remaining; + PERL_ARGS_ASSERT_MAGIC_GET; + switch (*mg->mg_ptr) { case '\001': /* ^A */ sv_setsv(sv, PL_bodytarget); @@ -1040,6 +1076,8 @@ Perl_magic_getuvar(pTHX_ SV *sv, MAGIC *mg) { struct ufuncs * const uf = (struct ufuncs *)mg->mg_ptr; + PERL_ARGS_ASSERT_MAGIC_GETUVAR; + if (uf && uf->uf_val) (*uf->uf_val)(aTHX_ uf->uf_index, sv); return 0; @@ -1054,6 +1092,8 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg) const char * const ptr = MgPV_const(mg,klen); my_setenv(ptr, s); + PERL_ARGS_ASSERT_MAGIC_SETENV; + #ifdef DYNAMIC_ENV_FETCH /* We just undefd an environment var. Is a replacement */ /* waiting in the wings? */ @@ -1133,6 +1173,7 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg) int Perl_magic_clearenv(pTHX_ SV *sv, MAGIC *mg) { + PERL_ARGS_ASSERT_MAGIC_CLEARENV; PERL_UNUSED_ARG(sv); my_setenv(MgPV_nolen_const(mg),NULL); return 0; @@ -1142,6 +1183,7 @@ int Perl_magic_set_all_env(pTHX_ SV *sv, MAGIC *mg) { dVAR; + PERL_ARGS_ASSERT_MAGIC_SET_ALL_ENV; PERL_UNUSED_ARG(mg); #if defined(VMS) Perl_die(aTHX_ "Can't make list assignment to %%ENV on this system"); @@ -1164,6 +1206,7 @@ int Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg) { dVAR; + PERL_ARGS_ASSERT_MAGIC_CLEAR_ALL_ENV; PERL_UNUSED_ARG(sv); PERL_UNUSED_ARG(mg); #if defined(VMS) @@ -1189,6 +1232,9 @@ Perl_magic_getsig(pTHX_ SV *sv, MAGIC *mg) dVAR; /* Are we fetching a signal entry? */ const I32 i = whichsig(MgPV_nolen_const(mg)); + + PERL_ARGS_ASSERT_MAGIC_GETSIG; + if (i > 0) { if(PL_psig_ptr[i]) sv_setsv(sv,PL_psig_ptr[i]); @@ -1221,6 +1267,7 @@ Perl_magic_clearsig(pTHX_ SV *sv, MAGIC *mg) */ dVAR; register const char * const s = MgPV_nolen_const(mg); + PERL_ARGS_ASSERT_MAGIC_CLEARSIG; PERL_UNUSED_ARG(sv); if (*s == '_') { SV** svp = NULL; @@ -1414,8 +1461,10 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg) sigset_t set, save; SV* save_sv; #endif - register const char *s = MgPV_const(mg,len); + + PERL_ARGS_ASSERT_MAGIC_SETSIG; + if (*s == '_') { if (strEQ(s,"__DIE__")) svp = &PL_diehook; @@ -1527,6 +1576,8 @@ Perl_magic_setisa(pTHX_ SV *sv, MAGIC *mg) { dVAR; HV* stash; + + PERL_ARGS_ASSERT_MAGIC_SETISA; PERL_UNUSED_ARG(sv); /* Bail out if destruction is going on */ @@ -1561,6 +1612,8 @@ Perl_magic_clearisa(pTHX_ SV *sv, MAGIC *mg) dVAR; HV* stash; + PERL_ARGS_ASSERT_MAGIC_CLEARISA; + /* Bail out if destruction is going on */ if(PL_dirty) return 0; @@ -1582,6 +1635,7 @@ int Perl_magic_setamagic(pTHX_ SV *sv, MAGIC *mg) { dVAR; + PERL_ARGS_ASSERT_MAGIC_SETAMAGIC; PERL_UNUSED_ARG(sv); PERL_UNUSED_ARG(mg); PL_amagic_generation++; @@ -1594,6 +1648,8 @@ Perl_magic_getnkeys(pTHX_ SV *sv, MAGIC *mg) { HV * const hv = (HV*)LvTARG(sv); I32 i = 0; + + PERL_ARGS_ASSERT_MAGIC_GETNKEYS; PERL_UNUSED_ARG(mg); if (hv) { @@ -1613,6 +1669,7 @@ Perl_magic_getnkeys(pTHX_ SV *sv, MAGIC *mg) int Perl_magic_setnkeys(pTHX_ SV *sv, MAGIC *mg) { + PERL_ARGS_ASSERT_MAGIC_SETNKEYS; PERL_UNUSED_ARG(mg); if (LvTARG(sv)) { hv_ksplit((HV*)LvTARG(sv), SvIV(sv)); @@ -1627,6 +1684,8 @@ S_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, const char *meth, I32 flags, int dVAR; dSP; + PERL_ARGS_ASSERT_MAGIC_METHCALL; + PUSHMARK(SP); EXTEND(SP, n); PUSHs(SvTIED_obj(sv, mg)); @@ -1654,6 +1713,8 @@ S_magic_methpack(pTHX_ SV *sv, const MAGIC *mg, const char *meth) { dVAR; dSP; + PERL_ARGS_ASSERT_MAGIC_METHPACK; + ENTER; SAVETMPS; PUSHSTACKi(PERLSI_MAGIC); @@ -1671,6 +1732,8 @@ S_magic_methpack(pTHX_ SV *sv, const MAGIC *mg, const char *meth) int Perl_magic_getpack(pTHX_ SV *sv, MAGIC *mg) { + PERL_ARGS_ASSERT_MAGIC_GETPACK; + if (mg->mg_ptr) mg->mg_flags |= MGf_GSKIP; magic_methpack(sv,mg,"FETCH"); @@ -1681,6 +1744,9 @@ int Perl_magic_setpack(pTHX_ SV *sv, MAGIC *mg) { dVAR; dSP; + + PERL_ARGS_ASSERT_MAGIC_SETPACK; + ENTER; PUSHSTACKi(PERLSI_MAGIC); magic_methcall(sv, mg, "STORE", G_SCALAR|G_DISCARD, 3, sv); @@ -1692,6 +1758,8 @@ Perl_magic_setpack(pTHX_ SV *sv, MAGIC *mg) int Perl_magic_clearpack(pTHX_ SV *sv, MAGIC *mg) { + PERL_ARGS_ASSERT_MAGIC_CLEARPACK; + return magic_methpack(sv,mg,"DELETE"); } @@ -1702,6 +1770,8 @@ Perl_magic_sizepack(pTHX_ SV *sv, MAGIC *mg) dVAR; dSP; I32 retval = 0; + PERL_ARGS_ASSERT_MAGIC_SIZEPACK; + ENTER; SAVETMPS; PUSHSTACKi(PERLSI_MAGIC); @@ -1722,6 +1792,8 @@ Perl_magic_wipepack(pTHX_ SV *sv, MAGIC *mg) { dVAR; dSP; + PERL_ARGS_ASSERT_MAGIC_WIPEPACK; + ENTER; PUSHSTACKi(PERLSI_MAGIC); PUSHMARK(SP); @@ -1740,6 +1812,8 @@ Perl_magic_nextpack(pTHX_ SV *sv, MAGIC *mg, SV *key) dVAR; dSP; const char * const meth = SvOK(key) ? "NEXTKEY" : "FIRSTKEY"; + PERL_ARGS_ASSERT_MAGIC_NEXTPACK; + ENTER; SAVETMPS; PUSHSTACKi(PERLSI_MAGIC); @@ -1762,6 +1836,8 @@ Perl_magic_nextpack(pTHX_ SV *sv, MAGIC *mg, SV *key) int Perl_magic_existspack(pTHX_ SV *sv, const MAGIC *mg) { + PERL_ARGS_ASSERT_MAGIC_EXISTSPACK; + return magic_methpack(sv,mg,"EXISTS"); } @@ -1773,6 +1849,8 @@ Perl_magic_scalarpack(pTHX_ HV *hv, MAGIC *mg) SV * const tied = SvTIED_obj((SV*)hv, mg); HV * const pkg = SvSTASH((SV*)SvRV(tied)); + PERL_ARGS_ASSERT_MAGIC_SCALARPACK; + if (!gv_fetchmethod_autoload(pkg, "SCALAR", FALSE)) { SV *key; if (HvEITER_get(hv)) @@ -1810,6 +1888,9 @@ Perl_magic_setdbline(pTHX_ SV *sv, MAGIC *mg) const I32 i = SvTRUE(sv); SV ** const svp = av_fetch(GvAV(gv), atoi(MgPV_nolen_const(mg)), FALSE); + + PERL_ARGS_ASSERT_MAGIC_SETDBLINE; + if (svp && SvIOKp(*svp)) { OP * const o = INT2PTR(OP*,SvIVX(*svp)); if (o) { @@ -1828,6 +1909,9 @@ Perl_magic_getarylen(pTHX_ SV *sv, const MAGIC *mg) { dVAR; const AV * const obj = (AV*)mg->mg_obj; + + PERL_ARGS_ASSERT_MAGIC_GETARYLEN; + if (obj) { sv_setiv(sv, AvFILL(obj) + CopARYBASE_get(PL_curcop)); } else { @@ -1841,6 +1925,9 @@ Perl_magic_setarylen(pTHX_ SV *sv, MAGIC *mg) { dVAR; AV * const obj = (AV*)mg->mg_obj; + + PERL_ARGS_ASSERT_MAGIC_SETARYLEN; + if (obj) { av_fill(obj, SvIV(sv) - CopARYBASE_get(PL_curcop)); } else { @@ -1855,7 +1942,10 @@ int Perl_magic_freearylen_p(pTHX_ SV *sv, MAGIC *mg) { dVAR; + + PERL_ARGS_ASSERT_MAGIC_FREEARYLEN_P; PERL_UNUSED_ARG(sv); + /* during global destruction, mg_obj may already have been freed */ if (PL_in_clean_all) return 0; @@ -1878,6 +1968,8 @@ Perl_magic_getpos(pTHX_ SV *sv, MAGIC *mg) { dVAR; SV* const lsv = LvTARG(sv); + + PERL_ARGS_ASSERT_MAGIC_GETPOS; PERL_UNUSED_ARG(mg); if (SvTYPE(lsv) >= SVt_PVMG && SvMAGIC(lsv)) { @@ -1904,6 +1996,7 @@ Perl_magic_setpos(pTHX_ SV *sv, MAGIC *mg) STRLEN ulen = 0; MAGIC* found; + PERL_ARGS_ASSERT_MAGIC_SETPOS; PERL_UNUSED_ARG(mg); if (SvTYPE(lsv) >= SVt_PVMG && SvMAGIC(lsv)) @@ -1962,6 +2055,8 @@ Perl_magic_getsubstr(pTHX_ SV *sv, MAGIC *mg) const char * const tmps = SvPV_const(lsv,len); I32 offs = LvTARGOFF(sv); I32 rem = LvTARGLEN(sv); + + PERL_ARGS_ASSERT_MAGIC_GETSUBSTR; PERL_UNUSED_ARG(mg); if (SvUTF8(lsv)) @@ -1985,6 +2080,8 @@ Perl_magic_setsubstr(pTHX_ SV *sv, MAGIC *mg) SV * const lsv = LvTARG(sv); I32 lvoff = LvTARGOFF(sv); I32 lvlen = LvTARGLEN(sv); + + PERL_ARGS_ASSERT_MAGIC_SETSUBSTR; PERL_UNUSED_ARG(mg); if (DO_UTF8(sv)) { @@ -2015,7 +2112,10 @@ int Perl_magic_gettaint(pTHX_ SV *sv, MAGIC *mg) { dVAR; + + PERL_ARGS_ASSERT_MAGIC_GETTAINT; PERL_UNUSED_ARG(sv); + TAINT_IF((PL_localizing != 1) && (mg->mg_len & 1)); return 0; } @@ -2024,7 +2124,10 @@ int Perl_magic_settaint(pTHX_ SV *sv, MAGIC *mg) { dVAR; + + PERL_ARGS_ASSERT_MAGIC_SETTAINT; PERL_UNUSED_ARG(sv); + /* update taint status */ if (PL_tainted) mg->mg_len |= 1; @@ -2037,6 +2140,8 @@ int Perl_magic_getvec(pTHX_ SV *sv, MAGIC *mg) { SV * const lsv = LvTARG(sv); + + PERL_ARGS_ASSERT_MAGIC_GETVEC; PERL_UNUSED_ARG(mg); if (lsv) @@ -2050,6 +2155,7 @@ Perl_magic_getvec(pTHX_ SV *sv, MAGIC *mg) int Perl_magic_setvec(pTHX_ SV *sv, MAGIC *mg) { + PERL_ARGS_ASSERT_MAGIC_SETVEC; PERL_UNUSED_ARG(mg); do_vecset(sv); /* XXX slurp this routine */ return 0; @@ -2060,6 +2166,9 @@ Perl_magic_getdefelem(pTHX_ SV *sv, MAGIC *mg) { dVAR; SV *targ = NULL; + + PERL_ARGS_ASSERT_MAGIC_GETDEFELEM; + if (LvTARGLEN(sv)) { if (mg->mg_obj) { SV * const ahv = LvTARG(sv); @@ -2091,6 +2200,7 @@ Perl_magic_getdefelem(pTHX_ SV *sv, MAGIC *mg) int Perl_magic_setdefelem(pTHX_ SV *sv, MAGIC *mg) { + PERL_ARGS_ASSERT_MAGIC_SETDEFELEM; PERL_UNUSED_ARG(mg); if (LvTARGLEN(sv)) vivify_defelem(sv); @@ -2108,6 +2218,8 @@ Perl_vivify_defelem(pTHX_ SV *sv) MAGIC *mg; SV *value = NULL; + PERL_ARGS_ASSERT_VIVIFY_DEFELEM; + if (!LvTARGLEN(sv) || !(mg = mg_find(sv, PERL_MAGIC_defelem))) return; if (mg->mg_obj) { @@ -2140,12 +2252,14 @@ Perl_vivify_defelem(pTHX_ SV *sv) int Perl_magic_killbackrefs(pTHX_ SV *sv, MAGIC *mg) { + PERL_ARGS_ASSERT_MAGIC_KILLBACKREFS; return Perl_sv_kill_backrefs(aTHX_ sv, (AV*)mg->mg_obj); } int Perl_magic_setmglob(pTHX_ SV *sv, MAGIC *mg) { + PERL_ARGS_ASSERT_MAGIC_SETMGLOB; PERL_UNUSED_CONTEXT; mg->mg_len = -1; SvSCREAM_off(sv); @@ -2157,6 +2271,8 @@ Perl_magic_setuvar(pTHX_ SV *sv, MAGIC *mg) { const struct ufuncs * const uf = (struct ufuncs *)mg->mg_ptr; + PERL_ARGS_ASSERT_MAGIC_SETUVAR; + if (uf && uf->uf_set) (*uf->uf_set)(aTHX_ uf->uf_index, sv); return 0; @@ -2166,6 +2282,9 @@ int Perl_magic_setregexp(pTHX_ SV *sv, MAGIC *mg) { const char type = mg->mg_type; + + PERL_ARGS_ASSERT_MAGIC_SETREGEXP; + if (type == PERL_MAGIC_qr) { } else if (type == PERL_MAGIC_bm) { SvTAIL_off(sv); @@ -2181,6 +2300,8 @@ Perl_magic_setregexp(pTHX_ SV *sv, MAGIC *mg) int Perl_magic_setcollxfrm(pTHX_ SV *sv, MAGIC *mg) { + PERL_ARGS_ASSERT_MAGIC_SETCOLLXFRM; + /* * RenE Descartes said "I think not." * and vanished with a faint plop. @@ -2200,6 +2321,7 @@ Perl_magic_setcollxfrm(pTHX_ SV *sv, MAGIC *mg) int Perl_magic_setutf8(pTHX_ SV *sv, MAGIC *mg) { + PERL_ARGS_ASSERT_MAGIC_SETUTF8; PERL_UNUSED_CONTEXT; PERL_UNUSED_ARG(sv); Safefree(mg->mg_ptr); /* The mg_ptr holds the pos cache. */ @@ -2219,6 +2341,8 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) I32 i; STRLEN len; + PERL_ARGS_ASSERT_MAGIC_SET; + switch (*mg->mg_ptr) { case '\015': /* $^MATCH */ if (strEQ(remaining, "ATCH")) @@ -2742,6 +2866,8 @@ I32 Perl_whichsig(pTHX_ const char *sig) { register char* const* sigv; + + PERL_ARGS_ASSERT_WHICHSIG; PERL_UNUSED_CONTEXT; for (sigv = (char* const*)PL_sig_name; *sigv; sigv++) @@ -2965,6 +3091,8 @@ S_unwind_handler_stack(pTHX_ const void *p) dVAR; const U32 flags = *(const U32*)p; + PERL_ARGS_ASSERT_UNWIND_HANDLER_STACK; + if (flags & 1) PL_savestack_ix -= 5; /* Unprotect save in progress. */ #if !defined(PERL_IMPLICIT_CONTEXT) @@ -2990,6 +3118,8 @@ Perl_magic_sethint(pTHX_ SV *sv, MAGIC *mg) SV *key = (mg->mg_len == HEf_SVKEY) ? (SV *)mg->mg_ptr : newSVpvn_flags(mg->mg_ptr, mg->mg_len, SVs_TEMP); + PERL_ARGS_ASSERT_MAGIC_SETHINT; + /* mg->mg_obj isn't being used. If needed, it would be possible to store an alternative leaf in there, with PL_compiling.cop_hints being used if it's NULL. If needed for threads, the alternative could lock a mutex, @@ -3016,6 +3146,8 @@ int Perl_magic_clearhint(pTHX_ SV *sv, MAGIC *mg) { dVAR; + + PERL_ARGS_ASSERT_MAGIC_CLEARHINT; PERL_UNUSED_ARG(sv); assert(mg->mg_len == HEf_SVKEY); diff --git a/mro.c b/mro.c index 77112e1..83872dc 100644 --- a/mro.c +++ b/mro.c @@ -54,7 +54,7 @@ Perl_mro_meta_init(pTHX_ HV* stash) { struct mro_meta* newmeta; - assert(stash); + PERL_ARGS_ASSERT_MRO_META_INIT; assert(HvAUX(stash)); assert(!(HvAUX(stash)->xhv_mro_meta)); Newxz(newmeta, 1, struct mro_meta); @@ -74,7 +74,7 @@ Perl_mro_meta_dup(pTHX_ struct mro_meta* smeta, CLONE_PARAMS* param) { struct mro_meta* newmeta; - assert(smeta); + PERL_ARGS_ASSERT_MRO_META_DUP; Newx(newmeta, 1, struct mro_meta); Copy(smeta, newmeta, 1, struct mro_meta); @@ -120,7 +120,7 @@ S_mro_get_linear_isa_dfs(pTHX_ HV *stash, I32 level) const HEK* stashhek; struct mro_meta* meta; - assert(stash); + PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA_DFS; assert(HvAUX(stash)); stashhek = HvNAME_HEK(stash); @@ -234,7 +234,7 @@ S_mro_get_linear_isa_c3(pTHX_ HV* stash, I32 level) const HEK* stashhek; struct mro_meta* meta; - assert(stash); + PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA_C3; assert(HvAUX(stash)); stashhek = HvNAME_HEK(stash); @@ -447,7 +447,7 @@ Perl_mro_get_linear_isa(pTHX_ HV *stash) { struct mro_meta* meta; - assert(stash); + PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA; if(!SvOOK(stash)) Perl_croak(aTHX_ "Can't linearize anonymous symbol table"); @@ -481,6 +481,8 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash) const char * const stashname = HvNAME_get(stash); const STRLEN stashname_len = HvNAMELEN_get(stash); + PERL_ARGS_ASSERT_MRO_ISA_CHANGED_IN; + if(!stashname) Perl_croak(aTHX_ "Can't call mro_isa_changed_in() on anonymous symbol table"); @@ -618,6 +620,8 @@ Perl_mro_method_changed_in(pTHX_ HV *stash) SV ** const svp = hv_fetch(PL_isarev, stashname, stashname_len, 0); HV * const isarev = svp ? (HV*)*svp : NULL; + PERL_ARGS_ASSERT_MRO_METHOD_CHANGED_IN; + if(!stashname) Perl_croak(aTHX_ "Can't call mro_method_changed_in() on anonymous symbol table"); diff --git a/numeric.c b/numeric.c index b3355a4..761239a 100644 --- a/numeric.c +++ b/numeric.c @@ -132,7 +132,8 @@ number may use '_' characters to separate digits. */ UV -Perl_grok_bin(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) { +Perl_grok_bin(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) +{ const char *s = start; STRLEN len = *len_p; UV value = 0; @@ -143,6 +144,8 @@ Perl_grok_bin(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) { bool overflowed = FALSE; char bit; + PERL_ARGS_ASSERT_GROK_BIN; + if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) { /* strip off leading b or 0b. for compatibility silently suffer "b" and "0b" as valid binary @@ -248,17 +251,19 @@ number may use '_' characters to separate digits. */ UV -Perl_grok_hex(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) { +Perl_grok_hex(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) +{ dVAR; const char *s = start; STRLEN len = *len_p; UV value = 0; NV value_nv = 0; - const UV max_div_16 = UV_MAX / 16; const bool allow_underscores = (bool)(*flags & PERL_SCAN_ALLOW_UNDERSCORES); bool overflowed = FALSE; + PERL_ARGS_ASSERT_GROK_HEX; + if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) { /* strip off leading x or 0x. for compatibility silently suffer "x" and "0x" as valid hex numbers. @@ -363,16 +368,18 @@ number may use '_' characters to separate digits. */ UV -Perl_grok_oct(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) { +Perl_grok_oct(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) +{ const char *s = start; STRLEN len = *len_p; UV value = 0; NV value_nv = 0; - const UV max_div_8 = UV_MAX / 8; const bool allow_underscores = (bool)(*flags & PERL_SCAN_ALLOW_UNDERSCORES); bool overflowed = FALSE; + PERL_ARGS_ASSERT_GROK_OCT; + for (; len-- && *s; s++) { /* gcc 2.95 optimiser not smart enough to figure that this subtraction out front allows slicker code. */ @@ -465,6 +472,8 @@ Perl_scan_bin(pTHX_ const char *start, STRLEN len, STRLEN *retlen) I32 flags = *retlen ? PERL_SCAN_ALLOW_UNDERSCORES : 0; const UV ruv = grok_bin (start, &len, &flags, &rnv); + PERL_ARGS_ASSERT_SCAN_BIN; + *retlen = len; return (flags & PERL_SCAN_GREATER_THAN_UV_MAX) ? rnv : (NV)ruv; } @@ -476,6 +485,8 @@ Perl_scan_oct(pTHX_ const char *start, STRLEN len, STRLEN *retlen) I32 flags = *retlen ? PERL_SCAN_ALLOW_UNDERSCORES : 0; const UV ruv = grok_oct (start, &len, &flags, &rnv); + PERL_ARGS_ASSERT_SCAN_OCT; + *retlen = len; return (flags & PERL_SCAN_GREATER_THAN_UV_MAX) ? rnv : (NV)ruv; } @@ -487,6 +498,8 @@ Perl_scan_hex(pTHX_ const char *start, STRLEN len, STRLEN *retlen) I32 flags = *retlen ? PERL_SCAN_ALLOW_UNDERSCORES : 0; const UV ruv = grok_hex (start, &len, &flags, &rnv); + PERL_ARGS_ASSERT_SCAN_HEX; + *retlen = len; return (flags & PERL_SCAN_GREATER_THAN_UV_MAX) ? rnv : (NV)ruv; } @@ -503,6 +516,9 @@ Perl_grok_numeric_radix(pTHX_ const char **sp, const char *send) { #ifdef USE_LOCALE_NUMERIC dVAR; + + PERL_ARGS_ASSERT_GROK_NUMERIC_RADIX; + if (PL_numeric_radix_sv && IN_LOCALE) { STRLEN len; const char * const radix = SvPV(PL_numeric_radix_sv, len); @@ -514,6 +530,9 @@ Perl_grok_numeric_radix(pTHX_ const char **sp, const char *send) /* always try "." if numeric radix didn't match because * we may have data from different locales mixed */ #endif + + PERL_ARGS_ASSERT_GROK_NUMERIC_RADIX; + if (*sp < send && **sp == '.') { ++*sp; return TRUE; @@ -555,6 +574,8 @@ Perl_grok_number(pTHX_ const char *pv, STRLEN len, UV *valuep) int sawinf = 0; int sawnan = 0; + PERL_ARGS_ASSERT_GROK_NUMBER; + while (s < send && isSPACE(*s)) s++; if (s == send) { @@ -809,6 +830,9 @@ Perl_my_atof(pTHX_ const char* s) NV x = 0.0; #ifdef USE_LOCALE_NUMERIC dVAR; + + PERL_ARGS_ASSERT_MY_ATOF; + if (PL_numeric_local && IN_LOCALE) { NV y; @@ -848,6 +872,8 @@ Perl_my_atof2(pTHX_ const char* orig, NV* value) I32 old_digit = 0; I32 sig_digits = 0; /* noof significant digits seen so far */ + PERL_ARGS_ASSERT_MY_ATOF2; + /* There is no point in processing more significant digits * than the NV can hold. Note that NV_DIG is a lower-bound value, * while we need an upper-bound value. We add 2 to account for this; diff --git a/op.c b/op.c index e82e29a..f38ce49 100644 --- a/op.c +++ b/op.c @@ -210,6 +210,9 @@ S_Slab_to_rw(pTHX_ void *op) { I32 * const * const ptr = (I32 **) op; I32 * const slab = ptr[-1]; + + PERL_ARGS_ASSERT_SLAB_TO_RW; + assert( ptr-1 > (I32 **) slab ); assert( ptr < ( (I32 **) slab + PERL_SLAB_SIZE) ); assert( *slab > 0 ); @@ -233,6 +236,7 @@ Perl_op_refcnt_inc(pTHX_ OP *o) PADOFFSET Perl_op_refcnt_dec(pTHX_ OP *o) { + PERL_ARGS_ASSERT_OP_REFCNT_DEC; Slab_to_rw(o); return --o->op_targ; } @@ -245,6 +249,7 @@ Perl_Slab_Free(pTHX_ void *op) { I32 * const * const ptr = (I32 **) op; I32 * const slab = ptr[-1]; + PERL_ARGS_ASSERT_SLAB_FREE; assert( ptr-1 > (I32 **) slab ); assert( ptr < ( (I32 **) slab + PERL_SLAB_SIZE) ); assert( *slab > 0 ); @@ -304,6 +309,9 @@ STATIC const char* S_gv_ename(pTHX_ GV *gv) { SV* const tmpsv = sv_newmortal(); + + PERL_ARGS_ASSERT_GV_ENAME; + gv_efullname3(tmpsv, gv, NULL); return SvPV_nolen_const(tmpsv); } @@ -311,6 +319,8 @@ S_gv_ename(pTHX_ GV *gv) STATIC OP * S_no_fh_allowed(pTHX_ OP *o) { + PERL_ARGS_ASSERT_NO_FH_ALLOWED; + yyerror(Perl_form(aTHX_ "Missing comma after first argument to %s function", OP_DESC(o))); return o; @@ -319,6 +329,8 @@ S_no_fh_allowed(pTHX_ OP *o) STATIC OP * S_too_few_arguments(pTHX_ OP *o, const char *name) { + PERL_ARGS_ASSERT_TOO_FEW_ARGUMENTS; + yyerror(Perl_form(aTHX_ "Not enough arguments for %s", name)); return o; } @@ -326,6 +338,8 @@ S_too_few_arguments(pTHX_ OP *o, const char *name) STATIC OP * S_too_many_arguments(pTHX_ OP *o, const char *name) { + PERL_ARGS_ASSERT_TOO_MANY_ARGUMENTS; + yyerror(Perl_form(aTHX_ "Too many arguments for %s", name)); return o; } @@ -333,6 +347,8 @@ S_too_many_arguments(pTHX_ OP *o, const char *name) STATIC void S_bad_type(pTHX_ I32 n, const char *t, const char *name, const OP *kid) { + PERL_ARGS_ASSERT_BAD_TYPE; + yyerror(Perl_form(aTHX_ "Type of arg %d to %s must be %s (not %s)", (int)n, name, t, OP_DESC(kid))); } @@ -340,6 +356,8 @@ S_bad_type(pTHX_ I32 n, const char *t, const char *name, const OP *kid) STATIC void S_no_bareword_allowed(pTHX_ const OP *o) { + PERL_ARGS_ASSERT_NO_BAREWORD_ALLOWED; + if (PL_madskills) return; /* various ok barewords are hidden in extra OP_NULL */ qerror(Perl_mess(aTHX_ @@ -356,6 +374,8 @@ Perl_allocmy(pTHX_ const char *const name) PADOFFSET off; const bool is_our = (PL_parser->in_my == KEY_our); + PERL_ARGS_ASSERT_ALLOCMY; + /* complain about "my $" etc etc */ if (*name && !(is_our || @@ -506,6 +526,9 @@ Perl_op_clear(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_OP_CLEAR; + #ifdef PERL_MAD /* if (o->op_madprop && o->op_madprop->mad_next) abort(); */ @@ -646,6 +669,8 @@ clear_pmop: STATIC void S_cop_free(pTHX_ COP* cop) { + PERL_ARGS_ASSERT_COP_FREE; + CopLABEL_free(cop); CopFILE_free(cop); CopSTASH_free(cop); @@ -662,6 +687,9 @@ S_forget_pmop(pTHX_ PMOP *const o ) { HV * const pmstash = PmopSTASH(o); + + PERL_ARGS_ASSERT_FORGET_PMOP; + if (pmstash && !SvIS_FREED(pmstash)) { MAGIC * const mg = mg_find((SV*)pmstash, PERL_MAGIC_symtab); if (mg) { @@ -697,6 +725,8 @@ S_forget_pmop(pTHX_ PMOP *const o STATIC void S_find_and_forget_pmops(pTHX_ OP *o) { + PERL_ARGS_ASSERT_FIND_AND_FORGET_PMOPS; + if (o->op_flags & OPf_KIDS) { OP *kid = cUNOPo->op_first; while (kid) { @@ -717,6 +747,9 @@ void Perl_op_null(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_OP_NULL; + if (o->op_type == OP_NULL) return; if (!PL_madskills) @@ -751,6 +784,8 @@ Perl_linklist(pTHX_ OP *o) { OP *first; + PERL_ARGS_ASSERT_LINKLIST; + if (o->op_next) return o->op_next; @@ -791,6 +826,9 @@ STATIC OP * S_scalarboolean(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_SCALARBOOLEAN; + if (o->op_type == OP_SASSIGN && cBINOPo->op_first->op_type == OP_CONST) { if (ckWARN(WARN_SYNTAX)) { const line_t oldline = CopLINE(PL_curcop); @@ -885,6 +923,8 @@ Perl_scalarvoid(pTHX_ OP *o) SV* sv; U8 want; + PERL_ARGS_ASSERT_SCALARVOID; + /* trailing mad null ops don't count as "there" for void processing */ if (PL_madskills && o->op_type != OP_NULL && @@ -1627,6 +1667,8 @@ Perl_mod(pTHX_ OP *o, I32 type) STATIC bool S_scalar_mod_type(const OP *o, I32 type) { + PERL_ARGS_ASSERT_SCALAR_MOD_TYPE; + switch (type) { case OP_SASSIGN: if (o->op_type == OP_RV2GV) @@ -1675,6 +1717,8 @@ S_scalar_mod_type(const OP *o, I32 type) STATIC bool S_is_handle_constructor(const OP *o, I32 numargs) { + PERL_ARGS_ASSERT_IS_HANDLE_CONSTRUCTOR; + switch (o->op_type) { case OP_PIPE_OP: case OP_SOCKPAIR: @@ -1712,6 +1756,8 @@ Perl_doref(pTHX_ OP *o, I32 type, bool set_op_ref) dVAR; OP *kid; + PERL_ARGS_ASSERT_DOREF; + if (!o || (PL_parser && PL_parser->error_count)) return o; @@ -1803,6 +1849,8 @@ S_dup_attrlist(pTHX_ OP *o) dVAR; OP *rop; + PERL_ARGS_ASSERT_DUP_ATTRLIST; + /* An attrlist is either a simple OP_CONST or an OP_LIST with kids, * where the first kid is OP_PUSHMARK and the remaining ones * are OP_CONST. We need to push the OP_CONST values. @@ -1832,6 +1880,8 @@ S_apply_attrs(pTHX_ HV *stash, SV *target, OP *attrs, bool for_my) dVAR; SV *stashsv; + PERL_ARGS_ASSERT_APPLY_ATTRS; + /* fake up C */ ENTER; /* need to protect against side-effects of 'use' */ stashsv = stash ? newSVhek(HvNAME_HEK(stash)) : &PL_sv_no; @@ -1869,6 +1919,8 @@ S_apply_attrs_my(pTHX_ HV *stash, OP *target, OP *attrs, OP **imopsp) OP *pack, *imop, *arg; SV *meth, *stashsv; + PERL_ARGS_ASSERT_APPLY_ATTRS_MY; + if (!attrs) return; @@ -1929,6 +1981,8 @@ Perl_apply_attrs_string(pTHX_ const char *stashpv, CV *cv, { OP *attrs = NULL; + PERL_ARGS_ASSERT_APPLY_ATTRS_STRING; + if (!len) { len = strlen(attrstr); } @@ -1960,6 +2014,8 @@ S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp) dVAR; I32 type; + PERL_ARGS_ASSERT_MY_KID; + if (!o || (PL_parser && PL_parser->error_count)) return o; @@ -2039,6 +2095,8 @@ Perl_my_attrs(pTHX_ OP *o, OP *attrs) OP *rops; int maybe_scalar = 0; + PERL_ARGS_ASSERT_MY_ATTRS; + /* [perl #17376]: this appears to be premature, and results in code such as C< our(%x); > executing in list mode rather than void mode */ #if 0 @@ -2069,6 +2127,8 @@ Perl_my_attrs(pTHX_ OP *o, OP *attrs) OP * Perl_my(pTHX_ OP *o) { + PERL_ARGS_ASSERT_MY; + return my_attrs(o, NULL); } @@ -2089,6 +2149,8 @@ Perl_bind_match(pTHX_ I32 type, OP *left, OP *right) const OPCODE ltype = left->op_type; const OPCODE rtype = right->op_type; + PERL_ARGS_ASSERT_BIND_MATCH; + if ( (ltype == OP_RV2AV || ltype == OP_RV2HV || ltype == OP_PADAV || ltype == OP_PADHV) && ckWARN(WARN_MISC)) { @@ -2224,6 +2286,9 @@ void Perl_newPROG(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_NEWPROG; + if (PL_in_eval) { if (PL_eval_root) return; @@ -2271,6 +2336,9 @@ OP * Perl_localize(pTHX_ OP *o, I32 lex) { dVAR; + + PERL_ARGS_ASSERT_LOCALIZE; + if (o->op_flags & OPf_PARENS) /* [perl #17376]: this appears to be premature, and results in code such as C< our(%x); > executing in list mode rather than void mode */ @@ -2329,6 +2397,8 @@ Perl_localize(pTHX_ OP *o, I32 lex) OP * Perl_jmaybe(pTHX_ OP *o) { + PERL_ARGS_ASSERT_JMAYBE; + if (o->op_type == OP_LIST) { OP * const o2 = newSVREF(newGVOP(OP_GV, 0, gv_fetchpvs(";", GV_ADD|GV_NOTQUAL, SVt_PV))); @@ -2352,6 +2422,8 @@ Perl_fold_constants(pTHX_ register OP *o) SV * const olddiehook = PL_diehook; dJMPENV; + PERL_ARGS_ASSERT_FOLD_CONSTANTS; + if (PL_opargs[type] & OA_RETSCALAR) scalar(o); if (PL_opargs[type] & OA_TARGET && !o->op_targ) @@ -2644,6 +2716,8 @@ Perl_newTOKEN(pTHX_ I32 optype, YYSTYPE lval, MADPROP* madprop) void Perl_token_free(pTHX_ TOKEN* tk) { + PERL_ARGS_ASSERT_TOKEN_FREE; + if (tk->tk_type != 12345) return; mad_free(tk->tk_mad); @@ -2655,6 +2729,9 @@ Perl_token_getmad(pTHX_ TOKEN* tk, OP* o, char slot) { MADPROP* mp; MADPROP* tm; + + PERL_ARGS_ASSERT_TOKEN_GETMAD; + if (tk->tk_type != 12345) { Perl_warner(aTHX_ packWARN(WARN_MISC), "Invalid TOKEN object ignored"); @@ -2818,6 +2895,8 @@ Perl_addmad(pTHX_ MADPROP* tm, MADPROP** root, char slot) MADPROP * Perl_newMADsv(pTHX_ char key, SV* sv) { + PERL_ARGS_ASSERT_NEWMADSV; + return newMADPROP(key, MAD_SV, sv, 0); } @@ -3035,6 +3114,9 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl) const I32 squash = o->op_private & OPpTRANS_SQUASH; I32 del = o->op_private & OPpTRANS_DELETE; SV* swash; + + PERL_ARGS_ASSERT_PMTRANS; + PL_hints |= HINT_BLOCK_SCOPE; if (SvUTF8(tstr)) @@ -3411,6 +3493,8 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg) OP* repl = NULL; bool reglist; + PERL_ARGS_ASSERT_PMRUNTIME; + if (o->op_type == OP_SUBST || o->op_type == OP_TRANS) { /* last element in list is the replacement; pop it */ OP* kid; @@ -3590,6 +3674,9 @@ Perl_newSVOP(pTHX_ I32 type, I32 flags, SV *sv) { dVAR; SVOP *svop; + + PERL_ARGS_ASSERT_NEWSVOP; + NewOp(1101, svop, 1, SVOP); svop->op_type = (OPCODE)type; svop->op_ppaddr = PL_ppaddr[type]; @@ -3609,6 +3696,9 @@ Perl_newPADOP(pTHX_ I32 type, I32 flags, SV *sv) { dVAR; PADOP *padop; + + PERL_ARGS_ASSERT_NEWPADOP; + NewOp(1101, padop, 1, PADOP); padop->op_type = (OPCODE)type; padop->op_ppaddr = PL_ppaddr[type]; @@ -3631,7 +3721,9 @@ OP * Perl_newGVOP(pTHX_ I32 type, I32 flags, GV *gv) { dVAR; - assert(gv); + + PERL_ARGS_ASSERT_NEWGVOP; + #ifdef USE_ITHREADS GvIN_PAD_on(gv); return newPADOP(type, flags, SvREFCNT_inc_simple_NN(gv)); @@ -3671,6 +3763,8 @@ Perl_package(pTHX_ OP *o) OP *pegop; #endif + PERL_ARGS_ASSERT_PACKAGE; + save_hptr(&PL_curstash); save_item(PL_curstname); @@ -3711,6 +3805,8 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg) OP *pegop = newOP(OP_NULL,0); #endif + PERL_ARGS_ASSERT_UTILIZE; + if (idop->op_type != OP_CONST) Perl_croak(aTHX_ "Module name must be constant"); @@ -3838,6 +3934,9 @@ void Perl_load_module(pTHX_ U32 flags, SV *name, SV *ver, ...) { va_list args; + + PERL_ARGS_ASSERT_LOAD_MODULE; + va_start(args, ver); vload_module(flags, name, ver, &args); va_end(args); @@ -3849,6 +3948,7 @@ Perl_load_module_nocontext(U32 flags, SV *name, SV *ver, ...) { dTHX; va_list args; + PERL_ARGS_ASSERT_LOAD_MODULE_NOCONTEXT; va_start(args, ver); vload_module(flags, name, ver, &args); va_end(args); @@ -3860,8 +3960,10 @@ Perl_vload_module(pTHX_ U32 flags, SV *name, SV *ver, va_list *args) { dVAR; OP *veop, *imop; - OP * const modname = newSVOP(OP_CONST, 0, name); + + PERL_ARGS_ASSERT_VLOAD_MODULE; + modname->op_private |= OPpCONST_BARE; if (ver) { veop = newSVOP(OP_CONST, 0, ver); @@ -3905,6 +4007,8 @@ Perl_dofile(pTHX_ OP *term, I32 force_builtin) OP *doop; GV *gv = NULL; + PERL_ARGS_ASSERT_DOFILE; + if (!force_builtin) { gv = gv_fetchpvs("do", GV_NOTQUAL, SVt_PVCV); if (!(gv && GvCVu(gv) && GvIMPORTED_CV(gv))) { @@ -4295,6 +4399,9 @@ OP * Perl_newLOGOP(pTHX_ I32 type, I32 flags, OP *first, OP *other) { dVAR; + + PERL_ARGS_ASSERT_NEWLOGOP; + return new_logop(type, flags, &first, &other); } @@ -4307,6 +4414,8 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp) OP *first = *firstp; OP * const other = *otherp; + PERL_ARGS_ASSERT_NEW_LOGOP; + if (type == OP_XOR) /* Not short circuit, but here by precedence. */ return newBINOP(type, flags, scalar(first), scalar(other)); @@ -4457,6 +4566,8 @@ Perl_newCONDOP(pTHX_ I32 flags, OP *first, OP *trueop, OP *falseop) OP *start; OP *o; + PERL_ARGS_ASSERT_NEWCONDOP; + if (!falseop) return newLOGOP(OP_AND, 0, first, trueop); if (!trueop) @@ -4519,6 +4630,8 @@ Perl_newRANGE(pTHX_ I32 flags, OP *left, OP *right) OP *leftstart; OP *o; + PERL_ARGS_ASSERT_NEWRANGE; + NewOp(1101, range, 1, LOGOP); range->op_type = OP_RANGE; @@ -4730,6 +4843,8 @@ Perl_newFOROP(pTHX_ I32 flags, char *label, line_t forline, OP *sv, OP *expr, OP I32 iterpflags = 0; OP *madsv = NULL; + PERL_ARGS_ASSERT_NEWFOROP; + if (sv) { if (sv->op_type == OP_RV2SV) { /* symbol table variable */ iterpflags = sv->op_private & OPpOUR_INTRO; /* for our $x () */ @@ -4849,6 +4964,8 @@ Perl_newLOOPEX(pTHX_ I32 type, OP *label) dVAR; OP *o; + PERL_ARGS_ASSERT_NEWLOOPEX; + if (type != OP_GOTO || label->op_type == OP_CONST) { /* "last()" means "last" */ if (label->op_type == OP_STUB && (label->op_flags & OPf_PARENS)) @@ -4913,6 +5030,8 @@ S_newGIVWHENOP(pTHX_ OP *cond, OP *block, LOGOP *enterop; OP *o; + PERL_ARGS_ASSERT_NEWGIVWHENOP; + NewOp(1101, enterop, 1, LOGOP); enterop->op_type = enter_opcode; enterop->op_ppaddr = PL_ppaddr[enter_opcode]; @@ -4962,6 +5081,9 @@ STATIC bool S_looks_like_bool(pTHX_ const OP *o) { dVAR; + + PERL_ARGS_ASSERT_LOOKS_LIKE_BOOL; + switch(o->op_type) { case OP_OR: return looks_like_bool(cLOGOPo->op_first); @@ -5023,7 +5145,7 @@ OP * Perl_newGIVENOP(pTHX_ OP *cond, OP *block, PADOFFSET defsv_off) { dVAR; - assert( cond ); + PERL_ARGS_ASSERT_NEWGIVENOP; return newGIVWHENOP( ref_array_or_hash(cond), block, @@ -5038,6 +5160,8 @@ Perl_newWHENOP(pTHX_ OP *cond, OP *block) const bool cond_llb = (!cond || looks_like_bool(cond)); OP *cond_op; + PERL_ARGS_ASSERT_NEWWHENOP; + if (cond_llb) cond_op = cond; else { @@ -5068,6 +5192,8 @@ Perl_cv_undef(pTHX_ CV *cv) { dVAR; + PERL_ARGS_ASSERT_CV_UNDEF; + DEBUG_X(PerlIO_printf(Perl_debug_log, "CV undef: cv=0x%"UVxf" comppad=0x%"UVxf"\n", PTR2UV(cv), PTR2UV(PL_comppad)) @@ -5119,6 +5245,8 @@ void Perl_cv_ckproto_len(pTHX_ const CV *cv, const GV *gv, const char *p, const STRLEN len) { + PERL_ARGS_ASSERT_CV_CKPROTO_LEN; + /* Can't just use a strcmp on the prototype, as CONSTSUBs "cheat" by relying on SvCUR, and doubling up the buffer to hold CvFILE(). */ if (((!p != !SvPOK(cv)) /* One has prototype, one has not. */ @@ -5652,6 +5780,8 @@ S_process_special_blocks(pTHX_ const char *const fullname, GV *const gv, const char *const colon = strrchr(fullname,':'); const char *const name = colon ? colon + 1 : fullname; + PERL_ARGS_ASSERT_PROCESS_SPECIAL_BLOCKS; + if (*name == 'B') { if (strEQ(name, "BEGIN")) { const I32 oldscope = PL_scopestack_ix; @@ -5780,6 +5910,8 @@ Perl_newXS_flags(pTHX_ const char *name, XSUBADDR_t subaddr, { CV *cv = newXS(name, subaddr, filename); + PERL_ARGS_ASSERT_NEWXS_FLAGS; + if (flags & XS_DYNAMIC_FILENAME) { /* We need to "make arrangements" (ie cheat) to ensure that the filename lasts as long as the PVCV we just created, but also doesn't @@ -5836,6 +5968,8 @@ Perl_newXS(pTHX_ const char *name, XSUBADDR_t subaddr, const char *filename) GV_ADDMULTI, SVt_PVCV); register CV *cv; + PERL_ARGS_ASSERT_NEWXS; + if (!subaddr) Perl_croak(aTHX_ "panic: no address for '%s' in '%s'", name, filename); @@ -5989,6 +6123,9 @@ OP * Perl_oopsAV(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_OOPSAV; + switch (o->op_type) { case OP_PADSV: o->op_type = OP_PADAV; @@ -6013,6 +6150,9 @@ OP * Perl_oopsHV(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_OOPSHV; + switch (o->op_type) { case OP_PADSV: case OP_PADAV: @@ -6039,6 +6179,9 @@ OP * Perl_newAVREF(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_NEWAVREF; + if (o->op_type == OP_PADANY) { o->op_type = OP_PADAV; o->op_ppaddr = PL_ppaddr[OP_PADAV]; @@ -6064,6 +6207,9 @@ OP * Perl_newHVREF(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_NEWHVREF; + if (o->op_type == OP_PADANY) { o->op_type = OP_PADHV; o->op_ppaddr = PL_ppaddr[OP_PADHV]; @@ -6087,6 +6233,9 @@ OP * Perl_newSVREF(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_NEWSVREF; + if (o->op_type == OP_PADANY) { o->op_type = OP_PADSV; o->op_ppaddr = PL_ppaddr[OP_PADSV]; @@ -6101,6 +6250,8 @@ Perl_newSVREF(pTHX_ OP *o) OP * Perl_ck_anoncode(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_ANONCODE; + cSVOPo->op_targ = pad_add_anon(cSVOPo->op_sv, o->op_type); if (!PL_madskills) cSVOPo->op_sv = NULL; @@ -6111,6 +6262,9 @@ OP * Perl_ck_bitop(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_CK_BITOP; + #define OP_IS_NUMCOMPARE(op) \ ((op) == OP_LT || (op) == OP_I_LT || \ (op) == OP_GT || (op) == OP_I_GT || \ @@ -6145,7 +6299,10 @@ OP * Perl_ck_concat(pTHX_ OP *o) { const OP * const kid = cUNOPo->op_first; + + PERL_ARGS_ASSERT_CK_CONCAT; PERL_UNUSED_CONTEXT; + if (kid->op_type == OP_CONCAT && !(kid->op_private & OPpTARGET_MY) && !(kUNOP->op_first->op_flags & OPf_MOD)) o->op_flags |= OPf_STACKED; @@ -6156,6 +6313,9 @@ OP * Perl_ck_spair(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_CK_SPAIR; + if (o->op_flags & OPf_KIDS) { OP* newop; OP* kid; @@ -6184,6 +6344,8 @@ Perl_ck_spair(pTHX_ OP *o) OP * Perl_ck_delete(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_DELETE; + o = ck_fun(o); o->op_private = 0; if (o->op_flags & OPf_KIDS) { @@ -6212,6 +6374,8 @@ Perl_ck_delete(pTHX_ OP *o) OP * Perl_ck_die(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_DIE; + #ifdef VMS if (VMSISH_HUSHED) o->op_private |= OPpHUSH_VMSISH; #endif @@ -6223,6 +6387,8 @@ Perl_ck_eof(pTHX_ OP *o) { dVAR; + PERL_ARGS_ASSERT_CK_EOF; + if (o->op_flags & OPf_KIDS) { if (cLISTOPo->op_first->op_type == OP_STUB) { OP * const newop @@ -6243,6 +6409,9 @@ OP * Perl_ck_eval(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_CK_EVAL; + PL_hints |= HINT_BLOCK_SCOPE; if (o->op_flags & OPf_KIDS) { SVOP * const kid = (SVOP*)cUNOPo->op_first; @@ -6308,6 +6477,8 @@ Perl_ck_eval(pTHX_ OP *o) OP * Perl_ck_exit(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_EXIT; + #ifdef VMS HV * const table = GvHV(PL_hintgv); if (table) { @@ -6323,6 +6494,8 @@ Perl_ck_exit(pTHX_ OP *o) OP * Perl_ck_exec(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_EXEC; + if (o->op_flags & OPf_STACKED) { OP *kid; o = ck_fun(o); @@ -6339,6 +6512,9 @@ OP * Perl_ck_exists(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_CK_EXISTS; + o = ck_fun(o); if (o->op_flags & OPf_KIDS) { OP * const kid = cUNOPo->op_first; @@ -6366,6 +6542,8 @@ Perl_ck_rvconst(pTHX_ register OP *o) dVAR; SVOP * const kid = (SVOP*)cUNOPo->op_first; + PERL_ARGS_ASSERT_CK_RVCONST; + o->op_private |= (PL_hints & HINT_STRICT_REFS); if (o->op_type == OP_RV2CV) o->op_private &= ~1; @@ -6482,6 +6660,8 @@ Perl_ck_ftst(pTHX_ OP *o) dVAR; const I32 type = o->op_type; + PERL_ARGS_ASSERT_CK_FTST; + if (o->op_flags & OPf_REF) { NOOP; } @@ -6527,6 +6707,8 @@ Perl_ck_fun(pTHX_ OP *o) const int type = o->op_type; register I32 oa = PL_opargs[type] >> OASHIFT; + PERL_ARGS_ASSERT_CK_FUN; + if (o->op_flags & OPf_STACKED) { if ((oa & OA_OPTIONAL) && (oa >> 4) && !((oa >> 4) & OA_OPTIONAL)) oa &= ~OA_OPTIONAL; @@ -6802,6 +6984,8 @@ Perl_ck_glob(pTHX_ OP *o) dVAR; GV *gv; + PERL_ARGS_ASSERT_CK_GLOB; + o = ck_fun(o); if ((o->op_flags & OPf_KIDS) && !cLISTOPo->op_first->op_sibling) append_elem(OP_GLOB, o, newDEFSVOP()); @@ -6860,6 +7044,8 @@ Perl_ck_grep(pTHX_ OP *o) const OPCODE type = o->op_type == OP_GREPSTART ? OP_GREPWHILE : OP_MAPWHILE; PADOFFSET offset; + PERL_ARGS_ASSERT_CK_GREP; + o->op_ppaddr = PL_ppaddr[OP_GREPSTART]; /* don't allocate gwop here, as we may leak it if PL_parser->error_count > 0 */ @@ -6919,6 +7105,8 @@ Perl_ck_grep(pTHX_ OP *o) OP * Perl_ck_index(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_INDEX; + if (o->op_flags & OPf_KIDS) { OP *kid = cLISTOPo->op_first->op_sibling; /* get past pushmark */ if (kid) @@ -6932,6 +7120,8 @@ Perl_ck_index(pTHX_ OP *o) OP * Perl_ck_lengthconst(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_LENGTHCONST; + /* XXX length optimization goes here */ return ck_fun(o); } @@ -6940,12 +7130,17 @@ OP * Perl_ck_lfun(pTHX_ OP *o) { const OPCODE type = o->op_type; + + PERL_ARGS_ASSERT_CK_LFUN; + return modkids(ck_fun(o), type); } OP * Perl_ck_defined(pTHX_ OP *o) /* 19990527 MJD */ { + PERL_ARGS_ASSERT_CK_DEFINED; + if ((o->op_flags & OPf_KIDS) && ckWARN2(WARN_DEPRECATED, WARN_SYNTAX)) { switch (cUNOPo->op_first->op_type) { case OP_RV2AV: @@ -6984,6 +7179,8 @@ Perl_ck_defined(pTHX_ OP *o) /* 19990527 MJD */ OP * Perl_ck_readline(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_READLINE; + if (!(o->op_flags & OPf_KIDS)) { OP * const newop = newUNOP(OP_READLINE, 0, newGVOP(OP_GV, 0, PL_argvgv)); @@ -7001,6 +7198,9 @@ OP * Perl_ck_rfun(pTHX_ OP *o) { const OPCODE type = o->op_type; + + PERL_ARGS_ASSERT_CK_RFUN; + return refkids(ck_fun(o), type); } @@ -7009,6 +7209,8 @@ Perl_ck_listiob(pTHX_ OP *o) { register OP *kid; + PERL_ARGS_ASSERT_CK_LISTIOB; + kid = cLISTOPo->op_first; if (!kid) { o = force_list(o); @@ -7067,6 +7269,9 @@ Perl_ck_sassign(pTHX_ OP *o) { dVAR; OP * const kid = cLISTOPo->op_first; + + PERL_ARGS_ASSERT_CK_SASSIGN; + /* has a disposable target? */ if ((PL_opargs[kid->op_type] & OA_TARGLEX) && !(kid->op_flags & OPf_STACKED) @@ -7128,6 +7333,9 @@ OP * Perl_ck_match(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_CK_MATCH; + if (o->op_type != OP_QR && PL_compcv) { const PADOFFSET offset = pad_findmy("$_"); if (offset != NOT_IN_PAD && !(PAD_COMPNAME_FLAGS_isOUR(offset))) { @@ -7144,6 +7352,9 @@ OP * Perl_ck_method(pTHX_ OP *o) { OP * const kid = cUNOPo->op_first; + + PERL_ARGS_ASSERT_CK_METHOD; + if (kid->op_type == OP_CONST) { SV* sv = kSVOP->op_sv; const char * const method = SvPVX_const(sv); @@ -7170,6 +7381,7 @@ Perl_ck_method(pTHX_ OP *o) OP * Perl_ck_null(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_NULL; PERL_UNUSED_CONTEXT; return o; } @@ -7179,6 +7391,9 @@ Perl_ck_open(pTHX_ OP *o) { dVAR; HV * const table = GvHV(PL_hintgv); + + PERL_ARGS_ASSERT_CK_OPEN; + if (table) { SV **svp = hv_fetchs(table, "open_IN", FALSE); if (svp && *svp) { @@ -7236,6 +7451,8 @@ Perl_ck_open(pTHX_ OP *o) OP * Perl_ck_repeat(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_REPEAT; + if (cBINOPo->op_first->op_flags & OPf_PARENS) { o->op_private |= OPpREPEAT_DOLIST; cBINOPo->op_first = force_list(cBINOPo->op_first); @@ -7251,6 +7468,8 @@ Perl_ck_require(pTHX_ OP *o) dVAR; GV* gv = NULL; + PERL_ARGS_ASSERT_CK_REQUIRE; + if (o->op_flags & OPf_KIDS) { /* Shall we supply missing .pm? */ SVOP * const kid = (SVOP*)cUNOPo->op_first; @@ -7320,6 +7539,9 @@ OP * Perl_ck_return(pTHX_ OP *o) { dVAR; + + PERL_ARGS_ASSERT_CK_RETURN; + if (CvLVALUE(PL_compcv)) { OP *kid; for (kid = cLISTOPo->op_first->op_sibling; kid; kid = kid->op_sibling) @@ -7333,6 +7555,9 @@ Perl_ck_select(pTHX_ OP *o) { dVAR; OP* kid; + + PERL_ARGS_ASSERT_CK_SELECT; + if (o->op_flags & OPf_KIDS) { kid = cLISTOPo->op_first->op_sibling; /* get past pushmark */ if (kid && kid->op_sibling) { @@ -7355,6 +7580,8 @@ Perl_ck_shift(pTHX_ OP *o) dVAR; const I32 type = o->op_type; + PERL_ARGS_ASSERT_CK_SHIFT; + if (!(o->op_flags & OPf_KIDS)) { OP *argop; /* FIXME - this can be refactored to reduce code in #ifdefs */ @@ -7382,6 +7609,8 @@ Perl_ck_sort(pTHX_ OP *o) dVAR; OP *firstkid; + PERL_ARGS_ASSERT_CK_SORT; + if (o->op_type == OP_SORT && (PL_hints & HINT_LOCALIZE_HH) != 0) { HV * const hinthv = GvHV(PL_hintgv); if (hinthv) { @@ -7463,6 +7692,9 @@ S_simplify_sort(pTHX_ OP *o) int descending; GV *gv; const char *gvname; + + PERL_ARGS_ASSERT_SIMPLIFY_SORT; + if (!(o->op_flags & OPf_STACKED)) return; GvMULTI_on(gv_fetchpvs("a", GV_ADD|GV_NOTQUAL, SVt_PV)); @@ -7534,6 +7766,8 @@ Perl_ck_split(pTHX_ OP *o) dVAR; register OP *kid; + PERL_ARGS_ASSERT_CK_SPLIT; + if (o->op_flags & OPf_STACKED) return no_fh_allowed(o); @@ -7589,6 +7823,9 @@ OP * Perl_ck_join(pTHX_ OP *o) { const OP * const kid = cLISTOPo->op_first->op_sibling; + + PERL_ARGS_ASSERT_CK_JOIN; + if (kid && kid->op_type == OP_MATCH) { if (ckWARN(WARN_SYNTAX)) { const REGEXP *re = PM_GETRE(kPMOP); @@ -7620,6 +7857,8 @@ Perl_ck_subr(pTHX_ OP *o) const char *e = NULL; bool delete_op = 0; + PERL_ARGS_ASSERT_CK_SUBR; + o->op_private |= OPpENTERSUB_HASTARG; for (cvop = o2; cvop->op_sibling; cvop = cvop->op_sibling) ; if (cvop->op_type == OP_RV2CV) { @@ -7859,6 +8098,7 @@ Perl_ck_subr(pTHX_ OP *o) OP * Perl_ck_svconst(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_SVCONST; PERL_UNUSED_CONTEXT; SvREADONLY_on(cSVOPo->op_sv); return o; @@ -7883,6 +8123,8 @@ Perl_ck_chdir(pTHX_ OP *o) OP * Perl_ck_trunc(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_TRUNC; + if (o->op_flags & OPf_KIDS) { SVOP *kid = (SVOP*)cUNOPo->op_first; @@ -7902,6 +8144,9 @@ OP * Perl_ck_unpack(pTHX_ OP *o) { OP *kid = cLISTOPo->op_first; + + PERL_ARGS_ASSERT_CK_UNPACK; + if (kid->op_sibling) { kid = kid->op_sibling; if (!kid->op_sibling) @@ -7913,6 +8158,8 @@ Perl_ck_unpack(pTHX_ OP *o) OP * Perl_ck_substr(pTHX_ OP *o) { + PERL_ARGS_ASSERT_CK_SUBSTR; + o = ck_fun(o); if ((o->op_flags & OPf_KIDS) && (o->op_private == 4)) { OP *kid = cLISTOPo->op_first; @@ -7932,6 +8179,8 @@ Perl_ck_each(pTHX_ OP *o) dVAR; OP *kid = cLISTOPo->op_first; + PERL_ARGS_ASSERT_CK_EACH; + if (kid->op_type == OP_PADAV || kid->op_type == OP_RV2AV) { const unsigned new_type = o->op_type == OP_EACH ? OP_AEACH : o->op_type == OP_KEYS ? OP_AKEYS : OP_AVALUES; @@ -8564,6 +8813,8 @@ Perl_custom_op_name(pTHX_ const OP* o) SV* keysv; HE* he; + PERL_ARGS_ASSERT_CUSTOM_OP_NAME; + if (!PL_custom_op_names) /* This probably shouldn't happen */ return (char *)PL_op_name[OP_CUSTOM]; @@ -8584,6 +8835,8 @@ Perl_custom_op_desc(pTHX_ const OP* o) SV* keysv; HE* he; + PERL_ARGS_ASSERT_CUSTOM_OP_DESC; + if (!PL_custom_op_descs) return (char *)PL_op_desc[OP_CUSTOM]; diff --git a/pad.c b/pad.c index ea27408..b5e39fa 100644 --- a/pad.c +++ b/pad.c @@ -128,6 +128,9 @@ For state vars, SVf_PADSTALE is overloaded to mean 'not yet initialised' #ifdef PERL_MAD void pad_peg(const char* s) { static int pegcnt; + + PERL_ARGS_ASSERT_PAD_PEG; + pegcnt++; } #endif @@ -250,6 +253,8 @@ Perl_pad_undef(pTHX_ CV* cv) I32 ix; const PADLIST * const padlist = CvPADLIST(cv); + PERL_ARGS_ASSERT_PAD_UNDEF; + pad_peg("pad_undef"); if (!padlist) return; @@ -352,6 +357,8 @@ Perl_pad_add_name(pTHX_ const char *name, HV* typestash, HV* ourstash, bool fake SV* const namesv = newSV_type((ourstash || typestash) ? SVt_PVMG : SVt_PVNV); + PERL_ARGS_ASSERT_PAD_ADD_NAME; + ASSERT_CURPAD_ACTIVE("pad_add_name"); sv_setpv(namesv, name); @@ -487,6 +494,9 @@ Perl_pad_add_anon(pTHX_ SV* sv, OPCODE op_type) dVAR; PADOFFSET ix; SV* const name = newSV_type(SVt_PVNV); + + PERL_ARGS_ASSERT_PAD_ADD_ANON; + pad_peg("add_anon"); sv_setpvn(name, "&", 1); /* Are these two actually ever read? */ @@ -531,6 +541,8 @@ Perl_pad_check_dup(pTHX_ const char *name, bool is_our, const HV *ourstash) SV **svp; PADOFFSET top, off; + PERL_ARGS_ASSERT_PAD_CHECK_DUP; + ASSERT_CURPAD_ACTIVE("pad_check_dup"); if (AvFILLp(PL_comppad_name) < 0 || !ckWARN(WARN_MISC)) return; /* nothing to check */ @@ -604,6 +616,8 @@ Perl_pad_findmy(pTHX_ const char *name) const AV *nameav; SV **name_svp; + PERL_ARGS_ASSERT_PAD_FINDMY; + pad_peg("pad_findmy"); offset = pad_findlex(name, PL_compcv, PL_cop_seqmax, 1, NULL, &out_sv, &out_flags); @@ -685,6 +699,8 @@ S_pad_findlex(pTHX_ const char *name, const CV* cv, U32 seq, int warn, SV **new_capturep; const AV * const padlist = CvPADLIST(cv); + PERL_ARGS_ASSERT_PAD_FINDLEX; + *out_flags = 0; DEBUG_Xv(PerlIO_printf(Perl_debug_log, @@ -931,6 +947,9 @@ void Perl_pad_setsv(pTHX_ PADOFFSET po, SV* sv) { dVAR; + + PERL_ARGS_ASSERT_PAD_SETSV; + ASSERT_CURPAD_ACTIVE("pad_setsv"); DEBUG_X(PerlIO_printf(Perl_debug_log, @@ -1320,6 +1339,8 @@ Perl_do_dump_pad(pTHX_ I32 level, PerlIO *file, PADLIST *padlist, int full) SV **ppad; I32 ix; + PERL_ARGS_ASSERT_DO_DUMP_PAD; + if (!padlist) { return; } @@ -1389,6 +1410,8 @@ S_cv_dump(pTHX_ const CV *cv, const char *title) const CV * const outside = CvOUTSIDE(cv); AV* const padlist = CvPADLIST(cv); + PERL_ARGS_ASSERT_CV_DUMP; + PerlIO_printf(Perl_debug_log, " %s: CV=0x%"UVxf" (%s), OUTSIDE=0x%"UVxf" (%s)\n", title, @@ -1442,6 +1465,8 @@ Perl_cv_clone(pTHX_ CV *proto) CV* outside; long depth; + PERL_ARGS_ASSERT_CV_CLONE; + assert(!CvUNIQUE(proto)); /* Since cloneable anon subs can be nested, CvOUTSIDE may point @@ -1585,6 +1610,8 @@ Perl_pad_fixup_inner_anons(pTHX_ PADLIST *padlist, CV *old_cv, CV *new_cv) AV * const comppad = (AV*)AvARRAY(padlist)[1]; SV ** const namepad = AvARRAY(comppad_name); SV ** const curpad = AvARRAY(comppad); + + PERL_ARGS_ASSERT_PAD_FIXUP_INNER_ANONS; PERL_UNUSED_ARG(old_cv); for (ix = AvFILLp(comppad_name); ix > 0; ix--) { @@ -1615,6 +1642,9 @@ void Perl_pad_push(pTHX_ PADLIST *padlist, int depth) { dVAR; + + PERL_ARGS_ASSERT_PAD_PUSH; + if (depth > AvFILLp(padlist)) { SV** const svp = AvARRAY(padlist); AV* const newpad = newAV(); diff --git a/perl.c b/perl.c index 02a889d..78fb2e3 100644 --- a/perl.c +++ b/perl.c @@ -194,6 +194,9 @@ void Perl_sys_init(int* argc, char*** argv) { dVAR; + + PERL_ARGS_ASSERT_SYS_INIT; + PERL_UNUSED_ARG(argc); /* may not be used depending on _BODY macro */ PERL_UNUSED_ARG(argv); PERL_SYS_INIT_BODY(argc, argv); @@ -203,6 +206,9 @@ void Perl_sys_init3(int* argc, char*** argv, char*** env) { dVAR; + + PERL_ARGS_ASSERT_SYS_INIT3; + PERL_UNUSED_ARG(argc); /* may not be used depending on _BODY macro */ PERL_UNUSED_ARG(argv); PERL_UNUSED_ARG(env); @@ -228,6 +234,9 @@ perl_alloc_using(struct IPerlMem* ipM, struct IPerlMem* ipMS, struct IPerlProc* ipP) { PerlInterpreter *my_perl; + + PERL_ARGS_ASSERT_PERL_ALLOC_USING; + /* Newx() needs interpreter, so call malloc() instead */ my_perl = (PerlInterpreter*)(*ipM->pMalloc)(ipM, sizeof(PerlInterpreter)); S_init_tls_and_interp(my_perl); @@ -288,11 +297,14 @@ void perl_construct(pTHXx) { dVAR; - PERL_UNUSED_ARG(my_perl); + + PERL_ARGS_ASSERT_PERL_CONSTRUCT; + #ifdef MULTIPLICITY init_interp(); PL_perl_destruct_level = 1; #else + PERL_UNUSED_ARG(my_perl); if (PL_perl_destruct_level > 0) init_interp(); #endif @@ -478,6 +490,8 @@ Perl_dump_sv_child(pTHX_ SV *sv) int returned_errno; unsigned char buffer[256]; + PERL_ARGS_ASSERT_DUMP_SV_CHILD; + if(sock == -1 || debug_fd == -1) return; @@ -580,7 +594,10 @@ perl_destruct(pTHXx) pid_t child; #endif + PERL_ARGS_ASSERT_PERL_DESTRUCT; +#ifndef MULTIPLICITY PERL_UNUSED_ARG(my_perl); +#endif /* wait for all pseudo-forked children to finish */ PERL_WAIT_FOR_CHILDREN; @@ -1346,6 +1363,8 @@ perl_free(pTHXx) { dVAR; + PERL_ARGS_ASSERT_PERL_FREE; + if (PL_veto_cleanup) return; @@ -1490,7 +1509,10 @@ perl_parse(pTHXx_ XSINIT_t xsinit, int argc, char **argv, char **env) int ret; dJMPENV; + PERL_ARGS_ASSERT_PERL_PARSE; +#ifndef MULTIPLICITY PERL_UNUSED_ARG(my_perl); +#endif #ifdef SETUID_SCRIPTS_ARE_SECURE_NOW_AND_IAMSUID Perl_croak(aTHX_ "suidperl is no longer needed since the kernel can now " @@ -2271,7 +2293,10 @@ perl_run(pTHXx) int ret = 0; dJMPENV; + PERL_ARGS_ASSERT_PERL_RUN; +#ifndef MULTIPLICITY PERL_UNUSED_ARG(my_perl); +#endif oldscope = PL_scopestack_ix; #ifdef VMS @@ -2389,6 +2414,9 @@ SV* Perl_get_sv(pTHX_ const char *name, I32 create) { GV *gv; + + PERL_ARGS_ASSERT_GET_SV; + gv = gv_fetchpv(name, create, SVt_PV); if (gv) return GvSV(gv); @@ -2411,6 +2439,9 @@ AV* Perl_get_av(pTHX_ const char *name, I32 create) { GV* const gv = gv_fetchpv(name, create, SVt_PVAV); + + PERL_ARGS_ASSERT_GET_AV; + if (create) return GvAVn(gv); if (gv) @@ -2434,6 +2465,9 @@ HV* Perl_get_hv(pTHX_ const char *name, I32 create) { GV* const gv = gv_fetchpv(name, create, SVt_PVHV); + + PERL_ARGS_ASSERT_GET_HV; + if (create) return GvHVn(gv); if (gv) @@ -2466,6 +2500,9 @@ Perl_get_cvn_flags(pTHX_ const char *name, STRLEN len, I32 flags) /* XXX this is probably not what they think they're getting. * It has the same effect as "sub name;", i.e. just a forward * declaration! */ + + PERL_ARGS_ASSERT_GET_CVN_FLAGS; + if ((flags & ~GV_NOADD_MASK) && !GvCVu(gv)) { SV *const sv = newSVpvn_flags(name, len, flags & SVf_UTF8); return newSUB(start_subparse(FALSE, 0), @@ -2480,6 +2517,8 @@ Perl_get_cvn_flags(pTHX_ const char *name, STRLEN len, I32 flags) CV* Perl_get_cv(pTHX_ const char *name, I32 flags) { + PERL_ARGS_ASSERT_GET_CV; + return get_cvn_flags(name, strlen(name), flags); } @@ -2505,6 +2544,8 @@ Perl_call_argv(pTHX_ const char *sub_name, I32 flags, register char **argv) dVAR; dSP; + PERL_ARGS_ASSERT_CALL_ARGV; + PUSHMARK(SP); if (argv) { while (*argv) { @@ -2529,6 +2570,8 @@ Perl_call_pv(pTHX_ const char *sub_name, I32 flags) /* name of the subroutine */ /* See G_* flags in cop.h */ { + PERL_ARGS_ASSERT_CALL_PV; + return call_sv((SV*)get_cv(sub_name, TRUE), flags); } @@ -2546,6 +2589,8 @@ Perl_call_method(pTHX_ const char *methname, I32 flags) /* name of the subroutine */ /* See G_* flags in cop.h */ { + PERL_ARGS_ASSERT_CALL_METHOD; + return call_sv(sv_2mortal(newSVpv(methname,0)), flags | G_METHOD); } @@ -2574,6 +2619,8 @@ Perl_call_sv(pTHX_ SV *sv, VOL I32 flags) OP* const oldop = PL_op; dJMPENV; + PERL_ARGS_ASSERT_CALL_SV; + if (flags & G_DISCARD) { ENTER; SAVETMPS; @@ -2705,6 +2752,8 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags) OP* const oldop = PL_op; dJMPENV; + PERL_ARGS_ASSERT_EVAL_SV; + if (flags & G_DISCARD) { ENTER; SAVETMPS; @@ -2791,6 +2840,8 @@ Perl_eval_pv(pTHX_ const char *p, I32 croak_on_error) dSP; SV* sv = newSVpv(p, 0); + PERL_ARGS_ASSERT_EVAL_PV; + eval_sv(sv, G_SCALAR); SvREFCNT_dec(sv); @@ -2824,6 +2875,9 @@ Perl_require_pv(pTHX_ const char *pv) dVAR; dSP; SV* sv; + + PERL_ARGS_ASSERT_REQUIRE_PV; + PUSHSTACKi(PERLSI_REQUIRE); PUTBACK; sv = Perl_newSVpvf(aTHX_ "require q%c%s%c", 0, pv, 0); @@ -2837,6 +2891,8 @@ Perl_magicname(pTHX_ const char *sym, const char *name, I32 namlen) { register GV * const gv = gv_fetchpv(sym, GV_ADD, SVt_PV); + PERL_ARGS_ASSERT_MAGICNAME; + if (gv) sv_magic(GvSV(gv), (SV*)gv, PERL_MAGIC_sv, name, namlen); } @@ -2881,6 +2937,8 @@ NULL }; const char * const *p = usage_msg; + PERL_ARGS_ASSERT_USAGE; + PerlIO_printf(PerlIO_stdout(), "\nUsage: %s [switches] [--] [programfile] [arguments]", name); @@ -2923,6 +2981,9 @@ Perl_get_debug_opts(pTHX_ const char **s, bool givehelp) NULL }; int i = 0; + + PERL_ARGS_ASSERT_GET_DEBUG_OPTS; + if (isALPHA(**s)) { /* if adding extra options, remember to update DEBUG_MASK */ static const char debopts[] = "psltocPmfrxuUHXDSTRJvCAq"; @@ -2961,6 +3022,8 @@ Perl_moreswitches(pTHX_ const char *s) dVAR; UV rschar; + PERL_ARGS_ASSERT_MORESWITCHES; + switch (*s) { case '0': { @@ -3504,6 +3567,8 @@ S_open_script(pTHX_ const char *scriptname, bool dosearch, int fdscript = -1; dVAR; + PERL_ARGS_ASSERT_OPEN_SCRIPT; + if (PL_e_script) { PL_origfilename = savepvs("-e"); } @@ -3786,6 +3851,8 @@ S_validate_suid(pTHX_ const char *validarg, dVAR; const char *s, *s2; + PERL_ARGS_ASSERT_VALIDATE_SUID; + /* do we need to emulate setuid on scripts? */ /* This code is for those BSD systems that have setuid #! scripts disabled @@ -4164,6 +4231,8 @@ FIX YOUR KERNEL, OR PUT A C WRAPPER AROUND THIS SCRIPT!\n"); STATIC void S_validate_suid(pTHX_ PerlIO *rsfp) { + PERL_ARGS_ASSERT_VALIDATE_SUID; + if (PL_euid != PL_uid || PL_egid != PL_gid) { /* (suidperl doesn't exist, in fact) */ # ifndef SETUID_SCRIPTS_ARE_SECURE_NOW PerlLIO_fstat(PerlIO_fileno(rsfp),&PL_statbuf); /* may be either wrapped or real suid */ @@ -4191,6 +4260,8 @@ S_find_beginning(pTHX_ SV* linestr_sv, PerlIO *rsfp) int maclines = 0; #endif + PERL_ARGS_ASSERT_FIND_BEGINNING; + /* skip forward in input to the real script? */ #ifdef MACOS_TRADITIONAL @@ -4496,6 +4567,9 @@ void Perl_init_argv_symbols(pTHX_ register int argc, register char **argv) { dVAR; + + PERL_ARGS_ASSERT_INIT_ARGV_SYMBOLS; + argc--,argv++; /* skip name of script */ if (PL_doswitches) { for (; argc > 0 && **argv == '-'; argc--,argv++) { @@ -4538,6 +4612,8 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register dVAR; GV* tmpgv; + PERL_ARGS_ASSERT_INIT_POSTDUMP_SYMBOLS; + PL_toptarget = newSV_type(SVt_PVFM); sv_setpvn(PL_toptarget, "", 0); PL_bodytarget = newSV_type(SVt_PVFM); @@ -4768,6 +4844,9 @@ S_incpush_if_exists(pTHX_ SV *dir) { dVAR; Stat_t tmpstatbuf; + + PERL_ARGS_ASSERT_INCPUSH_IF_EXISTS; + if (PerlLIO_stat(SvPVX_const(dir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) { av_push(GvAVn(PL_incgv), dir); @@ -5011,6 +5090,8 @@ Perl_call_list(pTHX_ I32 oldscope, AV *paramList) int ret; dJMPENV; + PERL_ARGS_ASSERT_CALL_LIST; + while (av_len(paramList) >= 0) { cv = (CV*)av_shift(paramList); if (PL_savebegin) { diff --git a/perlio.c b/perlio.c index 6cec440..b7f2b14 100644 --- a/perlio.c +++ b/perlio.c @@ -1627,18 +1627,24 @@ PerlIO_openn(pTHX_ const char *layers, const char *mode, int fd, SSize_t Perl_PerlIO_read(pTHX_ PerlIO *f, void *vbuf, Size_t count) { + PERL_ARGS_ASSERT_PERLIO_READ; + Perl_PerlIO_or_Base(f, Read, read, -1, (aTHX_ f, vbuf, count)); } SSize_t Perl_PerlIO_unread(pTHX_ PerlIO *f, const void *vbuf, Size_t count) { + PERL_ARGS_ASSERT_PERLIO_UNREAD; + Perl_PerlIO_or_Base(f, Unread, unread, -1, (aTHX_ f, vbuf, count)); } SSize_t Perl_PerlIO_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count) { + PERL_ARGS_ASSERT_PERLIO_WRITE; + Perl_PerlIO_or_fail(f, Write, -1, (aTHX_ f, vbuf, count)); } diff --git a/pp.c b/pp.c index 8665c9c..6d97b9e 100644 --- a/pp.c +++ b/pp.c @@ -224,6 +224,8 @@ Perl_softref2xv(pTHX_ SV *const sv, const char *const what, const U32 type, dVAR; GV *gv; + PERL_ARGS_ASSERT_SOFTREF2XV; + if (PL_op->op_private & HINT_STRICT_REFS) { if (SvOK(sv)) Perl_die(aTHX_ PL_no_symref_sv, sv, what); @@ -509,6 +511,8 @@ S_refto(pTHX_ SV *sv) dVAR; SV* rv; + PERL_ARGS_ASSERT_REFTO; + if (SvTYPE(sv) == SVt_PVLV && LvTYPE(sv) == 'y') { if (LvTARGLEN(sv)) vivify_defelem(sv); diff --git a/pp_ctl.c b/pp_ctl.c index f6b788f..7be56fb 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -325,6 +325,8 @@ Perl_rxres_save(pTHX_ void **rsp, REGEXP *rx) { UV *p = (UV*)*rsp; U32 i; + + PERL_ARGS_ASSERT_RXRES_SAVE; PERL_UNUSED_CONTEXT; if (!p || p[1] < RX_NPARENS(rx)) { @@ -363,6 +365,8 @@ Perl_rxres_restore(pTHX_ void **rsp, REGEXP *rx) { UV *p = (UV*)*rsp; U32 i; + + PERL_ARGS_ASSERT_RXRES_RESTORE; PERL_UNUSED_CONTEXT; RX_MATCH_COPY_FREE(rx); @@ -390,6 +394,8 @@ void Perl_rxres_free(pTHX_ void **rsp) { UV * const p = (UV*)*rsp; + + PERL_ARGS_ASSERT_RXRES_FREE; PERL_UNUSED_CONTEXT; if (p) { @@ -1243,6 +1249,8 @@ S_dopoptolabel(pTHX_ const char *label) dVAR; register I32 i; + PERL_ARGS_ASSERT_DOPOPTOLABEL; + for (i = cxstack_ix; i >= 0; i--) { register const PERL_CONTEXT * const cx = &cxstack[i]; switch (CxTYPE(cx)) { @@ -1325,6 +1333,9 @@ S_dopoptosub_at(pTHX_ const PERL_CONTEXT *cxstk, I32 startingblock) { dVAR; I32 i; + + PERL_ARGS_ASSERT_DOPOPTOSUB_AT; + for (i = startingblock; i >= 0; i--) { register const PERL_CONTEXT * const cx = &cxstk[i]; switch (CxTYPE(cx)) { @@ -1478,6 +1489,9 @@ void Perl_qerror(pTHX_ SV *err) { dVAR; + + PERL_ARGS_ASSERT_QERROR; + if (PL_in_eval) sv_catsv(ERRSV, err); else if (PL_errors) @@ -2315,6 +2329,8 @@ S_dofindlabel(pTHX_ OP *o, const char *label, OP **opstack, OP **oplimit) OP **ops = opstack; static const char too_deep[] = "Target of goto is too deeply nested"; + PERL_ARGS_ASSERT_DOFINDLABEL; + if (ops >= oplimit) Perl_croak(aTHX_ too_deep); if (o->op_type == OP_LEAVE || @@ -2718,6 +2734,8 @@ S_save_lines(pTHX_ AV *array, SV *sv) const char * const send = SvPVX_const(sv) + SvCUR(sv); I32 line = 1; + PERL_ARGS_ASSERT_SAVE_LINES; + while (s && s < send) { const char *t; SV * const tmpstr = newSV_type(SVt_PVMG); @@ -2805,6 +2823,8 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, const char *code, PAD** padp) CV* runcv = NULL; /* initialise to avoid compiler warnings */ STRLEN len; + PERL_ARGS_ASSERT_SV_COMPILE_2OP; + ENTER; lex_start(sv, NULL, FALSE); SAVETMPS; @@ -3085,6 +3105,8 @@ S_check_type_and_open(pTHX_ const char *name) Stat_t st; const int st_rc = PerlLIO_stat(name, &st); + PERL_ARGS_ASSERT_CHECK_TYPE_AND_OPEN; + if (st_rc < 0 || S_ISDIR(st.st_mode) || S_ISBLK(st.st_mode)) { return NULL; } @@ -3098,6 +3120,8 @@ S_doopen_pm(pTHX_ const char *name, const STRLEN namelen) { PerlIO *fp; + PERL_ARGS_ASSERT_DOOPEN_PM; + if (namelen > 3 && memEQs(name + namelen - 3, 3, ".pm")) { SV *const pmcsv = newSV(namelen + 2); char *const pmc = SvPVX(pmcsv); @@ -3894,8 +3918,11 @@ S_make_matcher(pTHX_ REGEXP *re) { dVAR; PMOP *matcher = (PMOP *) newPMOP(OP_MATCH, OPf_WANT_SCALAR | OPf_STACKED); + + PERL_ARGS_ASSERT_MAKE_MATCHER; + PM_SETRE(matcher, ReREFCNT_inc(re)); - + SAVEFREEOP((OP *) matcher); ENTER; SAVETMPS; SAVEOP(); @@ -3907,6 +3934,8 @@ S_matcher_matches_sv(pTHX_ PMOP *matcher, SV *sv) { dVAR; dSP; + + PERL_ARGS_ASSERT_MATCHER_MATCHES_SV; PL_op = (OP *) matcher; XPUSHs(sv); @@ -3920,7 +3949,10 @@ STATIC void S_destroy_matcher(pTHX_ PMOP *matcher) { dVAR; + + PERL_ARGS_ASSERT_DESTROY_MATCHER; PERL_UNUSED_ARG(matcher); + FREETMPS; LEAVE; } @@ -4424,6 +4456,8 @@ S_doparseform(pTHX_ SV *sv) bool unchopnum = FALSE; int maxops = 12; /* FF_LINEMARK + FF_END + 10 (\0 without preceding \n) */ + PERL_ARGS_ASSERT_DOPARSEFORM; + if (len == 0) Perl_croak(aTHX_ "Null picture in formline"); @@ -4666,6 +4700,8 @@ S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen) bool read_from_cache = FALSE; STRLEN umaxlen; + PERL_ARGS_ASSERT_RUN_USER_FILTER; + assert(maxlen >= 0); umaxlen = maxlen; @@ -4832,6 +4868,8 @@ S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen) static bool S_path_is_absolute(const char *name) { + PERL_ARGS_ASSERT_PATH_IS_ABSOLUTE; + if (PERL_FILE_IS_ABSOLUTE(name) #ifdef MACOS_TRADITIONAL || (*name == ':') diff --git a/pp_hot.c b/pp_hot.c index 29215e4..cd1a885 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -936,6 +936,9 @@ STATIC void S_do_oddball(pTHX_ HV *hash, SV **relem, SV **firstrelem) { dVAR; + + PERL_ARGS_ASSERT_DO_ODDBALL; + if (*relem) { SV *tmpstr; const HE *didstore; @@ -2877,6 +2880,8 @@ try_autoload: void Perl_sub_crush_depth(pTHX_ CV *cv) { + PERL_ARGS_ASSERT_SUB_CRUSH_DEPTH; + if (CvANON(cv)) Perl_warner(aTHX_ packWARN(WARN_RECURSION), "Deep recursion on anonymous subroutine"); else { @@ -2950,6 +2955,8 @@ PP(pp_aelem) void Perl_vivify_ref(pTHX_ SV *sv, U32 to_what) { + PERL_ARGS_ASSERT_VIVIFY_REF; + SvGETMAGIC(sv); if (!SvOK(sv)) { if (SvREADONLY(sv)) @@ -3012,6 +3019,8 @@ S_method_common(pTHX_ SV* meth, U32* hashp) const char * const name = SvPV_const(meth, namelen); SV * const sv = *(PL_stack_base + TOPMARK + 1); + PERL_ARGS_ASSERT_METHOD_COMMON; + if (!sv) Perl_croak(aTHX_ "Can't call method \"%s\" on an undefined value", name); diff --git a/pp_pack.c b/pp_pack.c index dfcd3e9..6176e00 100644 --- a/pp_pack.c +++ b/pp_pack.c @@ -177,6 +177,8 @@ S_mul128(pTHX_ SV *sv, U8 m) char *s = SvPV(sv, len); char *t; + PERL_ARGS_ASSERT_MUL128; + if (!strnEQ(s, "0000", 4)) { /* need to grow sv */ SV * const tmpNew = newSVpvs("0000000000"); @@ -705,6 +707,8 @@ STATIC char * S_bytes_to_uni(const U8 *start, STRLEN len, char *dest) { const U8 * const end = start + len; + PERL_ARGS_ASSERT_BYTES_TO_UNI; + while (start < end) { const UV uv = NATIVE_TO_ASCII(*start); if (UNI_IS_INVARIANT(uv)) @@ -784,6 +788,8 @@ S_measure_struct(pTHX_ tempsym_t* symptr) { I32 total = 0; + PERL_ARGS_ASSERT_MEASURE_STRUCT; + while (next_symbol(symptr)) { I32 len; int size; @@ -893,6 +899,8 @@ S_measure_struct(pTHX_ tempsym_t* symptr) STATIC const char * S_group_end(pTHX_ register const char *patptr, register const char *patend, char ender) { + PERL_ARGS_ASSERT_GROUP_END; + while (patptr < patend) { const char c = *patptr++; @@ -923,6 +931,9 @@ STATIC const char * S_get_num(pTHX_ register const char *patptr, I32 *lenptr ) { I32 len = *patptr++ - '0'; + + PERL_ARGS_ASSERT_GET_NUM; + while (isDIGIT(*patptr)) { if (len >= 0x7FFFFFFF/10) Perl_croak(aTHX_ "pack/unpack repeat count overflow"); @@ -941,6 +952,8 @@ S_next_symbol(pTHX_ tempsym_t* symptr ) const char* patptr = symptr->patptr; const char* const patend = symptr->patend; + PERL_ARGS_ASSERT_NEXT_SYMBOL; + symptr->flags &= ~FLAG_SLASH; while (patptr < patend) { @@ -1120,6 +1133,9 @@ STATIC bool need_utf8(const char *pat, const char *patend) { bool first = TRUE; + + PERL_ARGS_ASSERT_NEED_UTF8; + while (pat < patend) { if (pat[0] == '#') { pat++; @@ -1135,6 +1151,8 @@ need_utf8(const char *pat, const char *patend) STATIC char first_symbol(const char *pat, const char *patend) { + PERL_ARGS_ASSERT_FIRST_SYMBOL; + while (pat < patend) { if (pat[0] != '#') return pat[0]; pat++; @@ -1159,6 +1177,8 @@ Perl_unpackstring(pTHX_ const char *pat, const char *patend, const char *s, cons { tempsym_t sym; + PERL_ARGS_ASSERT_UNPACKSTRING; + if (flags & FLAG_DO_UTF8) flags |= FLAG_WAS_UTF8; else if (need_utf8(pat, patend)) { /* We probably should try to avoid this in case a scalar context call @@ -1185,7 +1205,6 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c SV *sv; const I32 start_sp_offset = SP - PL_stack_base; howlen_t howlen; - I32 checksum = 0; UV cuv = 0; NV cdouble = 0.0; @@ -1194,6 +1213,9 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c bool explicit_length; const bool unpack_only_one = (symptr->flags & FLAG_UNPACK_ONLY_ONE) != 0; bool utf8 = (symptr->flags & FLAG_PARSE_UTF8) ? 1 : 0; + + PERL_ARGS_ASSERT_UNPACK_REC; + symptr->strbeg = s - strbeg; while (next_symbol(symptr)) { @@ -2279,6 +2301,8 @@ S_is_an_int(pTHX_ const char *s, STRLEN l) bool skip = 1; bool ignore = 0; + PERL_ARGS_ASSERT_IS_AN_INT; + while (*s) { switch (*s) { case ' ': @@ -2327,6 +2351,8 @@ S_div128(pTHX_ SV *pnum, bool *done) char *t = s; int m = 0; + PERL_ARGS_ASSERT_DIV128; + *done = 1; while (*t) { const int i = m * 10 + (*t - '0'); @@ -2356,6 +2382,8 @@ Perl_packlist(pTHX_ SV *cat, const char *pat, const char *patend, register SV ** dVAR; tempsym_t sym; + PERL_ARGS_ASSERT_PACKLIST; + TEMPSYM_INIT(&sym, pat, patend, FLAG_PACK); /* We're going to do changes through SvPVX(cat). Make sure it's valid. @@ -2440,6 +2468,9 @@ S_sv_exp_grow(pTHX_ SV *sv, STRLEN needed) { const STRLEN cur = SvCUR(sv); const STRLEN len = SvLEN(sv); STRLEN extend; + + PERL_ARGS_ASSERT_SV_EXP_GROW; + if (len - cur > needed) return SvPVX(sv); extend = needed > len ? needed : len; return SvGROW(sv, len+extend+1); @@ -2456,6 +2487,8 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist ) bool utf8 = (symptr->flags & FLAG_PARSE_UTF8) ? 1 : 0; bool warn_utf8 = ckWARN(WARN_UTF8); + PERL_ARGS_ASSERT_PACK_REC; + if (symptr->level == 0 && found && symptr->code == 'U') { marked_upgrade(aTHX_ cat, symptr); symptr->flags |= FLAG_DO_UTF8; diff --git a/pp_sort.c b/pp_sort.c index 582b811..1c12014 100644 --- a/pp_sort.c +++ b/pp_sort.c @@ -762,10 +762,8 @@ STATIC void /* the standard unstable (u) quicksort (qsort) */ S_qsortsvu(pTHX_ SV ** array, size_t num_elts, SVCOMPARE_t compare) { register SV * temp; - struct partition_stack_entry partition_stack[QSORT_MAX_STACK]; int next_stack_entry = 0; - int part_left; int part_right; #ifdef QSORT_ORDER_GUESS @@ -773,6 +771,8 @@ S_qsortsvu(pTHX_ SV ** array, size_t num_elts, SVCOMPARE_t compare) int swapped; #endif + PERL_ARGS_ASSERT_QSORTSVU; + /* Make sure we actually have work to do. */ if (num_elts <= 1) { @@ -1441,6 +1441,8 @@ flexible routine. void Perl_sortsv(pTHX_ SV **array, size_t nmemb, SVCOMPARE_t cmp) { + PERL_ARGS_ASSERT_SORTSV; + sortsv_flags(array, nmemb, cmp, 0); } @@ -1454,6 +1456,8 @@ Sort an array, with various options. void Perl_sortsv_flags(pTHX_ SV **array, size_t nmemb, SVCOMPARE_t cmp, U32 flags) { + PERL_ARGS_ASSERT_SORTSV_FLAGS; + if (flags & SORTf_QSORT) S_qsortsv(aTHX_ array, nmemb, cmp, flags); else @@ -1740,6 +1744,9 @@ S_sortcv(pTHX_ SV *a, SV *b) const I32 oldsaveix = PL_savestack_ix; const I32 oldscopeix = PL_scopestack_ix; I32 result; + + PERL_ARGS_ASSERT_SORTCV; + GvSV(PL_firstgv) = a; GvSV(PL_secondgv) = b; PL_stack_sp = PL_stack_base; @@ -1766,6 +1773,8 @@ S_sortcv_stacked(pTHX_ SV *a, SV *b) I32 result; AV * const av = GvAV(PL_defgv); + PERL_ARGS_ASSERT_SORTCV_STACKED; + if (AvMAX(av) < 1) { SV** ary = AvALLOC(av); if (AvARRAY(av) != ary) { @@ -1806,6 +1815,8 @@ S_sortcv_xsub(pTHX_ SV *a, SV *b) CV * const cv=(CV*)PL_sortcop; I32 result; + PERL_ARGS_ASSERT_SORTCV_XSUB; + SP = PL_stack_base; PUSHMARK(SP); EXTEND(SP, 2); @@ -1831,6 +1842,9 @@ S_sv_ncmp(pTHX_ SV *a, SV *b) { const NV nv1 = SvNSIV(a); const NV nv2 = SvNSIV(b); + + PERL_ARGS_ASSERT_SV_NCMP; + return nv1 < nv2 ? -1 : nv1 > nv2 ? 1 : 0; } @@ -1839,6 +1853,9 @@ S_sv_i_ncmp(pTHX_ SV *a, SV *b) { const IV iv1 = SvIV(a); const IV iv2 = SvIV(b); + + PERL_ARGS_ASSERT_SV_I_NCMP; + return iv1 < iv2 ? -1 : iv1 > iv2 ? 1 : 0; } @@ -1854,6 +1871,9 @@ S_amagic_ncmp(pTHX_ register SV *a, register SV *b) { dVAR; SV * const tmpsv = tryCALL_AMAGICbin(a,b,ncmp); + + PERL_ARGS_ASSERT_AMAGIC_NCMP; + if (tmpsv) { if (SvIOK(tmpsv)) { const I32 i = SvIVX(tmpsv); @@ -1872,6 +1892,9 @@ S_amagic_i_ncmp(pTHX_ register SV *a, register SV *b) { dVAR; SV * const tmpsv = tryCALL_AMAGICbin(a,b,ncmp); + + PERL_ARGS_ASSERT_AMAGIC_I_NCMP; + if (tmpsv) { if (SvIOK(tmpsv)) { const I32 i = SvIVX(tmpsv); @@ -1890,6 +1913,9 @@ S_amagic_cmp(pTHX_ register SV *str1, register SV *str2) { dVAR; SV * const tmpsv = tryCALL_AMAGICbin(str1,str2,scmp); + + PERL_ARGS_ASSERT_AMAGIC_CMP; + if (tmpsv) { if (SvIOK(tmpsv)) { const I32 i = SvIVX(tmpsv); @@ -1908,6 +1934,9 @@ S_amagic_cmp_locale(pTHX_ register SV *str1, register SV *str2) { dVAR; SV * const tmpsv = tryCALL_AMAGICbin(str1,str2,scmp); + + PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE; + if (tmpsv) { if (SvIOK(tmpsv)) { const I32 i = SvIVX(tmpsv); diff --git a/pp_sys.c b/pp_sys.c index d73772b..75c832f 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -1240,6 +1240,8 @@ S_doform(pTHX_ CV *cv, GV *gv, OP *retop) register PERL_CONTEXT *cx; const I32 gimme = GIMME_V; + PERL_ARGS_ASSERT_DOFORM; + ENTER; SAVETMPS; @@ -3597,6 +3599,8 @@ S_dooneliner(pTHX_ const char *cmd, const char *filename) int anum = 1; Size_t size = strlen(cmd) + (strlen(filename) * 2) + 10; + PERL_ARGS_ASSERT_DOONELINER; + Newx(cmdline, size, char); my_strlcpy(cmdline, cmd, size); my_strlcat(cmdline, " ", size); @@ -4604,6 +4608,8 @@ S_space_join_names_mortal(pTHX_ char *const *array) { SV *target; + PERL_ARGS_ASSERT_SPACE_JOIN_NAMES_MORTAL; + if (array && *array) { target = newSVpvs_flags("", SVs_TEMP); while (1) { diff --git a/proto.h b/proto.h index 3108c0e..e62bc6a 100644 --- a/proto.h +++ b/proto.h @@ -29,23 +29,35 @@ PERL_CALLCONV PerlInterpreter* perl_alloc_using(struct IPerlMem *ipM, struct IPe __attribute__nonnull__(7) __attribute__nonnull__(8) __attribute__nonnull__(9); +#define PERL_ARGS_ASSERT_PERL_ALLOC_USING \ + assert(ipM); assert(ipMS); assert(ipMP); assert(ipE); assert(ipStd); assert(ipLio); assert(ipD); assert(ipS); assert(ipP) #endif PERL_CALLCONV PerlInterpreter* perl_alloc(void); PERL_CALLCONV void perl_construct(PerlInterpreter *my_perl) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_PERL_CONSTRUCT \ + assert(my_perl) PERL_CALLCONV int perl_destruct(PerlInterpreter *my_perl) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_PERL_DESTRUCT \ + assert(my_perl) PERL_CALLCONV void perl_free(PerlInterpreter *my_perl) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_PERL_FREE \ + assert(my_perl) PERL_CALLCONV int perl_run(PerlInterpreter *my_perl) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_PERL_RUN \ + assert(my_perl) PERL_CALLCONV int perl_parse(PerlInterpreter *my_perl, XSINIT_t xsinit, int argc, char** argv, char** env) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_PERL_PARSE \ + assert(my_perl) PERL_CALLCONV bool Perl_doing_taint(int argc, char** argv, char** env) __attribute__warn_unused_result__; @@ -53,6 +65,8 @@ PERL_CALLCONV bool Perl_doing_taint(int argc, char** argv, char** env) #if defined(USE_ITHREADS) PERL_CALLCONV PerlInterpreter* perl_clone(PerlInterpreter *proto_perl, UV flags) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_PERL_CLONE \ + assert(proto_perl) # if defined(PERL_IMPLICIT_SYS) PERL_CALLCONV PerlInterpreter* perl_clone_using(PerlInterpreter *proto_perl, UV flags, struct IPerlMem* m, struct IPerlMem* ms, struct IPerlMem* mp, struct IPerlEnv* e, struct IPerlStdIO* io, struct IPerlLIO* lio, struct IPerlDir* d, struct IPerlSock* s, struct IPerlProc* p) @@ -66,6 +80,8 @@ PERL_CALLCONV PerlInterpreter* perl_clone_using(PerlInterpreter *proto_perl, UV __attribute__nonnull__(9) __attribute__nonnull__(10) __attribute__nonnull__(11); +#define PERL_ARGS_ASSERT_PERL_CLONE_USING \ + assert(proto_perl); assert(m); assert(ms); assert(mp); assert(e); assert(io); assert(lio); assert(d); assert(s); assert(p) # endif #endif @@ -87,6 +103,8 @@ PERL_CALLCONV Free_t Perl_mfree(Malloc_t where); PERL_CALLCONV MEM_SIZE Perl_malloced_size(void *p) __attribute__warn_unused_result__ __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_MALLOCED_SIZE \ + assert(p) #endif @@ -95,6 +113,8 @@ PERL_CALLCONV void* Perl_get_context(void) PERL_CALLCONV void Perl_set_context(void *t) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_SET_CONTEXT \ + assert(t) END_EXTERN_C @@ -105,9 +125,13 @@ START_EXTERN_C PERL_CALLCONV SV* Perl_amagic_call(pTHX_ SV* left, SV* right, int method, int dir) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_AMAGIC_CALL \ + assert(left); assert(right) PERL_CALLCONV bool Perl_Gv_AMupdate(pTHX_ HV* stash) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_AMUPDATE \ + assert(stash) PERL_CALLCONV CV* Perl_gv_handler(pTHX_ HV* stash, I32 id) __attribute__warn_unused_result__; @@ -117,90 +141,138 @@ PERL_CALLCONV OP* Perl_append_list(pTHX_ I32 optype, LISTOP* first, LISTOP* last PERL_CALLCONV I32 Perl_apply(pTHX_ I32 type, SV** mark, SV** sp) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_APPLY \ + assert(mark); assert(sp) PERL_CALLCONV void Perl_apply_attrs_string(pTHX_ const char *stashpv, CV *cv, const char *attrstr, STRLEN len) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_APPLY_ATTRS_STRING \ + assert(stashpv); assert(cv); assert(attrstr) PERL_CALLCONV void Perl_av_clear(pTHX_ AV *av) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_CLEAR \ + assert(av) PERL_CALLCONV SV* Perl_av_delete(pTHX_ AV *av, I32 key, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_DELETE \ + assert(av) PERL_CALLCONV bool Perl_av_exists(pTHX_ AV *av, I32 key) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_EXISTS \ + assert(av) PERL_CALLCONV void Perl_av_extend(pTHX_ AV *av, I32 key) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_EXTEND \ + assert(av) PERL_CALLCONV AV* Perl_av_fake(pTHX_ I32 size, SV **strp) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_AV_FAKE \ + assert(strp) PERL_CALLCONV SV** Perl_av_fetch(pTHX_ AV *av, I32 key, I32 lval) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_FETCH \ + assert(av) PERL_CALLCONV void Perl_av_fill(pTHX_ AV *av, I32 fill) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_FILL \ + assert(av) PERL_CALLCONV I32 Perl_av_len(pTHX_ const AV *av) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_LEN \ + assert(av) PERL_CALLCONV AV* Perl_av_make(pTHX_ I32 size, SV **strp) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_AV_MAKE \ + assert(strp) PERL_CALLCONV SV* Perl_av_pop(pTHX_ AV *av) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_POP \ + assert(av) PERL_CALLCONV void Perl_av_create_and_push(pTHX_ AV **const avp, SV *const val) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_AV_CREATE_AND_PUSH \ + assert(avp); assert(val) PERL_CALLCONV void Perl_av_push(pTHX_ AV *av, SV *val) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_AV_PUSH \ + assert(av); assert(val) PERL_CALLCONV void Perl_av_reify(pTHX_ AV *av) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_REIFY \ + assert(av) PERL_CALLCONV SV* Perl_av_shift(pTHX_ AV *av) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_SHIFT \ + assert(av) PERL_CALLCONV SV** Perl_av_store(pTHX_ AV *av, I32 key, SV *val) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_STORE \ + assert(av) PERL_CALLCONV void Perl_av_undef(pTHX_ AV *av) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_UNDEF \ + assert(av) PERL_CALLCONV SV** Perl_av_create_and_unshift_one(pTHX_ AV **const avp, SV *const val) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_AV_CREATE_AND_UNSHIFT_ONE \ + assert(avp); assert(val) PERL_CALLCONV void Perl_av_unshift(pTHX_ AV *av, I32 num) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_UNSHIFT \ + assert(av) PERL_CALLCONV SV** Perl_av_arylen_p(pTHX_ AV *av) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_ARYLEN_P \ + assert(av) PERL_CALLCONV IV* Perl_av_iter_p(pTHX_ AV *av) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_AV_ITER_P \ + assert(av) #if defined(PERL_IN_AV_C) || defined(PERL_DECL_PROT) STATIC MAGIC* S_get_aux_mg(pTHX_ AV *av) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GET_AUX_MG \ + assert(av) #endif PERL_CALLCONV OP* Perl_bind_match(pTHX_ I32 type, OP *left, OP *right) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_BIND_MATCH \ + assert(left); assert(right) PERL_CALLCONV OP* Perl_block_end(pTHX_ I32 floor, OP* seq) __attribute__warn_unused_result__; @@ -215,10 +287,14 @@ PERL_CALLCONV void Perl_boot_core_UNIVERSAL(pTHX); PERL_CALLCONV void Perl_boot_core_PerlIO(pTHX); PERL_CALLCONV void Perl_call_list(pTHX_ I32 oldscope, AV *paramList) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_CALL_LIST \ + assert(paramList) PERL_CALLCONV bool Perl_cando(pTHX_ Mode_t mode, bool effective, const Stat_t* statbufp) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_CANDO \ + assert(statbufp) PERL_CALLCONV U32 Perl_cast_ulong(pTHX_ NV f) __attribute__warn_unused_result__; @@ -253,80 +329,118 @@ PERL_CALLCONV void Perl_croak_nocontext(const char* pat, ...) __attribute__noreturn__ __attribute__format__(__printf__,1,2) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_CROAK_NOCONTEXT \ + assert(pat) PERL_CALLCONV OP* Perl_die_nocontext(const char* pat, ...) __attribute__format__(__printf__,1,2) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_DIE_NOCONTEXT \ + assert(pat) PERL_CALLCONV void Perl_deb_nocontext(const char* pat, ...) __attribute__format__(__printf__,1,2) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_DEB_NOCONTEXT \ + assert(pat) PERL_CALLCONV char* Perl_form_nocontext(const char* pat, ...) __attribute__format__(__printf__,1,2) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_FORM_NOCONTEXT \ + assert(pat) PERL_CALLCONV void Perl_load_module_nocontext(U32 flags, SV* name, SV* ver, ...) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_LOAD_MODULE_NOCONTEXT \ + assert(name) PERL_CALLCONV SV* Perl_mess_nocontext(const char* pat, ...) __attribute__format__(__printf__,1,2) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_MESS_NOCONTEXT \ + assert(pat) PERL_CALLCONV void Perl_warn_nocontext(const char* pat, ...) __attribute__format__(__printf__,1,2) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_WARN_NOCONTEXT \ + assert(pat) PERL_CALLCONV void Perl_warner_nocontext(U32 err, const char* pat, ...) __attribute__format__(__printf__,2,3) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_WARNER_NOCONTEXT \ + assert(pat) PERL_CALLCONV SV* Perl_newSVpvf_nocontext(const char* pat, ...) __attribute__format__(__printf__,1,2) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_NEWSVPVF_NOCONTEXT \ + assert(pat) PERL_CALLCONV void Perl_sv_catpvf_nocontext(SV* sv, const char* pat, ...) __attribute__format__(__printf__,2,3) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_SV_CATPVF_NOCONTEXT \ + assert(sv); assert(pat) PERL_CALLCONV void Perl_sv_setpvf_nocontext(SV* sv, const char* pat, ...) __attribute__format__(__printf__,2,3) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_SV_SETPVF_NOCONTEXT \ + assert(sv); assert(pat) PERL_CALLCONV void Perl_sv_catpvf_mg_nocontext(SV* sv, const char* pat, ...) __attribute__format__(__printf__,2,3) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_SV_CATPVF_MG_NOCONTEXT \ + assert(sv); assert(pat) PERL_CALLCONV void Perl_sv_setpvf_mg_nocontext(SV* sv, const char* pat, ...) __attribute__format__(__printf__,2,3) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_SV_SETPVF_MG_NOCONTEXT \ + assert(sv); assert(pat) PERL_CALLCONV int Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) __attribute__format__(__printf__,2,3) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_FPRINTF_NOCONTEXT \ + assert(stream); assert(format) PERL_CALLCONV int Perl_printf_nocontext(const char *format, ...) __attribute__format__(__printf__,1,2) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_PRINTF_NOCONTEXT \ + assert(format) #endif PERL_CALLCONV void Perl_cv_ckproto(pTHX_ const CV* cv, const GV* gv, const char* p) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CV_CKPROTO \ + assert(cv) PERL_CALLCONV void Perl_cv_ckproto_len(pTHX_ const CV* cv, const GV* gv, const char* p, const STRLEN len) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CV_CKPROTO_LEN \ + assert(cv) PERL_CALLCONV CV* Perl_cv_clone(pTHX_ CV* proto) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CV_CLONE \ + assert(proto) PERL_CALLCONV SV* Perl_gv_const_sv(pTHX_ GV* gv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_CONST_SV \ + assert(gv) PERL_CALLCONV SV* Perl_cv_const_sv(pTHX_ CV* cv) __attribute__warn_unused_result__; @@ -336,17 +450,25 @@ PERL_CALLCONV SV* Perl_op_const_sv(pTHX_ const OP* o, CV* cv) PERL_CALLCONV void Perl_cv_undef(pTHX_ CV* cv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CV_UNDEF \ + assert(cv) PERL_CALLCONV void Perl_cx_dump(pTHX_ PERL_CONTEXT* cx) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CX_DUMP \ + assert(cx) PERL_CALLCONV SV* Perl_filter_add(pTHX_ filter_t funcp, SV* datasv); PERL_CALLCONV void Perl_filter_del(pTHX_ filter_t funcp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FILTER_DEL \ + assert(funcp) PERL_CALLCONV I32 Perl_filter_read(pTHX_ int idx, SV *buf_sv, int maxlen) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_FILTER_READ \ + assert(buf_sv) PERL_CALLCONV char** Perl_get_op_descs(pTHX) __attribute__warn_unused_result__ @@ -374,13 +496,19 @@ PERL_CALLCONV I32 Perl_cxinc(pTHX) PERL_CALLCONV void Perl_deb(pTHX_ const char* pat, ...) __attribute__format__(__printf__,pTHX_1,pTHX_2) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DEB \ + assert(pat) PERL_CALLCONV void Perl_vdeb(pTHX_ const char* pat, va_list* args) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VDEB \ + assert(pat) PERL_CALLCONV void Perl_debprofdump(pTHX); PERL_CALLCONV I32 Perl_debop(pTHX_ const OP* o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DEBOP \ + assert(o) PERL_CALLCONV I32 Perl_debstack(pTHX); PERL_CALLCONV I32 Perl_debstackptrs(pTHX); @@ -390,13 +518,19 @@ PERL_CALLCONV char* Perl_delimcpy(pTHX_ char* to, const char* toend, const char* __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_6); +#define PERL_ARGS_ASSERT_DELIMCPY \ + assert(to); assert(toend); assert(from); assert(fromend); assert(retlen) PERL_CALLCONV void Perl_delete_eval_scope(pTHX); PERL_CALLCONV void Perl_deprecate(pTHX_ const char *const s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DEPRECATE \ + assert(s) PERL_CALLCONV void Perl_deprecate_old(pTHX_ const char *const s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DEPRECATE_OLD \ + assert(s) PERL_CALLCONV OP* Perl_die(pTHX_ const char* pat, ...) __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2); @@ -407,30 +541,44 @@ PERL_CALLCONV void Perl_dounwind(pTHX_ I32 cxix); /* PERL_CALLCONV bool Perl_do_aexec(pTHX_ SV* really, SV** mark, SV** sp) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); */ +#define PERL_ARGS_ASSERT_DO_AEXEC \ + assert(mark); assert(sp) PERL_CALLCONV bool Perl_do_aexec5(pTHX_ SV* really, SV** mark, SV** sp, int fd, int do_report) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DO_AEXEC5 \ + assert(mark); assert(sp) PERL_CALLCONV int Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_BINMODE \ + assert(fp) PERL_CALLCONV void Perl_do_chop(pTHX_ SV *astr, SV *sv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_CHOP \ + assert(astr); assert(sv) PERL_CALLCONV bool Perl_do_close(pTHX_ GV* gv, bool not_implicit); PERL_CALLCONV bool Perl_do_eof(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_EOF \ + assert(gv) #ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION /* PERL_CALLCONV bool Perl_do_exec(pTHX_ const char* cmd) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_DO_EXEC \ + assert(cmd) #else PERL_CALLCONV bool Perl_do_exec(pTHX_ const char* cmd) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_EXEC \ + assert(cmd) #endif @@ -439,49 +587,71 @@ PERL_CALLCONV int Perl_do_aspawn(pTHX_ SV* really, SV** mark, SV** sp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DO_ASPAWN \ + assert(really); assert(mark); assert(sp) PERL_CALLCONV int Perl_do_spawn(pTHX_ char* cmd) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_SPAWN \ + assert(cmd) PERL_CALLCONV int Perl_do_spawn_nowait(pTHX_ char* cmd) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_SPAWN_NOWAIT \ + assert(cmd) #endif #if !defined(WIN32) PERL_CALLCONV bool Perl_do_exec3(pTHX_ const char *incmd, int fd, int do_report) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_EXEC3 \ + assert(incmd) #endif PERL_CALLCONV void Perl_do_execfree(pTHX); #ifdef PERL_IN_DOIO_C STATIC void S_exec_failed(pTHX_ const char *cmd, int fd, int do_report) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_EXEC_FAILED \ + assert(cmd) #endif #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM) PERL_CALLCONV I32 Perl_do_ipcctl(pTHX_ I32 optype, SV** mark, SV** sp) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DO_IPCCTL \ + assert(mark); assert(sp) PERL_CALLCONV I32 Perl_do_ipcget(pTHX_ I32 optype, SV** mark, SV** sp) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DO_IPCGET \ + assert(mark); assert(sp) PERL_CALLCONV I32 Perl_do_msgrcv(pTHX_ SV** mark, SV** sp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_MSGRCV \ + assert(mark); assert(sp) PERL_CALLCONV I32 Perl_do_msgsnd(pTHX_ SV** mark, SV** sp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_MSGSND \ + assert(mark); assert(sp) PERL_CALLCONV I32 Perl_do_semop(pTHX_ SV** mark, SV** sp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_SEMOP \ + assert(mark); assert(sp) PERL_CALLCONV I32 Perl_do_shmio(pTHX_ I32 optype, SV** mark, SV** sp) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DO_SHMIO \ + assert(mark); assert(sp) #endif PERL_CALLCONV void Perl_do_join(pTHX_ SV *sv, SV *delim, SV **mark, SV **sp) @@ -489,58 +659,86 @@ PERL_CALLCONV void Perl_do_join(pTHX_ SV *sv, SV *delim, SV **mark, SV **sp) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_DO_JOIN \ + assert(sv); assert(delim); assert(mark); assert(sp) PERL_CALLCONV OP* Perl_do_kv(pTHX); /* PERL_CALLCONV bool Perl_do_open(pTHX_ GV* gv, const char* name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO* supplied_fp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_DO_OPEN \ + assert(gv); assert(name) PERL_CALLCONV bool Perl_do_open9(pTHX_ GV *gv, const char *name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs, I32 num) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_8); +#define PERL_ARGS_ASSERT_DO_OPEN9 \ + assert(gv); assert(name); assert(svs) PERL_CALLCONV bool Perl_do_openn(pTHX_ GV *gv, const char *oname, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV **svp, I32 num) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_OPENN \ + assert(gv); assert(oname) PERL_CALLCONV bool Perl_do_print(pTHX_ SV* sv, PerlIO* fp) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_PRINT \ + assert(fp) PERL_CALLCONV OP* Perl_do_readline(pTHX) __attribute__warn_unused_result__; PERL_CALLCONV I32 Perl_do_chomp(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_CHOMP \ + assert(sv) PERL_CALLCONV bool Perl_do_seek(pTHX_ GV* gv, Off_t pos, int whence); PERL_CALLCONV void Perl_do_sprintf(pTHX_ SV* sv, I32 len, SV** sarg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DO_SPRINTF \ + assert(sv); assert(sarg) PERL_CALLCONV Off_t Perl_do_sysseek(pTHX_ GV* gv, Off_t pos, int whence) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_SYSSEEK \ + assert(gv) PERL_CALLCONV Off_t Perl_do_tell(pTHX_ GV* gv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_TELL \ + assert(gv) PERL_CALLCONV I32 Perl_do_trans(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_TRANS \ + assert(sv) PERL_CALLCONV UV Perl_do_vecget(pTHX_ SV* sv, I32 offset, I32 size) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_VECGET \ + assert(sv) PERL_CALLCONV void Perl_do_vecset(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_VECSET \ + assert(sv) PERL_CALLCONV void Perl_do_vop(pTHX_ I32 optype, SV* sv, SV* left, SV* right) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_DO_VOP \ + assert(sv); assert(left); assert(right) PERL_CALLCONV OP* Perl_dofile(pTHX_ OP* term, I32 force_builtin) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DOFILE \ + assert(term) PERL_CALLCONV I32 Perl_dowantarray(pTHX) __attribute__warn_unused_result__; @@ -550,46 +748,70 @@ PERL_CALLCONV void Perl_dump_eval(pTHX); #if defined(DUMP_FDS) PERL_CALLCONV void Perl_dump_fds(pTHX_ char* s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DUMP_FDS \ + assert(s) #endif PERL_CALLCONV void Perl_dump_form(pTHX_ const GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DUMP_FORM \ + assert(gv) PERL_CALLCONV void Perl_gv_dump(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_DUMP \ + assert(gv) PERL_CALLCONV void Perl_op_dump(pTHX_ const OP *o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_OP_DUMP \ + assert(o) PERL_CALLCONV void Perl_pmop_dump(pTHX_ PMOP* pm); PERL_CALLCONV void Perl_dump_packsubs(pTHX_ const HV* stash) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DUMP_PACKSUBS \ + assert(stash) PERL_CALLCONV void Perl_dump_sub(pTHX_ const GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DUMP_SUB \ + assert(gv) PERL_CALLCONV void Perl_fbm_compile(pTHX_ SV* sv, U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FBM_COMPILE \ + assert(sv) PERL_CALLCONV char* Perl_fbm_instr(pTHX_ unsigned char* big, unsigned char* bigend, SV* littlestr, U32 flags) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_FBM_INSTR \ + assert(big); assert(bigend); assert(littlestr) PERL_CALLCONV char* Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char *const *const search_ext, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FIND_SCRIPT \ + assert(scriptname) PERL_CALLCONV OP* Perl_force_list(pTHX_ OP* arg); PERL_CALLCONV OP* Perl_fold_constants(pTHX_ OP *o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FOLD_CONSTANTS \ + assert(o) PERL_CALLCONV char* Perl_form(pTHX_ const char* pat, ...) __attribute__format__(__printf__,pTHX_1,pTHX_2) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FORM \ + assert(pat) PERL_CALLCONV char* Perl_vform(pTHX_ const char* pat, va_list* args) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VFORM \ + assert(pat) PERL_CALLCONV void Perl_free_tmps(pTHX); PERL_CALLCONV OP* Perl_gen_constant_list(pTHX_ OP* o); @@ -597,162 +819,250 @@ PERL_CALLCONV OP* Perl_gen_constant_list(pTHX_ OP* o); PERL_CALLCONV char* Perl_getenv_len(pTHX_ const char *env_elem, unsigned long *len) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GETENV_LEN \ + assert(env_elem); assert(len) #endif PERL_CALLCONV void Perl_get_db_sub(pTHX_ SV **svp, CV *cv) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GET_DB_SUB \ + assert(cv) PERL_CALLCONV void Perl_gp_free(pTHX_ GV* gv); PERL_CALLCONV GP* Perl_gp_ref(pTHX_ GP* gp); PERL_CALLCONV GV* Perl_gv_AVadd(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_AVADD \ + assert(gv) PERL_CALLCONV GV* Perl_gv_HVadd(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_HVADD \ + assert(gv) PERL_CALLCONV GV* Perl_gv_IOadd(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_IOADD \ + assert(gv) PERL_CALLCONV GV* Perl_gv_autoload4(pTHX_ HV* stash, const char* name, STRLEN len, I32 method) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GV_AUTOLOAD4 \ + assert(name) PERL_CALLCONV void Perl_gv_check(pTHX_ const HV* stash) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_CHECK \ + assert(stash) PERL_CALLCONV void Perl_gv_efullname(pTHX_ SV* sv, const GV* gv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GV_EFULLNAME \ + assert(sv); assert(gv) /* PERL_CALLCONV void Perl_gv_efullname3(pTHX_ SV* sv, const GV* gv, const char* prefix) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_GV_EFULLNAME3 \ + assert(sv); assert(gv) PERL_CALLCONV void Perl_gv_efullname4(pTHX_ SV* sv, const GV* gv, const char* prefix, bool keepmain) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GV_EFULLNAME4 \ + assert(sv); assert(gv) PERL_CALLCONV GV* Perl_gv_fetchfile(pTHX_ const char* name) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_FETCHFILE \ + assert(name) PERL_CALLCONV GV* Perl_gv_fetchfile_flags(pTHX_ const char *const name, const STRLEN len, const U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_FETCHFILE_FLAGS \ + assert(name) PERL_CALLCONV GV* Perl_gv_fetchmeth(pTHX_ HV* stash, const char* name, STRLEN len, I32 level) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GV_FETCHMETH \ + assert(name) PERL_CALLCONV GV* Perl_gv_fetchmeth_autoload(pTHX_ HV* stash, const char* name, STRLEN len, I32 level) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GV_FETCHMETH_AUTOLOAD \ + assert(name) /* PERL_CALLCONV GV* Perl_gv_fetchmethod(pTHX_ HV* stash, const char* name) __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_GV_FETCHMETHOD \ + assert(name) PERL_CALLCONV GV* Perl_gv_fetchmethod_autoload(pTHX_ HV* stash, const char* name, I32 autoload) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GV_FETCHMETHOD_AUTOLOAD \ + assert(name) PERL_CALLCONV GV* Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_FETCHPV \ + assert(nambeg) PERL_CALLCONV void Perl_gv_fullname(pTHX_ SV* sv, const GV* gv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GV_FULLNAME \ + assert(sv); assert(gv) /* PERL_CALLCONV void Perl_gv_fullname3(pTHX_ SV* sv, const GV* gv, const char* prefix) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_GV_FULLNAME3 \ + assert(sv); assert(gv) PERL_CALLCONV void Perl_gv_fullname4(pTHX_ SV* sv, const GV* gv, const char* prefix, bool keepmain) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GV_FULLNAME4 \ + assert(sv); assert(gv) PERL_CALLCONV GP * Perl_newGP(pTHX_ GV *const gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWGP \ + assert(gv) PERL_CALLCONV void Perl_gv_init(pTHX_ GV* gv, HV* stash, const char* name, STRLEN len, int multi) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_GV_INIT \ + assert(gv); assert(name) PERL_CALLCONV void Perl_gv_name_set(pTHX_ GV* gv, const char *name, U32 len, U32 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GV_NAME_SET \ + assert(gv); assert(name) PERL_CALLCONV HV* Perl_gv_stashpv(pTHX_ const char* name, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_STASHPV \ + assert(name) PERL_CALLCONV HV* Perl_gv_stashpvn(pTHX_ const char* name, U32 namelen, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_STASHPVN \ + assert(name) PERL_CALLCONV HV* Perl_gv_stashsv(pTHX_ SV* sv, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_STASHSV \ + assert(sv) PERL_CALLCONV void Perl_hv_clear(pTHX_ HV *hv); PERL_CALLCONV HV * Perl_hv_copy_hints_hv(pTHX_ HV *const ohv); PERL_CALLCONV void Perl_hv_delayfree_ent(pTHX_ HV *hv, HE *entry) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_DELAYFREE_ENT \ + assert(hv) /* PERL_CALLCONV SV* Perl_hv_delete(pTHX_ HV *hv, const char *key, I32 klen, I32 flags) __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_HV_DELETE \ + assert(key) /* PERL_CALLCONV SV* Perl_hv_delete_ent(pTHX_ HV *hv, SV *keysv, I32 flags, U32 hash) __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_HV_DELETE_ENT \ + assert(keysv) /* PERL_CALLCONV bool Perl_hv_exists(pTHX_ HV *hv, const char *key, I32 klen) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_HV_EXISTS \ + assert(key) /* PERL_CALLCONV bool Perl_hv_exists_ent(pTHX_ HV *hv, SV *keysv, U32 hash) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_HV_EXISTS_ENT \ + assert(keysv) /* PERL_CALLCONV SV** Perl_hv_fetch(pTHX_ HV *hv, const char *key, I32 klen, I32 lval) __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_HV_FETCH \ + assert(key) /* PERL_CALLCONV HE* Perl_hv_fetch_ent(pTHX_ HV *hv, SV *keysv, I32 lval, U32 hash) __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_HV_FETCH_ENT \ + assert(keysv) PERL_CALLCONV void* Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char* key, STRLEN klen, int flags, int action, SV *val, U32 hash); PERL_CALLCONV void* Perl_hv_common_key_len(pTHX_ HV *hv, const char *key, I32 klen_i32, const int action, SV *val, const U32 hash) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_HV_COMMON_KEY_LEN \ + assert(key) PERL_CALLCONV void Perl_hv_free_ent(pTHX_ HV *hv, HE *entryK) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_FREE_ENT \ + assert(hv) PERL_CALLCONV I32 Perl_hv_iterinit(pTHX_ HV *hv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_ITERINIT \ + assert(hv) PERL_CALLCONV char* Perl_hv_iterkey(pTHX_ HE* entry, I32* retlen) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_HV_ITERKEY \ + assert(entry); assert(retlen) PERL_CALLCONV SV* Perl_hv_iterkeysv(pTHX_ HE* entry) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_ITERKEYSV \ + assert(entry) /* PERL_CALLCONV HE* Perl_hv_iternext(pTHX_ HV *hv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_HV_ITERNEXT \ + assert(hv) PERL_CALLCONV SV* Perl_hv_iternextsv(pTHX_ HV *hv, char **key, I32 *retlen) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_HV_ITERNEXTSV \ + assert(hv); assert(key); assert(retlen) PERL_CALLCONV HE* Perl_hv_iternext_flags(pTHX_ HV *hv, I32 flags) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_ITERNEXT_FLAGS \ + assert(hv) PERL_CALLCONV SV* Perl_hv_iterval(pTHX_ HV *hv, HE *entry) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_HV_ITERVAL \ + assert(hv); assert(entry) PERL_CALLCONV void Perl_hv_ksplit(pTHX_ HV *hv, IV newmax) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_KSPLIT \ + assert(hv) /* PERL_CALLCONV void Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_HV_MAGIC \ + assert(hv) PERL_CALLCONV HV * Perl_refcounted_he_chain_2hv(pTHX_ const struct refcounted_he *c); PERL_CALLCONV SV * Perl_refcounted_he_fetch(pTHX_ const struct refcounted_he *chain, SV *keysv, const char *key, STRLEN klen, int flags, U32 hash); @@ -766,26 +1076,36 @@ PERL_CALLCONV I32 Perl_ibcmp(pTHX_ const char* a, const char* b, I32 len) __attribute__pure__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_IBCMP \ + assert(a); assert(b) PERL_CALLCONV I32 Perl_ibcmp_locale(pTHX_ const char* a, const char* b, I32 len) __attribute__pure__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_IBCMP_LOCALE \ + assert(a); assert(b) PERL_CALLCONV I32 Perl_ibcmp_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_IBCMP_UTF8 \ + assert(s1); assert(s2) PERL_CALLCONV bool Perl_ingroup(pTHX_ Gid_t testgid, bool effective) __attribute__warn_unused_result__; PERL_CALLCONV void Perl_init_argv_symbols(pTHX_ int argc, char **argv) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_INIT_ARGV_SYMBOLS \ + assert(argv) PERL_CALLCONV void Perl_init_debugger(pTHX); PERL_CALLCONV void Perl_init_stacks(pTHX); PERL_CALLCONV void Perl_init_tm(pTHX_ struct tm *ptm) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_INIT_TM \ + assert(ptm) PERL_CALLCONV U32 Perl_intro_my(pTHX); PERL_CALLCONV char* Perl_instr(pTHX_ const char* big, const char* little) @@ -793,9 +1113,13 @@ PERL_CALLCONV char* Perl_instr(pTHX_ const char* big, const char* little) __attribute__pure__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_INSTR \ + assert(big); assert(little) PERL_CALLCONV bool Perl_io_close(pTHX_ IO* io, bool not_implicit) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IO_CLOSE \ + assert(io) PERL_CALLCONV OP* Perl_invert(pTHX_ OP* cmd) __attribute__warn_unused_result__; @@ -803,6 +1127,8 @@ PERL_CALLCONV OP* Perl_invert(pTHX_ OP* cmd) PERL_CALLCONV bool Perl_is_gv_magical(pTHX_ const char *name, STRLEN len, U32 flags) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_GV_MAGICAL \ + assert(name) PERL_CALLCONV I32 Perl_is_lvalue_sub(pTHX) __attribute__warn_unused_result__; @@ -878,18 +1204,26 @@ PERL_CALLCONV bool Perl_is_uni_xdigit(pTHX_ UV c) PERL_CALLCONV UV Perl_to_uni_upper(pTHX_ UV c, U8 *p, STRLEN *lenp) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_TO_UNI_UPPER \ + assert(p); assert(lenp) PERL_CALLCONV UV Perl_to_uni_title(pTHX_ UV c, U8 *p, STRLEN *lenp) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_TO_UNI_TITLE \ + assert(p); assert(lenp) PERL_CALLCONV UV Perl_to_uni_lower(pTHX_ UV c, U8 *p, STRLEN *lenp) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_TO_UNI_LOWER \ + assert(p); assert(lenp) PERL_CALLCONV UV Perl_to_uni_fold(pTHX_ UV c, U8 *p, STRLEN *lenp) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_TO_UNI_FOLD \ + assert(p); assert(lenp) PERL_CALLCONV bool Perl_is_uni_alnum_lc(pTHX_ UV c) __attribute__warn_unused_result__ @@ -949,414 +1283,622 @@ PERL_CALLCONV bool Perl_is_uni_xdigit_lc(pTHX_ UV c) PERL_CALLCONV STRLEN Perl_is_utf8_char(pTHX_ const U8 *s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_CHAR \ + assert(s) PERL_CALLCONV bool Perl_is_utf8_string(pTHX_ const U8 *s, STRLEN len) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_STRING \ + assert(s) /* PERL_CALLCONV bool Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **p) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOC \ + assert(s) PERL_CALLCONV bool Perl_is_utf8_string_loclen(pTHX_ const U8 *s, STRLEN len, const U8 **ep, STRLEN *el) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOCLEN \ + assert(s) PERL_CALLCONV bool Perl_is_utf8_alnum(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_ALNUM \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_alnumc(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_ALNUMC \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_idfirst(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_IDFIRST \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_idcont(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_IDCONT \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_alpha(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_ALPHA \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_ascii(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_ASCII \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_space(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_SPACE \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_cntrl(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_CNTRL \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_digit(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_DIGIT \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_graph(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_GRAPH \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_upper(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_UPPER \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_lower(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_LOWER \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_print(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_PRINT \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_punct(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_PUNCT \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_xdigit(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_XDIGIT \ + assert(p) PERL_CALLCONV bool Perl_is_utf8_mark(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_UTF8_MARK \ + assert(p) PERL_CALLCONV OP* Perl_jmaybe(pTHX_ OP *o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_JMAYBE \ + assert(o) PERL_CALLCONV I32 Perl_keyword(pTHX_ const char *name, I32 len, bool all_keywords) __attribute__pure__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_KEYWORD \ + assert(name) PERL_CALLCONV void Perl_leave_scope(pTHX_ I32 base); PERL_CALLCONV void Perl_lex_end(pTHX); PERL_CALLCONV void Perl_lex_start(pTHX_ SV* line, PerlIO *rsfp, bool new_filter); PERL_CALLCONV void Perl_op_null(pTHX_ OP* o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_OP_NULL \ + assert(o) PERL_CALLCONV void Perl_op_clear(pTHX_ OP* o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_OP_CLEAR \ + assert(o) PERL_CALLCONV void Perl_op_refcnt_lock(pTHX); PERL_CALLCONV void Perl_op_refcnt_unlock(pTHX); PERL_CALLCONV OP* Perl_linklist(pTHX_ OP* o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_LINKLIST \ + assert(o) PERL_CALLCONV OP* Perl_list(pTHX_ OP* o); PERL_CALLCONV OP* Perl_listkids(pTHX_ OP* o); PERL_CALLCONV void Perl_load_module(pTHX_ U32 flags, SV* name, SV* ver, ...) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_LOAD_MODULE \ + assert(name) PERL_CALLCONV void Perl_vload_module(pTHX_ U32 flags, SV* name, SV* ver, va_list* args) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_VLOAD_MODULE \ + assert(name) PERL_CALLCONV OP* Perl_localize(pTHX_ OP *o, I32 lex) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_LOCALIZE \ + assert(o) PERL_CALLCONV I32 Perl_looks_like_number(pTHX_ SV *const sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_LOOKS_LIKE_NUMBER \ + assert(sv) PERL_CALLCONV UV Perl_grok_bin(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_GROK_BIN \ + assert(start); assert(len_p); assert(flags) PERL_CALLCONV UV Perl_grok_hex(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_GROK_HEX \ + assert(start); assert(len_p); assert(flags) PERL_CALLCONV int Perl_grok_number(pTHX_ const char *pv, STRLEN len, UV *valuep) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GROK_NUMBER \ + assert(pv) PERL_CALLCONV bool Perl_grok_numeric_radix(pTHX_ const char **sp, const char *send) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GROK_NUMERIC_RADIX \ + assert(sp); assert(send) PERL_CALLCONV UV Perl_grok_oct(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_GROK_OCT \ + assert(start); assert(len_p); assert(flags) PERL_CALLCONV int Perl_magic_clearenv(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_CLEARENV \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_clear_all_env(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_CLEAR_ALL_ENV \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_clearhint(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_CLEARHINT \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_clearisa(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_CLEARISA \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_clearpack(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_CLEARPACK \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_clearsig(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_CLEARSIG \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_existspack(pTHX_ SV* sv, const MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_EXISTSPACK \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_freeovrld(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_FREEOVRLD \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_get(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_GET \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_getarylen(pTHX_ SV* sv, const MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_GETARYLEN \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_getdefelem(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_GETDEFELEM \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_getnkeys(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_GETNKEYS \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_getpack(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_GETPACK \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_getpos(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_GETPOS \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_getsig(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_GETSIG \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_getsubstr(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_GETSUBSTR \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_gettaint(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_GETTAINT \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_getuvar(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_GETUVAR \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_getvec(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_GETVEC \ + assert(sv); assert(mg) PERL_CALLCONV U32 Perl_magic_len(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_LEN \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_nextpack(pTHX_ SV *sv, MAGIC *mg, SV *key) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_MAGIC_NEXTPACK \ + assert(sv); assert(mg); assert(key) PERL_CALLCONV U32 Perl_magic_regdata_cnt(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_REGDATA_CNT \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_regdatum_get(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_REGDATUM_GET \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg) __attribute__noreturn__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_set(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SET \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setamagic(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETAMAGIC \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setarylen(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETARYLEN \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_freearylen_p(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_FREEARYLEN_P \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setdbline(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETDBLINE \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setdefelem(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETDEFELEM \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setenv(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETENV \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_sethint(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETHINT \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setisa(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETISA \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setmglob(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETMGLOB \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setnkeys(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETNKEYS \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setpack(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETPACK \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setpos(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETPOS \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setregexp(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETREGEXP \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setsig(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETSIG \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setsubstr(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETSUBSTR \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_settaint(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETTAINT \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setuvar(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETUVAR \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setvec(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETVEC \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setutf8(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETUTF8 \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_set_all_env(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SET_ALL_ENV \ + assert(sv); assert(mg) PERL_CALLCONV U32 Perl_magic_sizepack(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SIZEPACK \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_wipepack(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_WIPEPACK \ + assert(sv); assert(mg) PERL_CALLCONV void Perl_magicname(pTHX_ const char* sym, const char* name, I32 namlen) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MAGICNAME \ + assert(sym) PERL_CALLCONV void Perl_markstack_grow(pTHX); #if defined(USE_LOCALE_COLLATE) PERL_CALLCONV int Perl_magic_setcollxfrm(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETCOLLXFRM \ + assert(sv); assert(mg) PERL_CALLCONV char* Perl_mem_collxfrm(pTHX_ const char* s, STRLEN len, STRLEN* xlen) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_MEM_COLLXFRM \ + assert(s); assert(xlen) #endif PERL_CALLCONV SV* Perl_mess(pTHX_ const char* pat, ...) __attribute__format__(__printf__,pTHX_1,pTHX_2) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MESS \ + assert(pat) PERL_CALLCONV SV* Perl_vmess(pTHX_ const char* pat, va_list* args) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VMESS \ + assert(pat) PERL_CALLCONV void Perl_qerror(pTHX_ SV* err) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_QERROR \ + assert(err) PERL_CALLCONV void Perl_sortsv(pTHX_ SV** array, size_t num_elts, SVCOMPARE_t cmp) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SORTSV \ + assert(cmp) PERL_CALLCONV void Perl_sortsv_flags(pTHX_ SV** array, size_t num_elts, SVCOMPARE_t cmp, U32 flags) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SORTSV_FLAGS \ + assert(cmp) PERL_CALLCONV int Perl_mg_clear(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MG_CLEAR \ + assert(sv) PERL_CALLCONV int Perl_mg_copy(pTHX_ SV *sv, SV *nsv, const char *key, I32 klen) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MG_COPY \ + assert(sv); assert(nsv) PERL_CALLCONV void Perl_mg_localize(pTHX_ SV* sv, SV* nsv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MG_LOCALIZE \ + assert(sv); assert(nsv) PERL_CALLCONV MAGIC* Perl_mg_find(pTHX_ const SV* sv, int type) __attribute__warn_unused_result__; PERL_CALLCONV int Perl_mg_free(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MG_FREE \ + assert(sv) PERL_CALLCONV int Perl_mg_get(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MG_GET \ + assert(sv) PERL_CALLCONV U32 Perl_mg_length(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MG_LENGTH \ + assert(sv) PERL_CALLCONV void Perl_mg_magical(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MG_MAGICAL \ + assert(sv) PERL_CALLCONV int Perl_mg_set(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MG_SET \ + assert(sv) PERL_CALLCONV I32 Perl_mg_size(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MG_SIZE \ + assert(sv) PERL_CALLCONV void Perl_mini_mktime(pTHX_ struct tm *ptm) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MINI_MKTIME \ + assert(ptm) PERL_CALLCONV OP* Perl_mod(pTHX_ OP* o, I32 type); PERL_CALLCONV int Perl_mode_from_discipline(pTHX_ SV* discp); PERL_CALLCONV const char* Perl_moreswitches(pTHX_ const char* s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MORESWITCHES \ + assert(s) PERL_CALLCONV OP* Perl_my(pTHX_ OP* o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MY \ + assert(o) PERL_CALLCONV NV Perl_my_atof(pTHX_ const char *s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MY_ATOF \ + assert(s) #if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY)) PERL_CALLCONV char* Perl_my_bcopy(const char* from, char* to, I32 len) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_MY_BCOPY \ + assert(from); assert(to) #endif #if !defined(HAS_BZERO) && !defined(HAS_MEMSET) PERL_CALLCONV char* Perl_my_bzero(char* loc, I32 len) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_MY_BZERO \ + assert(loc) #endif PERL_CALLCONV void Perl_my_exit(pTHX_ U32 status) @@ -1375,26 +1917,36 @@ PERL_CALLCONV I32 Perl_my_memcmp(const char* s1, const char* s2, I32 len) __attribute__pure__ __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_MY_MEMCMP \ + assert(s1); assert(s2) #endif #if !defined(HAS_MEMSET) PERL_CALLCONV void* Perl_my_memset(char* loc, I32 ch, I32 len) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_MY_MEMSET \ + assert(loc) #endif PERL_CALLCONV I32 Perl_my_pclose(pTHX_ PerlIO* ptr); PERL_CALLCONV PerlIO* Perl_my_popen(pTHX_ const char* cmd, const char* mode) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MY_POPEN \ + assert(cmd); assert(mode) PERL_CALLCONV PerlIO* Perl_my_popen_list(pTHX_ const char* mode, int n, SV ** args) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_MY_POPEN_LIST \ + assert(mode); assert(args) PERL_CALLCONV void Perl_my_setenv(pTHX_ const char* nam, const char* val); PERL_CALLCONV I32 Perl_my_stat(pTHX); PERL_CALLCONV char * Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour, int mday, int mon, int year, int wday, int yday, int isdst) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MY_STRFTIME \ + assert(fmt) #if defined(MYSWAP) PERL_CALLCONV short Perl_my_swap(pTHX_ short s) @@ -1431,6 +1983,8 @@ PERL_CALLCONV OP* Perl_newCONDOP(pTHX_ I32 flags, OP* first, OP* trueop, OP* fal __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_NEWCONDOP \ + assert(first) PERL_CALLCONV CV* Perl_newCONSTSUB(pTHX_ HV* stash, const char* name, SV* sv); #ifdef PERL_MAD @@ -1442,23 +1996,31 @@ PERL_CALLCONV OP* Perl_newFOROP(pTHX_ I32 flags, char* label, line_t forline, OP __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_NEWFOROP \ + assert(expr) PERL_CALLCONV OP* Perl_newGIVENOP(pTHX_ OP* cond, OP* block, PADOFFSET defsv_off) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_NEWGIVENOP \ + assert(cond); assert(block) PERL_CALLCONV OP* Perl_newLOGOP(pTHX_ I32 optype, I32 flags, OP *first, OP *other) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_NEWLOGOP \ + assert(first); assert(other) PERL_CALLCONV OP* Perl_newLOOPEX(pTHX_ I32 type, OP* label) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_NEWLOOPEX \ + assert(label) PERL_CALLCONV OP* Perl_newLOOPOP(pTHX_ I32 flags, I32 debuggable, OP* expr, OP* block) __attribute__malloc__ @@ -1474,12 +2036,16 @@ PERL_CALLCONV OP* Perl_newOP(pTHX_ I32 optype, I32 flags) PERL_CALLCONV void Perl_newPROG(pTHX_ OP* o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWPROG \ + assert(o) PERL_CALLCONV OP* Perl_newRANGE(pTHX_ I32 flags, OP* left, OP* right) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_NEWRANGE \ + assert(left); assert(right) PERL_CALLCONV OP* Perl_newSLICEOP(pTHX_ I32 flags, OP* subscript, OP* listop) __attribute__malloc__ @@ -1493,10 +2059,14 @@ PERL_CALLCONV CV* Perl_newSUB(pTHX_ I32 floor, OP* o, OP* proto, OP* block); PERL_CALLCONV CV * Perl_newXS_flags(pTHX_ const char *name, XSUBADDR_t subaddr, const char *const filename, const char *const proto, U32 flags) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_NEWXS_FLAGS \ + assert(subaddr); assert(filename) PERL_CALLCONV CV* Perl_newXS(pTHX_ const char *name, XSUBADDR_t subaddr, const char *filename) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_NEWXS \ + assert(subaddr); assert(filename) /* PERL_CALLCONV AV* Perl_newAV(pTHX) __attribute__warn_unused_result__; */ @@ -1505,6 +2075,8 @@ PERL_CALLCONV OP* Perl_newAVREF(pTHX_ OP* o) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWAVREF \ + assert(o) PERL_CALLCONV OP* Perl_newBINOP(pTHX_ I32 type, I32 flags, OP* first, OP* last) __attribute__malloc__ @@ -1518,11 +2090,15 @@ PERL_CALLCONV OP* Perl_newGVOP(pTHX_ I32 type, I32 flags, GV* gv) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_NEWGVOP \ + assert(gv) PERL_CALLCONV GV* Perl_newGVgen(pTHX_ const char* pack) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWGVGEN \ + assert(pack) PERL_CALLCONV OP* Perl_newGVREF(pTHX_ I32 type, OP* o) __attribute__malloc__ @@ -1532,6 +2108,8 @@ PERL_CALLCONV OP* Perl_newHVREF(pTHX_ OP* o) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWHVREF \ + assert(o) /* PERL_CALLCONV HV* Perl_newHV(pTHX) __attribute__warn_unused_result__; */ @@ -1553,6 +2131,8 @@ PERL_CALLCONV OP* Perl_newPADOP(pTHX_ I32 type, I32 flags, SV* sv) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_NEWPADOP \ + assert(sv) #endif PERL_CALLCONV OP* Perl_newPMOP(pTHX_ I32 type, I32 flags) @@ -1567,11 +2147,15 @@ PERL_CALLCONV SV* Perl_newRV(pTHX_ SV* sv) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWRV \ + assert(sv) PERL_CALLCONV SV* Perl_newRV_noinc(pTHX_ SV* sv) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWRV_NOINC \ + assert(sv) PERL_CALLCONV SV* Perl_newSV(pTHX_ STRLEN len) __attribute__malloc__ @@ -1581,11 +2165,15 @@ PERL_CALLCONV OP* Perl_newSVREF(pTHX_ OP* o) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWSVREF \ + assert(o) PERL_CALLCONV OP* Perl_newSVOP(pTHX_ I32 type, I32 flags, SV* sv) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_NEWSVOP \ + assert(sv) PERL_CALLCONV SV* Perl_newSViv(pTHX_ IV i) __attribute__malloc__ @@ -1624,14 +2212,20 @@ PERL_CALLCONV SV* Perl_newSVpvf(pTHX_ const char* pat, ...) __attribute__warn_unused_result__ __attribute__format__(__printf__,pTHX_1,pTHX_2) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWSVPVF \ + assert(pat) PERL_CALLCONV SV* Perl_vnewSVpvf(pTHX_ const char* pat, va_list* args) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VNEWSVPVF \ + assert(pat) PERL_CALLCONV SV* Perl_newSVrv(pTHX_ SV* rv, const char* classname) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWSVRV \ + assert(rv) PERL_CALLCONV SV* Perl_newSVsv(pTHX_ SV* old) __attribute__malloc__ @@ -1649,6 +2243,8 @@ PERL_CALLCONV OP* Perl_newWHENOP(pTHX_ OP* cond, OP* block) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_NEWWHENOP \ + assert(block) PERL_CALLCONV OP* Perl_newWHILEOP(pTHX_ I32 flags, I32 debuggable, LOOP* loop, I32 whileline, OP* expr, OP* block, OP* cont, I32 has_my) __attribute__malloc__ @@ -1662,35 +2258,55 @@ PERL_CALLCONV char* Perl_scan_vstring(pTHX_ const char *s, const char *const e, __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SCAN_VSTRING \ + assert(s); assert(e); assert(sv) PERL_CALLCONV const char* Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SCAN_VERSION \ + assert(s); assert(rv) PERL_CALLCONV SV* Perl_new_version(pTHX_ SV *ver) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEW_VERSION \ + assert(ver) PERL_CALLCONV SV* Perl_upg_version(pTHX_ SV *ver, bool qv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_UPG_VERSION \ + assert(ver) PERL_CALLCONV bool Perl_vverify(pTHX_ SV *vs) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VVERIFY \ + assert(vs) PERL_CALLCONV SV* Perl_vnumify(pTHX_ SV *vs) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VNUMIFY \ + assert(vs) PERL_CALLCONV SV* Perl_vnormal(pTHX_ SV *vs) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VNORMAL \ + assert(vs) PERL_CALLCONV SV* Perl_vstringify(pTHX_ SV *vs) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VSTRINGIFY \ + assert(vs) PERL_CALLCONV int Perl_vcmp(pTHX_ SV *lhv, SV *rhv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_VCMP \ + assert(lhv); assert(rhv) PERL_CALLCONV PerlIO* Perl_nextargv(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEXTARGV \ + assert(gv) PERL_CALLCONV char* Perl_ninstr(pTHX_ const char* big, const char* bigend, const char* little, const char* lend) __attribute__pure__ @@ -1698,37 +2314,53 @@ PERL_CALLCONV char* Perl_ninstr(pTHX_ const char* big, const char* bigend, const __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_NINSTR \ + assert(big); assert(bigend); assert(little); assert(lend) PERL_CALLCONV OP* Perl_oopsCV(pTHX_ OP* o) __attribute__noreturn__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_OOPSCV \ + assert(o) PERL_CALLCONV void Perl_op_free(pTHX_ OP* arg); #ifdef PERL_MAD PERL_CALLCONV OP* Perl_package(pTHX_ OP* o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PACKAGE \ + assert(o) #else PERL_CALLCONV void Perl_package(pTHX_ OP* o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PACKAGE \ + assert(o) #endif PERL_CALLCONV PADOFFSET Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype); PERL_CALLCONV PADOFFSET Perl_allocmy(pTHX_ const char *const name) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_ALLOCMY \ + assert(name) PERL_CALLCONV PADOFFSET Perl_pad_findmy(pTHX_ const char* name) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PAD_FINDMY \ + assert(name) PERL_CALLCONV PADOFFSET Perl_find_rundefsvoffset(pTHX); PERL_CALLCONV OP* Perl_oopsAV(pTHX_ OP* o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_OOPSAV \ + assert(o) PERL_CALLCONV OP* Perl_oopsHV(pTHX_ OP* o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_OOPSHV \ + assert(o) PERL_CALLCONV void Perl_pad_leavemy(pTHX); PERL_CALLCONV SV* Perl_pad_sv(pTHX_ PADOFFSET po); @@ -1739,6 +2371,8 @@ PERL_CALLCONV void Perl_peep(pTHX_ OP* o); PERL_CALLCONV PerlIO* Perl_start_glob(pTHX_ SV *tmpglob, IO *io) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_START_GLOB \ + assert(tmpglob); assert(io) #if defined(USE_REENTRANT_API) PERL_CALLCONV void Perl_reentrant_size(pTHX); @@ -1746,52 +2380,80 @@ PERL_CALLCONV void Perl_reentrant_init(pTHX); PERL_CALLCONV void Perl_reentrant_free(pTHX); PERL_CALLCONV void* Perl_reentrant_retry(const char *f, ...) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_REENTRANT_RETRY \ + assert(f) #endif PERL_CALLCONV void Perl_call_atexit(pTHX_ ATEXIT_t fn, void *ptr); PERL_CALLCONV I32 Perl_call_argv(pTHX_ const char* sub_name, I32 flags, char** argv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_CALL_ARGV \ + assert(sub_name); assert(argv) PERL_CALLCONV I32 Perl_call_method(pTHX_ const char* methname, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CALL_METHOD \ + assert(methname) PERL_CALLCONV I32 Perl_call_pv(pTHX_ const char* sub_name, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CALL_PV \ + assert(sub_name) PERL_CALLCONV I32 Perl_call_sv(pTHX_ SV* sv, VOL I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CALL_SV \ + assert(sv) PERL_CALLCONV void Perl_despatch_signals(pTHX); PERL_CALLCONV OP * Perl_doref(pTHX_ OP *o, I32 type, bool set_op_ref) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DOREF \ + assert(o) PERL_CALLCONV SV* Perl_eval_pv(pTHX_ const char* p, I32 croak_on_error) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_EVAL_PV \ + assert(p) PERL_CALLCONV I32 Perl_eval_sv(pTHX_ SV* sv, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_EVAL_SV \ + assert(sv) PERL_CALLCONV SV* Perl_get_sv(pTHX_ const char* name, I32 create) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GET_SV \ + assert(name) PERL_CALLCONV AV* Perl_get_av(pTHX_ const char* name, I32 create) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GET_AV \ + assert(name) PERL_CALLCONV HV* Perl_get_hv(pTHX_ const char* name, I32 create) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GET_HV \ + assert(name) PERL_CALLCONV CV* Perl_get_cv(pTHX_ const char* name, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GET_CV \ + assert(name) PERL_CALLCONV CV* Perl_get_cvn_flags(pTHX_ const char* name, STRLEN len, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GET_CVN_FLAGS \ + assert(name) PERL_CALLCONV int Perl_init_i18nl10n(pTHX_ int printwarn); PERL_CALLCONV int Perl_init_i18nl14n(pTHX_ int printwarn); PERL_CALLCONV void Perl_new_collate(pTHX_ const char* newcoll); PERL_CALLCONV void Perl_new_ctype(pTHX_ const char* newctype) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEW_CTYPE \ + assert(newctype) PERL_CALLCONV void Perl_new_numeric(pTHX_ const char* newcoll); PERL_CALLCONV void Perl_set_numeric_local(pTHX); @@ -1799,6 +2461,8 @@ PERL_CALLCONV void Perl_set_numeric_radix(pTHX); PERL_CALLCONV void Perl_set_numeric_standard(pTHX); PERL_CALLCONV void Perl_require_pv(pTHX_ const char* pv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REQUIRE_PV \ + assert(pv) PERL_CALLCONV void Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags) __attribute__nonnull__(pTHX_1) @@ -1807,6 +2471,8 @@ PERL_CALLCONV void Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *pat __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_5) __attribute__nonnull__(pTHX_6); +#define PERL_ARGS_ASSERT_PACK_CAT \ + assert(cat); assert(pat); assert(patend); assert(beglist); assert(endlist); assert(next_in_list) PERL_CALLCONV void Perl_packlist(pTHX_ SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist) __attribute__nonnull__(pTHX_1) @@ -1814,21 +2480,29 @@ PERL_CALLCONV void Perl_packlist(pTHX_ SV *cat, const char *pat, const char *pat __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_PACKLIST \ + assert(cat); assert(pat); assert(patend); assert(beglist); assert(endlist) #ifdef PERL_USES_PL_PIDSTATUS PERL_CALLCONV void Perl_pidgone(pTHX_ Pid_t pid, int status); #endif PERL_CALLCONV void Perl_pmflag(pTHX_ U32* pmfl, int ch) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PMFLAG \ + assert(pmfl) PERL_CALLCONV OP* Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PMRUNTIME \ + assert(o); assert(expr) PERL_CALLCONV OP* Perl_pmtrans(pTHX_ OP* o, OP* expr, OP* repl) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_PMTRANS \ + assert(o); assert(expr); assert(repl) PERL_CALLCONV void Perl_pop_scope(pTHX); PERL_CALLCONV OP* Perl_prepend_elem(pTHX_ I32 optype, OP* head, OP* tail); @@ -1837,12 +2511,18 @@ PERL_CALLCONV void Perl_push_scope(pTHX); PERL_CALLCONV OP* Perl_refkids(pTHX_ OP* o, I32 type); PERL_CALLCONV void Perl_regdump(pTHX_ const regexp* r) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REGDUMP \ + assert(r) PERL_CALLCONV void Perl_regdump(pTHX_ const regexp* r) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REGDUMP \ + assert(r) PERL_CALLCONV SV* Perl_regclass_swash(pTHX_ const regexp *prog, const struct regnode *node, bool doinit, SV **listsvp, SV **altsvp) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REGCLASS_SWASH \ + assert(node) PERL_CALLCONV I32 Perl_pregexec(pTHX_ REGEXP * const prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, U32 nosave) __attribute__nonnull__(pTHX_1) @@ -1850,36 +2530,54 @@ PERL_CALLCONV I32 Perl_pregexec(pTHX_ REGEXP * const prog, char* stringarg, char __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_6); +#define PERL_ARGS_ASSERT_PREGEXEC \ + assert(prog); assert(stringarg); assert(strend); assert(strbeg); assert(screamer) PERL_CALLCONV void Perl_pregfree(pTHX_ REGEXP* r); PERL_CALLCONV void Perl_pregfree2(pTHX_ REGEXP *rx) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PREGFREE2 \ + assert(rx) PERL_CALLCONV REGEXP* Perl_reg_temp_copy(pTHX_ REGEXP* r) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_TEMP_COPY \ + assert(r) PERL_CALLCONV void Perl_regfree_internal(pTHX_ REGEXP *const rx) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REGFREE_INTERNAL \ + assert(rx) #if defined(USE_ITHREADS) PERL_CALLCONV void* Perl_regdupe_internal(pTHX_ REGEXP * const r, CLONE_PARAMS* param) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REGDUPE_INTERNAL \ + assert(r); assert(param) #endif PERL_CALLCONV REGEXP* Perl_pregcomp(pTHX_ const SV * const pattern, const U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PREGCOMP \ + assert(pattern) PERL_CALLCONV REGEXP* Perl_re_compile(pTHX_ const SV * const pattern, U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_RE_COMPILE \ + assert(pattern) PERL_CALLCONV char* Perl_re_intuit_start(pTHX_ REGEXP * const rx, SV* sv, char* strpos, char* strend, const U32 flags, re_scream_pos_data *data) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_RE_INTUIT_START \ + assert(rx); assert(strpos); assert(strend) PERL_CALLCONV SV* Perl_re_intuit_string(pTHX_ REGEXP *const r) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_RE_INTUIT_STRING \ + assert(r) PERL_CALLCONV I32 Perl_regexec_flags(pTHX_ REGEXP *const rx, char *stringarg, char *strend, char *strbeg, I32 minend, SV *sv, void *data, U32 flags) __attribute__nonnull__(pTHX_1) @@ -1887,6 +2585,8 @@ PERL_CALLCONV I32 Perl_regexec_flags(pTHX_ REGEXP *const rx, char *stringarg, ch __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_6); +#define PERL_ARGS_ASSERT_REGEXEC_FLAGS \ + assert(rx); assert(stringarg); assert(strend); assert(strbeg); assert(sv) PERL_CALLCONV regnode* Perl_regnext(pTHX_ regnode* p) __attribute__warn_unused_result__; @@ -1894,53 +2594,81 @@ PERL_CALLCONV regnode* Perl_regnext(pTHX_ regnode* p) PERL_CALLCONV SV* Perl_reg_named_buff(pTHX_ REGEXP * const rx, SV * const key, SV * const value, const U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_NAMED_BUFF \ + assert(rx) PERL_CALLCONV SV* Perl_reg_named_buff_iter(pTHX_ REGEXP * const rx, const SV * const lastkey, const U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_NAMED_BUFF_ITER \ + assert(rx) PERL_CALLCONV SV* Perl_reg_named_buff_fetch(pTHX_ REGEXP * const rx, SV * const namesv, const U32 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REG_NAMED_BUFF_FETCH \ + assert(rx); assert(namesv) PERL_CALLCONV bool Perl_reg_named_buff_exists(pTHX_ REGEXP * const rx, SV * const key, const U32 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REG_NAMED_BUFF_EXISTS \ + assert(rx); assert(key) PERL_CALLCONV SV* Perl_reg_named_buff_firstkey(pTHX_ REGEXP * const rx, const U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_NAMED_BUFF_FIRSTKEY \ + assert(rx) PERL_CALLCONV SV* Perl_reg_named_buff_nextkey(pTHX_ REGEXP * const rx, const U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_NAMED_BUFF_NEXTKEY \ + assert(rx) PERL_CALLCONV SV* Perl_reg_named_buff_scalar(pTHX_ REGEXP * const rx, const U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_NAMED_BUFF_SCALAR \ + assert(rx) PERL_CALLCONV SV* Perl_reg_named_buff_all(pTHX_ REGEXP * const rx, const U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_NAMED_BUFF_ALL \ + assert(rx) PERL_CALLCONV void Perl_reg_numbered_buff_fetch(pTHX_ REGEXP * const rx, const I32 paren, SV * const sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_NUMBERED_BUFF_FETCH \ + assert(rx) PERL_CALLCONV void Perl_reg_numbered_buff_store(pTHX_ REGEXP * const rx, const I32 paren, SV const * const value) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_NUMBERED_BUFF_STORE \ + assert(rx) PERL_CALLCONV I32 Perl_reg_numbered_buff_length(pTHX_ REGEXP * const rx, const SV * const sv, const I32 paren) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REG_NUMBERED_BUFF_LENGTH \ + assert(rx); assert(sv) PERL_CALLCONV SV* Perl_reg_qr_package(pTHX_ REGEXP * const rx) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_QR_PACKAGE \ + assert(rx) PERL_CALLCONV void Perl_regprop(pTHX_ const regexp *prog, SV* sv, const regnode* o) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_REGPROP \ + assert(sv); assert(o) PERL_CALLCONV void Perl_repeatcpy(pTHX_ char* to, const char* from, I32 len, I32 count) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REPEATCPY \ + assert(to); assert(from) PERL_CALLCONV char* Perl_rninstr(pTHX_ const char* big, const char* bigend, const char* little, const char* lend) __attribute__pure__ @@ -1948,28 +2676,40 @@ PERL_CALLCONV char* Perl_rninstr(pTHX_ const char* big, const char* bigend, cons __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_RNINSTR \ + assert(big); assert(bigend); assert(little); assert(lend) PERL_CALLCONV Sighandler_t Perl_rsignal(pTHX_ int i, Sighandler_t t); PERL_CALLCONV int Perl_rsignal_restore(pTHX_ int i, Sigsave_t* t); PERL_CALLCONV int Perl_rsignal_save(pTHX_ int i, Sighandler_t t1, Sigsave_t* save) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_RSIGNAL_SAVE \ + assert(save) PERL_CALLCONV Sighandler_t Perl_rsignal_state(pTHX_ int i); PERL_CALLCONV void Perl_rxres_free(pTHX_ void** rsp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_RXRES_FREE \ + assert(rsp) PERL_CALLCONV void Perl_rxres_restore(pTHX_ void **rsp, REGEXP *rx) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_RXRES_RESTORE \ + assert(rsp); assert(rx) PERL_CALLCONV void Perl_rxres_save(pTHX_ void **rsp, REGEXP *rx) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_RXRES_SAVE \ + assert(rsp); assert(rx) #if !defined(HAS_RENAME) PERL_CALLCONV I32 Perl_same_dirent(pTHX_ const char* a, const char* b) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SAME_DIRENT \ + assert(a); assert(b) #endif PERL_CALLCONV char* Perl_savepv(pTHX_ const char* pv) @@ -1988,37 +2728,55 @@ PERL_CALLCONV char* Perl_savesharedpvn(pTHX_ const char *const pv, const STRLEN __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVESHAREDPVN \ + assert(pv) PERL_CALLCONV char* Perl_savesvpv(pTHX_ SV* sv) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVESVPV \ + assert(sv) PERL_CALLCONV void Perl_savestack_grow(pTHX); PERL_CALLCONV void Perl_savestack_grow_cnt(pTHX_ I32 need); PERL_CALLCONV void Perl_save_aelem(pTHX_ AV* av, I32 idx, SV **sptr) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SAVE_AELEM \ + assert(av); assert(sptr) PERL_CALLCONV I32 Perl_save_alloc(pTHX_ I32 size, I32 pad); PERL_CALLCONV void Perl_save_aptr(pTHX_ AV** aptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_APTR \ + assert(aptr) PERL_CALLCONV AV* Perl_save_ary(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_ARY \ + assert(gv) PERL_CALLCONV void Perl_save_bool(pTHX_ bool* boolp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_BOOL \ + assert(boolp) PERL_CALLCONV void Perl_save_clearsv(pTHX_ SV** svp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_CLEARSV \ + assert(svp) PERL_CALLCONV void Perl_save_delete(pTHX_ HV *hv, char *key, I32 klen) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SAVE_DELETE \ + assert(hv); assert(key) PERL_CALLCONV void Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SAVE_DESTRUCTOR \ + assert(p) PERL_CALLCONV void Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p); PERL_CALLCONV void Perl_save_freesv(pTHX_ SV* sv); @@ -2026,74 +2784,118 @@ PERL_CALLCONV void Perl_save_freeop(pTHX_ OP* o); PERL_CALLCONV void Perl_save_freepv(pTHX_ char* pv); PERL_CALLCONV void Perl_save_generic_svref(pTHX_ SV** sptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_GENERIC_SVREF \ + assert(sptr) PERL_CALLCONV void Perl_save_generic_pvref(pTHX_ char** str) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_GENERIC_PVREF \ + assert(str) PERL_CALLCONV void Perl_save_shared_pvref(pTHX_ char** str) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_SHARED_PVREF \ + assert(str) PERL_CALLCONV void Perl_save_gp(pTHX_ GV* gv, I32 empty) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_GP \ + assert(gv) PERL_CALLCONV HV* Perl_save_hash(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_HASH \ + assert(gv) PERL_CALLCONV void Perl_save_helem(pTHX_ HV *hv, SV *key, SV **sptr) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SAVE_HELEM \ + assert(hv); assert(key); assert(sptr) PERL_CALLCONV void Perl_save_hptr(pTHX_ HV** hptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_HPTR \ + assert(hptr) PERL_CALLCONV void Perl_save_I16(pTHX_ I16* intp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_I16 \ + assert(intp) PERL_CALLCONV void Perl_save_I32(pTHX_ I32* intp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_I32 \ + assert(intp) PERL_CALLCONV void Perl_save_I8(pTHX_ I8* bytep) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_I8 \ + assert(bytep) PERL_CALLCONV void Perl_save_int(pTHX_ int* intp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_INT \ + assert(intp) PERL_CALLCONV void Perl_save_item(pTHX_ SV* item) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_ITEM \ + assert(item) PERL_CALLCONV void Perl_save_iv(pTHX_ IV *ivp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_IV \ + assert(ivp) PERL_CALLCONV void Perl_save_list(pTHX_ SV** sarg, I32 maxsarg) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_LIST \ + assert(sarg) PERL_CALLCONV void Perl_save_long(pTHX_ long* longp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_LONG \ + assert(longp) PERL_CALLCONV void Perl_save_mortalizesv(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_MORTALIZESV \ + assert(sv) PERL_CALLCONV void Perl_save_nogv(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_NOGV \ + assert(gv) PERL_CALLCONV void Perl_save_op(pTHX); PERL_CALLCONV SV* Perl_save_scalar(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_SCALAR \ + assert(gv) PERL_CALLCONV void Perl_save_pptr(pTHX_ char** pptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_PPTR \ + assert(pptr) PERL_CALLCONV void Perl_save_vptr(pTHX_ void *ptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_VPTR \ + assert(ptr) PERL_CALLCONV void Perl_save_re_context(pTHX); PERL_CALLCONV void Perl_save_padsv_and_mortalize(pTHX_ PADOFFSET off); PERL_CALLCONV void Perl_save_sptr(pTHX_ SV** sptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_SPTR \ + assert(sptr) PERL_CALLCONV SV* Perl_save_svref(pTHX_ SV** sptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_SVREF \ + assert(sptr) PERL_CALLCONV OP* Perl_sawparens(pTHX_ OP* o); PERL_CALLCONV OP* Perl_scalar(pTHX_ OP* o); @@ -2101,37 +2903,53 @@ PERL_CALLCONV OP* Perl_scalarkids(pTHX_ OP* o); PERL_CALLCONV OP* Perl_scalarseq(pTHX_ OP* o); PERL_CALLCONV OP* Perl_scalarvoid(pTHX_ OP* o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SCALARVOID \ + assert(o) PERL_CALLCONV NV Perl_scan_bin(pTHX_ const char* start, STRLEN len, STRLEN* retlen) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SCAN_BIN \ + assert(start); assert(retlen) PERL_CALLCONV NV Perl_scan_hex(pTHX_ const char* start, STRLEN len, STRLEN* retlen) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SCAN_HEX \ + assert(start); assert(retlen) PERL_CALLCONV char* Perl_scan_num(pTHX_ const char* s, YYSTYPE *lvalp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SCAN_NUM \ + assert(s); assert(lvalp) PERL_CALLCONV NV Perl_scan_oct(pTHX_ const char* start, STRLEN len, STRLEN* retlen) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SCAN_OCT \ + assert(start); assert(retlen) PERL_CALLCONV OP* Perl_scope(pTHX_ OP* o); PERL_CALLCONV char* Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift, I32 *old_posp, I32 last) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_SCREAMINSTR \ + assert(bigstr); assert(littlestr); assert(old_posp) #if !defined(VMS) PERL_CALLCONV I32 Perl_setenv_getix(pTHX_ const char* nam) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SETENV_GETIX \ + assert(nam) #endif PERL_CALLCONV void Perl_setdefout(pTHX_ GV* gv); PERL_CALLCONV HEK* Perl_share_hek(pTHX_ const char* str, I32 len, U32 hash) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SHARE_HEK \ + assert(str) #if defined(HAS_SIGACTION) && defined(SA_SIGINFO) PERL_CALLCONV Signal_t Perl_sighandler(int sig, siginfo_t *info, void *uap); @@ -2143,27 +2961,41 @@ PERL_CALLCONV Signal_t Perl_csighandler(int sig); PERL_CALLCONV SV** Perl_stack_grow(pTHX_ SV** sp, SV** p, int n) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_STACK_GROW \ + assert(sp); assert(p) PERL_CALLCONV I32 Perl_start_subparse(pTHX_ I32 is_format, U32 flags); PERL_CALLCONV void Perl_sub_crush_depth(pTHX_ CV* cv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SUB_CRUSH_DEPTH \ + assert(cv) PERL_CALLCONV bool Perl_sv_2bool(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_2BOOL \ + assert(sv) PERL_CALLCONV CV* Perl_sv_2cv(pTHX_ SV* sv, HV** st, GV** gvp, I32 lref) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SV_2CV \ + assert(st); assert(gvp) PERL_CALLCONV IO* Perl_sv_2io(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_2IO \ + assert(sv) #ifdef PERL_IN_SV_C STATIC bool S_glob_2number(pTHX_ GV* const gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GLOB_2NUMBER \ + assert(gv) STATIC char* S_glob_2pv(pTHX_ GV* const gv, STRLEN * const len) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GLOB_2PV \ + assert(gv) #endif /* PERL_CALLCONV IV Perl_sv_2iv(pTHX_ SV *sv); */ @@ -2172,78 +3004,118 @@ PERL_CALLCONV SV* Perl_sv_2mortal(pTHX_ SV* sv); PERL_CALLCONV NV Perl_sv_2nv(pTHX_ SV *const sv); PERL_CALLCONV SV* Perl_sv_2num(pTHX_ SV *const sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_2NUM \ + assert(sv) /* PERL_CALLCONV char* Perl_sv_2pv(pTHX_ SV *sv, STRLEN *lp); */ PERL_CALLCONV char* Perl_sv_2pv_flags(pTHX_ SV *const sv, STRLEN *const lp, const I32 flags); PERL_CALLCONV char* Perl_sv_2pvutf8(pTHX_ SV* sv, STRLEN* lp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_2PVUTF8 \ + assert(sv) PERL_CALLCONV char* Perl_sv_2pvbyte(pTHX_ SV *const sv, STRLEN *const lp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_2PVBYTE \ + assert(sv) PERL_CALLCONV char* Perl_sv_pvn_nomg(pTHX_ SV* sv, STRLEN* lp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_PVN_NOMG \ + assert(sv) /* PERL_CALLCONV UV Perl_sv_2uv(pTHX_ SV *sv); */ PERL_CALLCONV UV Perl_sv_2uv_flags(pTHX_ SV *const sv, const I32 flags); PERL_CALLCONV IV Perl_sv_iv(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_IV \ + assert(sv) PERL_CALLCONV UV Perl_sv_uv(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_UV \ + assert(sv) PERL_CALLCONV NV Perl_sv_nv(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_NV \ + assert(sv) PERL_CALLCONV char* Perl_sv_pvn(pTHX_ SV *sv, STRLEN *lp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_PVN \ + assert(sv); assert(lp) PERL_CALLCONV char* Perl_sv_pvutf8n(pTHX_ SV *sv, STRLEN *lp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_PVUTF8N \ + assert(sv); assert(lp) PERL_CALLCONV char* Perl_sv_pvbyten(pTHX_ SV *sv, STRLEN *lp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_PVBYTEN \ + assert(sv); assert(lp) PERL_CALLCONV I32 Perl_sv_true(pTHX_ SV *sv); PERL_CALLCONV void Perl_sv_add_arena(pTHX_ char *const ptr, const U32 size, const U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_ADD_ARENA \ + assert(ptr) PERL_CALLCONV int Perl_sv_backoff(pTHX_ SV *const sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_BACKOFF \ + assert(sv) PERL_CALLCONV SV* Perl_sv_bless(pTHX_ SV* sv, HV* stash) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_BLESS \ + assert(sv); assert(stash) PERL_CALLCONV void Perl_sv_catpvf(pTHX_ SV* sv, const char* pat, ...) __attribute__format__(__printf__,pTHX_2,pTHX_3) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_CATPVF \ + assert(sv); assert(pat) PERL_CALLCONV void Perl_sv_vcatpvf(pTHX_ SV* sv, const char* pat, va_list* args) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_VCATPVF \ + assert(sv); assert(pat) PERL_CALLCONV void Perl_sv_catpv(pTHX_ SV* sv, const char* ptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_CATPV \ + assert(sv) /* PERL_CALLCONV void Perl_sv_catpvn(pTHX_ SV *dsv, const char *sstr, STRLEN len) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_SV_CATPVN \ + assert(dsv); assert(sstr) /* PERL_CALLCONV void Perl_sv_catsv(pTHX_ SV *dstr, SV *sstr) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_CATSV \ + assert(dstr) PERL_CALLCONV void Perl_sv_chop(pTHX_ SV* sv, const char* ptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_CHOP \ + assert(sv) PERL_CALLCONV I32 Perl_sv_clean_all(pTHX); PERL_CALLCONV void Perl_sv_clean_objs(pTHX); PERL_CALLCONV void Perl_sv_clear(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_CLEAR \ + assert(sv) PERL_CALLCONV I32 Perl_sv_cmp(pTHX_ SV* sv1, SV* sv2); PERL_CALLCONV I32 Perl_sv_cmp_locale(pTHX_ SV* sv1, SV* sv2); @@ -2251,6 +3123,8 @@ PERL_CALLCONV I32 Perl_sv_cmp_locale(pTHX_ SV* sv1, SV* sv2); PERL_CALLCONV char* Perl_sv_collxfrm(pTHX_ SV* sv, STRLEN* nxp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_COLLXFRM \ + assert(sv); assert(nxp) #endif PERL_CALLCONV OP* Perl_sv_compile_2op(pTHX_ SV *sv, OP **startop, const char *code, PAD **padp) @@ -2258,53 +3132,77 @@ PERL_CALLCONV OP* Perl_sv_compile_2op(pTHX_ SV *sv, OP **startop, const char *co __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_SV_COMPILE_2OP \ + assert(sv); assert(startop); assert(code); assert(padp) PERL_CALLCONV int Perl_getcwd_sv(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GETCWD_SV \ + assert(sv) PERL_CALLCONV void Perl_sv_dec(pTHX_ SV* sv); PERL_CALLCONV void Perl_sv_dump(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_DUMP \ + assert(sv) PERL_CALLCONV bool Perl_sv_derived_from(pTHX_ SV* sv, const char *const name) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_DERIVED_FROM \ + assert(sv); assert(name) PERL_CALLCONV bool Perl_sv_does(pTHX_ SV* sv, const char *const name) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_DOES \ + assert(sv); assert(name) PERL_CALLCONV I32 Perl_sv_eq(pTHX_ SV* sv1, SV* sv2); PERL_CALLCONV void Perl_sv_free(pTHX_ SV* sv); PERL_CALLCONV void Perl_sv_free2(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_FREE2 \ + assert(sv) PERL_CALLCONV void Perl_sv_free_arenas(pTHX); PERL_CALLCONV char* Perl_sv_gets(pTHX_ SV* sv, PerlIO* fp, I32 append) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_GETS \ + assert(sv); assert(fp) PERL_CALLCONV char* Perl_sv_grow(pTHX_ SV *const sv, STRLEN newlen) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_GROW \ + assert(sv) PERL_CALLCONV void Perl_sv_inc(pTHX_ SV* sv); PERL_CALLCONV void Perl_sv_insert(pTHX_ SV *bigstr, STRLEN offset, STRLEN len, const char *little, STRLEN littlelen) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_SV_INSERT \ + assert(bigstr); assert(little) PERL_CALLCONV int Perl_sv_isa(pTHX_ SV* sv, const char* name) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_ISA \ + assert(name) PERL_CALLCONV int Perl_sv_isobject(pTHX_ SV* sv); PERL_CALLCONV STRLEN Perl_sv_len(pTHX_ SV* sv); PERL_CALLCONV STRLEN Perl_sv_len_utf8(pTHX_ SV* sv); PERL_CALLCONV void Perl_sv_magic(pTHX_ SV* sv, SV* obj, int how, const char* name, I32 namlen) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_MAGIC \ + assert(sv) PERL_CALLCONV MAGIC * Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, const MGVTBL *vtbl, const char* name, I32 namlen) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_MAGICEXT \ + assert(sv) PERL_CALLCONV SV* Perl_sv_mortalcopy(pTHX_ SV* oldsv) __attribute__malloc__ @@ -2317,22 +3215,34 @@ PERL_CALLCONV SV* Perl_sv_newref(pTHX_ SV* sv); PERL_CALLCONV char* Perl_sv_peek(pTHX_ SV* sv); PERL_CALLCONV void Perl_sv_pos_u2b(pTHX_ SV* sv, I32* offsetp, I32* lenp) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_POS_U2B \ + assert(offsetp) PERL_CALLCONV void Perl_sv_pos_b2u(pTHX_ SV* sv, I32* offsetp) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_POS_B2U \ + assert(offsetp) /* PERL_CALLCONV char* Perl_sv_pvn_force(pTHX_ SV* sv, STRLEN* lp) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_PVN_FORCE \ + assert(sv) PERL_CALLCONV char* Perl_sv_pvutf8n_force(pTHX_ SV* sv, STRLEN* lp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_PVUTF8N_FORCE \ + assert(sv) PERL_CALLCONV char* Perl_sv_pvbyten_force(pTHX_ SV* sv, STRLEN* lp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_PVBYTEN_FORCE \ + assert(sv) PERL_CALLCONV char* Perl_sv_recode_to_utf8(pTHX_ SV* sv, SV *encoding) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_RECODE_TO_UTF8 \ + assert(sv); assert(encoding) PERL_CALLCONV bool Perl_sv_cat_decode(pTHX_ SV* dsv, SV *encoding, SV *ssv, int *offset, char* tstr, int tlen) __attribute__nonnull__(pTHX_1) @@ -2340,117 +3250,183 @@ PERL_CALLCONV bool Perl_sv_cat_decode(pTHX_ SV* dsv, SV *encoding, SV *ssv, int __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_SV_CAT_DECODE \ + assert(dsv); assert(encoding); assert(ssv); assert(offset); assert(tstr) PERL_CALLCONV const char* Perl_sv_reftype(pTHX_ const SV* sv, int ob) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_REFTYPE \ + assert(sv) PERL_CALLCONV void Perl_sv_replace(pTHX_ SV* sv, SV* nsv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_REPLACE \ + assert(sv); assert(nsv) PERL_CALLCONV void Perl_sv_report_used(pTHX); PERL_CALLCONV void Perl_sv_reset(pTHX_ const char* s, HV* stash) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_RESET \ + assert(s) PERL_CALLCONV void Perl_sv_setpvf(pTHX_ SV* sv, const char* pat, ...) __attribute__format__(__printf__,pTHX_2,pTHX_3) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_SETPVF \ + assert(sv); assert(pat) PERL_CALLCONV void Perl_sv_vsetpvf(pTHX_ SV* sv, const char* pat, va_list* args) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_VSETPVF \ + assert(sv); assert(pat) PERL_CALLCONV void Perl_sv_setiv(pTHX_ SV *const sv, const IV num) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETIV \ + assert(sv) PERL_CALLCONV void Perl_sv_setpviv(pTHX_ SV* sv, IV num) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETPVIV \ + assert(sv) PERL_CALLCONV void Perl_sv_setuv(pTHX_ SV *const sv, const UV num) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETUV \ + assert(sv) PERL_CALLCONV void Perl_sv_setnv(pTHX_ SV *const sv, const NV num) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETNV \ + assert(sv) PERL_CALLCONV SV* Perl_sv_setref_iv(pTHX_ SV* rv, const char* classname, IV iv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETREF_IV \ + assert(rv) PERL_CALLCONV SV* Perl_sv_setref_uv(pTHX_ SV* rv, const char* classname, UV uv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETREF_UV \ + assert(rv) PERL_CALLCONV SV* Perl_sv_setref_nv(pTHX_ SV* rv, const char* classname, NV nv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETREF_NV \ + assert(rv) PERL_CALLCONV SV* Perl_sv_setref_pv(pTHX_ SV* rv, const char* classname, void* pv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETREF_PV \ + assert(rv) PERL_CALLCONV SV* Perl_sv_setref_pvn(pTHX_ SV* rv, const char* classname, const char* pv, STRLEN n) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SV_SETREF_PVN \ + assert(rv); assert(pv) PERL_CALLCONV void Perl_sv_setpv(pTHX_ SV* sv, const char* ptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETPV \ + assert(sv) PERL_CALLCONV void Perl_sv_setpvn(pTHX_ SV* sv, const char* ptr, STRLEN len) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETPVN \ + assert(sv) /* PERL_CALLCONV void Perl_sv_setsv(pTHX_ SV *dstr, SV *sstr) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_SETSV \ + assert(dstr) /* PERL_CALLCONV void Perl_sv_taint(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_TAINT \ + assert(sv) PERL_CALLCONV bool Perl_sv_tainted(pTHX_ SV* sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_TAINTED \ + assert(sv) PERL_CALLCONV int Perl_sv_unmagic(pTHX_ SV* sv, int type) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_UNMAGIC \ + assert(sv) /* PERL_CALLCONV void Perl_sv_unref(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_UNREF \ + assert(sv) PERL_CALLCONV void Perl_sv_unref_flags(pTHX_ SV *ref, U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_UNREF_FLAGS \ + assert(ref) PERL_CALLCONV void Perl_sv_untaint(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_UNTAINT \ + assert(sv) PERL_CALLCONV void Perl_sv_upgrade(pTHX_ SV *const sv, svtype new_type) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_UPGRADE \ + assert(sv) /* PERL_CALLCONV void Perl_sv_usepvn(pTHX_ SV* sv, char* ptr, STRLEN len) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_USEPVN \ + assert(sv) PERL_CALLCONV void Perl_sv_usepvn_flags(pTHX_ SV* sv, char* ptr, STRLEN len, U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_USEPVN_FLAGS \ + assert(sv) PERL_CALLCONV void Perl_sv_vcatpvfn(pTHX_ SV* sv, const char* pat, STRLEN patlen, va_list* args, SV** svargs, I32 svmax, bool *maybe_tainted) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_VCATPVFN \ + assert(sv); assert(pat) PERL_CALLCONV void Perl_sv_vsetpvfn(pTHX_ SV* sv, const char* pat, STRLEN patlen, va_list* args, SV** svargs, I32 svmax, bool *maybe_tainted) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_VSETPVFN \ + assert(sv); assert(pat) PERL_CALLCONV NV Perl_str_to_version(pTHX_ SV *sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_STR_TO_VERSION \ + assert(sv) PERL_CALLCONV SV* Perl_swash_init(pTHX_ const char* pkg, const char* name, SV* listsv, I32 minbits, I32 none) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SWASH_INIT \ + assert(pkg); assert(name); assert(listsv) PERL_CALLCONV UV Perl_swash_fetch(pTHX_ SV *swash, const U8 *ptr, bool do_utf8) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SWASH_FETCH \ + assert(swash); assert(ptr) PERL_CALLCONV void Perl_taint_env(pTHX); PERL_CALLCONV void Perl_taint_proper(pTHX_ const char* f, const char *const s) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_TAINT_PROPER \ + assert(s) PERL_CALLCONV UV Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special) __attribute__nonnull__(pTHX_1) @@ -2458,26 +3434,38 @@ PERL_CALLCONV UV Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, S __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_5) __attribute__nonnull__(pTHX_6); +#define PERL_ARGS_ASSERT_TO_UTF8_CASE \ + assert(p); assert(ustrp); assert(swashp); assert(normal); assert(special) PERL_CALLCONV UV Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_TO_UTF8_LOWER \ + assert(p); assert(ustrp) PERL_CALLCONV UV Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_TO_UTF8_UPPER \ + assert(p); assert(ustrp) PERL_CALLCONV UV Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_TO_UTF8_TITLE \ + assert(p); assert(ustrp) PERL_CALLCONV UV Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_TO_UTF8_FOLD \ + assert(p); assert(ustrp) #if defined(UNLINK_ALL_VERSIONS) PERL_CALLCONV I32 Perl_unlnk(pTHX_ const char* f) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_UNLNK \ + assert(f) #endif PERL_CALLCONV I32 Perl_unpack_str(pTHX_ const char *pat, const char *patend, const char *s, const char *strbeg, const char *strend, char **new_s, I32 ocnt, U32 flags) @@ -2485,123 +3473,179 @@ PERL_CALLCONV I32 Perl_unpack_str(pTHX_ const char *pat, const char *patend, con __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_UNPACK_STR \ + assert(pat); assert(patend); assert(s); assert(strend) PERL_CALLCONV I32 Perl_unpackstring(pTHX_ const char *pat, const char *patend, const char *s, const char *strend, U32 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_UNPACKSTRING \ + assert(pat); assert(patend); assert(s); assert(strend) PERL_CALLCONV void Perl_unsharepvn(pTHX_ const char* sv, I32 len, U32 hash); PERL_CALLCONV void Perl_unshare_hek(pTHX_ HEK* hek); #ifdef PERL_MAD PERL_CALLCONV OP * Perl_utilize(pTHX_ int aver, I32 floor, OP* version, OP* idop, OP* arg) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_UTILIZE \ + assert(idop) #else PERL_CALLCONV void Perl_utilize(pTHX_ int aver, I32 floor, OP* version, OP* idop, OP* arg) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_UTILIZE \ + assert(idop) #endif PERL_CALLCONV U8* Perl_utf16_to_utf8(pTHX_ U8* p, U8 *d, I32 bytelen, I32 *newlen) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_UTF16_TO_UTF8 \ + assert(p); assert(d); assert(newlen) PERL_CALLCONV U8* Perl_utf16_to_utf8_reversed(pTHX_ U8* p, U8 *d, I32 bytelen, I32 *newlen) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_UTF16_TO_UTF8_REVERSED \ + assert(p); assert(d); assert(newlen) PERL_CALLCONV STRLEN Perl_utf8_length(pTHX_ const U8* s, const U8 *e) __attribute__warn_unused_result__ __attribute__pure__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_UTF8_LENGTH \ + assert(s); assert(e) PERL_CALLCONV IV Perl_utf8_distance(pTHX_ const U8 *a, const U8 *b) __attribute__warn_unused_result__ __attribute__pure__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_UTF8_DISTANCE \ + assert(a); assert(b) PERL_CALLCONV U8* Perl_utf8_hop(pTHX_ const U8 *s, I32 off) __attribute__warn_unused_result__ __attribute__pure__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_UTF8_HOP \ + assert(s) PERL_CALLCONV U8* Perl_utf8_to_bytes(pTHX_ U8 *s, STRLEN *len) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_UTF8_TO_BYTES \ + assert(s); assert(len) PERL_CALLCONV U8* Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *len, bool *is_utf8) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_BYTES_FROM_UTF8 \ + assert(s); assert(len) PERL_CALLCONV U8* Perl_bytes_to_utf8(pTHX_ const U8 *s, STRLEN *len) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_BYTES_TO_UTF8 \ + assert(s); assert(len) PERL_CALLCONV UV Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_UTF8_TO_UVCHR \ + assert(s) PERL_CALLCONV UV Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_UTF8_TO_UVUNI \ + assert(s) #ifdef EBCDIC PERL_CALLCONV UV Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_UTF8N_TO_UVCHR \ + assert(s) #else /* PERL_CALLCONV UV Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_UTF8N_TO_UVCHR \ + assert(s) #endif PERL_CALLCONV UV Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_UTF8N_TO_UVUNI \ + assert(s) #ifdef EBCDIC PERL_CALLCONV U8* Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_UVCHR_TO_UTF8 \ + assert(d) #else /* PERL_CALLCONV U8* Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_UVCHR_TO_UTF8 \ + assert(d) #endif /* PERL_CALLCONV U8* Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_UVUNI_TO_UTF8 \ + assert(d) PERL_CALLCONV U8* Perl_uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_UVCHR_TO_UTF8_FLAGS \ + assert(d) PERL_CALLCONV U8* Perl_uvuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_UVUNI_TO_UTF8_FLAGS \ + assert(d) PERL_CALLCONV char* Perl_pv_uni_display(pTHX_ SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PV_UNI_DISPLAY \ + assert(dsv); assert(spv) PERL_CALLCONV char* Perl_sv_uni_display(pTHX_ SV *dsv, SV *ssv, STRLEN pvlim, UV flags) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_UNI_DISPLAY \ + assert(dsv); assert(ssv) PERL_CALLCONV void Perl_vivify_defelem(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VIVIFY_DEFELEM \ + assert(sv) PERL_CALLCONV void Perl_vivify_ref(pTHX_ SV* sv, U32 to_what) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VIVIFY_REF \ + assert(sv) PERL_CALLCONV I32 Perl_wait4pid(pTHX_ Pid_t pid, int* statusp, int flags) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_WAIT4PID \ + assert(statusp) PERL_CALLCONV U32 Perl_parse_unicode_opts(pTHX_ const char **popt) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PARSE_UNICODE_OPTS \ + assert(popt) PERL_CALLCONV U32 Perl_seed(pTHX); PERL_CALLCONV UV Perl_get_hash_seed(pTHX) @@ -2612,43 +3656,67 @@ PERL_CALLCONV void Perl_report_uninit(pTHX_ SV* uninit_sv); PERL_CALLCONV void Perl_warn(pTHX_ const char* pat, ...) __attribute__format__(__printf__,pTHX_1,pTHX_2) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_WARN \ + assert(pat) PERL_CALLCONV void Perl_vwarn(pTHX_ const char* pat, va_list* args) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VWARN \ + assert(pat) PERL_CALLCONV void Perl_warner(pTHX_ U32 err, const char* pat, ...) __attribute__format__(__printf__,pTHX_2,pTHX_3) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_WARNER \ + assert(pat) PERL_CALLCONV void Perl_vwarner(pTHX_ U32 err, const char* pat, va_list* args) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_VWARNER \ + assert(pat) PERL_CALLCONV void Perl_watch(pTHX_ char** addr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_WATCH \ + assert(addr) PERL_CALLCONV I32 Perl_whichsig(pTHX_ const char* sig) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_WHICHSIG \ + assert(sig) PERL_CALLCONV void Perl_write_to_stderr(pTHX_ const char* message, int msglen) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_WRITE_TO_STDERR \ + assert(message) PERL_CALLCONV int Perl_yyerror(pTHX_ const char *const s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_YYERROR \ + assert(s) PERL_CALLCONV int Perl_yylex(pTHX); PERL_CALLCONV int Perl_yyparse(pTHX); PERL_CALLCONV void Perl_parser_free(pTHX_ const yy_parser *parser) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PARSER_FREE \ + assert(parser) PERL_CALLCONV int Perl_yywarn(pTHX_ const char *const s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_YYWARN \ + assert(s) #if defined(MYMALLOC) PERL_CALLCONV void Perl_dump_mstats(pTHX_ char* s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DUMP_MSTATS \ + assert(s) PERL_CALLCONV int Perl_get_mstats(pTHX_ perl_mstats_t *buf, int buflen, int level) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GET_MSTATS \ + assert(buf) #endif PERL_CALLCONV Malloc_t Perl_safesysmalloc(MEM_SIZE nbytes) @@ -2669,6 +3737,8 @@ PERL_CALLCONV struct perl_vars * Perl_GetVars(pTHX); PERL_CALLCONV struct perl_vars* Perl_init_global_struct(pTHX); PERL_CALLCONV void Perl_free_global_struct(pTHX_ struct perl_vars *plvarsp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FREE_GLOBAL_STRUCT \ + assert(plvarsp) #endif PERL_CALLCONV int Perl_runops_standard(pTHX); @@ -2677,54 +3747,84 @@ PERL_CALLCONV void Perl_sv_catpvf_mg(pTHX_ SV *sv, const char* pat, ...) __attribute__format__(__printf__,pTHX_2,pTHX_3) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_CATPVF_MG \ + assert(sv); assert(pat) PERL_CALLCONV void Perl_sv_vcatpvf_mg(pTHX_ SV* sv, const char* pat, va_list* args) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_VCATPVF_MG \ + assert(sv); assert(pat) PERL_CALLCONV void Perl_sv_catpv_mg(pTHX_ SV *sv, const char *ptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_CATPV_MG \ + assert(sv) /* PERL_CALLCONV void Perl_sv_catpvn_mg(pTHX_ SV *sv, const char *ptr, STRLEN len) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_SV_CATPVN_MG \ + assert(sv); assert(ptr) /* PERL_CALLCONV void Perl_sv_catsv_mg(pTHX_ SV *dsv, SV *ssv) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_CATSV_MG \ + assert(dsv) PERL_CALLCONV void Perl_sv_setpvf_mg(pTHX_ SV *sv, const char* pat, ...) __attribute__format__(__printf__,pTHX_2,pTHX_3) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_SETPVF_MG \ + assert(sv); assert(pat) PERL_CALLCONV void Perl_sv_vsetpvf_mg(pTHX_ SV* sv, const char* pat, va_list* args) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_VSETPVF_MG \ + assert(sv); assert(pat) PERL_CALLCONV void Perl_sv_setiv_mg(pTHX_ SV *const sv, const IV i) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETIV_MG \ + assert(sv) PERL_CALLCONV void Perl_sv_setpviv_mg(pTHX_ SV *sv, IV iv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETPVIV_MG \ + assert(sv) PERL_CALLCONV void Perl_sv_setuv_mg(pTHX_ SV *const sv, const UV u) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETUV_MG \ + assert(sv) PERL_CALLCONV void Perl_sv_setnv_mg(pTHX_ SV *const sv, const NV num) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETNV_MG \ + assert(sv) PERL_CALLCONV void Perl_sv_setpv_mg(pTHX_ SV *sv, const char *ptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETPV_MG \ + assert(sv) PERL_CALLCONV void Perl_sv_setpvn_mg(pTHX_ SV *sv, const char *ptr, STRLEN len) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_SETPVN_MG \ + assert(sv); assert(ptr) PERL_CALLCONV void Perl_sv_setsv_mg(pTHX_ SV *dstr, SV *sstr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETSV_MG \ + assert(dstr) /* PERL_CALLCONV void Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_USEPVN_MG \ + assert(sv) PERL_CALLCONV MGVTBL* Perl_get_vtbl(pTHX_ int vtbl_id) __attribute__warn_unused_result__; @@ -2732,100 +3832,152 @@ PERL_CALLCONV MGVTBL* Perl_get_vtbl(pTHX_ int vtbl_id) PERL_CALLCONV char* Perl_pv_display(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PV_DISPLAY \ + assert(dsv); assert(pv) PERL_CALLCONV char* Perl_pv_escape(pTHX_ SV *dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PV_ESCAPE \ + assert(dsv); assert(str) PERL_CALLCONV char* Perl_pv_pretty(pTHX_ SV *dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PV_PRETTY \ + assert(dsv); assert(str) PERL_CALLCONV void Perl_dump_indent(pTHX_ I32 level, PerlIO *file, const char* pat, ...) __attribute__format__(__printf__,pTHX_3,pTHX_4) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DUMP_INDENT \ + assert(file); assert(pat) PERL_CALLCONV void Perl_dump_vindent(pTHX_ I32 level, PerlIO *file, const char* pat, va_list *args) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DUMP_VINDENT \ + assert(file); assert(pat) PERL_CALLCONV void Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, const char *name, GV *sv) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DO_GV_DUMP \ + assert(file); assert(name) PERL_CALLCONV void Perl_do_gvgv_dump(pTHX_ I32 level, PerlIO *file, const char *name, GV *sv) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DO_GVGV_DUMP \ + assert(file); assert(name) PERL_CALLCONV void Perl_do_hv_dump(pTHX_ I32 level, PerlIO *file, const char *name, HV *sv) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DO_HV_DUMP \ + assert(file); assert(name) PERL_CALLCONV void Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, const MAGIC *mg, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DO_MAGIC_DUMP \ + assert(file); assert(mg) PERL_CALLCONV void Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_OP_DUMP \ + assert(file) PERL_CALLCONV void Perl_do_pmop_dump(pTHX_ I32 level, PerlIO *file, const PMOP *pm) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_PMOP_DUMP \ + assert(file) PERL_CALLCONV void Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_SV_DUMP \ + assert(file) PERL_CALLCONV void Perl_magic_dump(pTHX_ const MAGIC *mg); PERL_CALLCONV void Perl_reginitcolors(pTHX); /* PERL_CALLCONV char* Perl_sv_2pv_nolen(pTHX_ SV* sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_2PV_NOLEN \ + assert(sv) /* PERL_CALLCONV char* Perl_sv_2pvutf8_nolen(pTHX_ SV* sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_2PVUTF8_NOLEN \ + assert(sv) /* PERL_CALLCONV char* Perl_sv_2pvbyte_nolen(pTHX_ SV* sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_2PVBYTE_NOLEN \ + assert(sv) /* PERL_CALLCONV char* Perl_sv_pv(pTHX_ SV *sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_PV \ + assert(sv) /* PERL_CALLCONV char* Perl_sv_pvutf8(pTHX_ SV *sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_PVUTF8 \ + assert(sv) /* PERL_CALLCONV char* Perl_sv_pvbyte(pTHX_ SV *sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_PVBYTE \ + assert(sv) /* PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade(pTHX_ SV *sv) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_UTF8_UPGRADE \ + assert(sv) PERL_CALLCONV bool Perl_sv_utf8_downgrade(pTHX_ SV *sv, bool fail_ok) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_UTF8_DOWNGRADE \ + assert(sv) PERL_CALLCONV void Perl_sv_utf8_encode(pTHX_ SV *sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_UTF8_ENCODE \ + assert(sv) PERL_CALLCONV bool Perl_sv_utf8_decode(pTHX_ SV *sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_UTF8_DECODE \ + assert(sv) /* PERL_CALLCONV void Perl_sv_force_normal(pTHX_ SV *sv) __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_FORCE_NORMAL \ + assert(sv) PERL_CALLCONV void Perl_sv_force_normal_flags(pTHX_ SV *sv, U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_FORCE_NORMAL_FLAGS \ + assert(sv) PERL_CALLCONV void Perl_tmps_grow(pTHX_ I32 n); PERL_CALLCONV SV* Perl_sv_rvweaken(pTHX_ SV *sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_RVWEAKEN \ + assert(sv) PERL_CALLCONV int Perl_magic_killbackrefs(pTHX_ SV *sv, MAGIC *mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_KILLBACKREFS \ + assert(sv); assert(mg) PERL_CALLCONV OP* Perl_newANONATTRSUB(pTHX_ I32 floor, OP *proto, OP *attrs, OP *block); PERL_CALLCONV CV* Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block); @@ -2840,42 +3992,60 @@ PERL_CALLCONV void Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, O #endif PERL_CALLCONV OP * Perl_my_attrs(pTHX_ OP *o, OP *attrs) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MY_ATTRS \ + assert(o) PERL_CALLCONV void Perl_boot_core_xsutils(pTHX); #if defined(USE_ITHREADS) PERL_CALLCONV PERL_CONTEXT* Perl_cx_dup(pTHX_ PERL_CONTEXT* cx, I32 ix, I32 max, CLONE_PARAMS* param) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_CX_DUP \ + assert(param) PERL_CALLCONV PERL_SI* Perl_si_dup(pTHX_ PERL_SI* si, CLONE_PARAMS* param) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SI_DUP \ + assert(param) PERL_CALLCONV ANY* Perl_ss_dup(pTHX_ PerlInterpreter* proto_perl, CLONE_PARAMS* param) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SS_DUP \ + assert(proto_perl); assert(param) PERL_CALLCONV void* Perl_any_dup(pTHX_ void* v, const PerlInterpreter* proto_perl) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_ANY_DUP \ + assert(proto_perl) PERL_CALLCONV HE* Perl_he_dup(pTHX_ const HE* e, bool shared, CLONE_PARAMS* param) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_HE_DUP \ + assert(param) PERL_CALLCONV HEK* Perl_hek_dup(pTHX_ HEK* e, CLONE_PARAMS* param) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_HEK_DUP \ + assert(param) PERL_CALLCONV void Perl_re_dup_guts(pTHX_ const REGEXP *sstr, REGEXP *dstr, CLONE_PARAMS* param) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_RE_DUP_GUTS \ + assert(sstr); assert(dstr); assert(param) PERL_CALLCONV PerlIO* Perl_fp_dup(pTHX_ PerlIO* fp, char type, CLONE_PARAMS* param) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_FP_DUP \ + assert(param) PERL_CALLCONV DIR* Perl_dirp_dup(pTHX_ DIR* dp) __attribute__warn_unused_result__; @@ -2883,22 +4053,32 @@ PERL_CALLCONV DIR* Perl_dirp_dup(pTHX_ DIR* dp) PERL_CALLCONV GP* Perl_gp_dup(pTHX_ GP* gp, CLONE_PARAMS* param) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GP_DUP \ + assert(param) PERL_CALLCONV MAGIC* Perl_mg_dup(pTHX_ MAGIC* mg, CLONE_PARAMS* param) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MG_DUP \ + assert(param) PERL_CALLCONV SV* Perl_sv_dup(pTHX_ const SV* sstr, CLONE_PARAMS* param) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_DUP \ + assert(param) PERL_CALLCONV void Perl_rvpv_dup(pTHX_ SV* dstr, const SV *sstr, CLONE_PARAMS* param) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_RVPV_DUP \ + assert(dstr); assert(sstr); assert(param) PERL_CALLCONV yy_parser* Perl_parser_dup(pTHX_ const yy_parser *proto, CLONE_PARAMS* param) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PARSER_DUP \ + assert(param) #endif PERL_CALLCONV PTR_TBL_t* Perl_ptr_table_new(pTHX) @@ -2908,13 +4088,19 @@ PERL_CALLCONV PTR_TBL_t* Perl_ptr_table_new(pTHX) PERL_CALLCONV void* Perl_ptr_table_fetch(pTHX_ PTR_TBL_t *tbl, const void *sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PTR_TABLE_FETCH \ + assert(tbl) PERL_CALLCONV void Perl_ptr_table_store(pTHX_ PTR_TBL_t *tbl, const void *oldsv, void *newsv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_PTR_TABLE_STORE \ + assert(tbl); assert(newsv) PERL_CALLCONV void Perl_ptr_table_split(pTHX_ PTR_TBL_t *tbl) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PTR_TABLE_SPLIT \ + assert(tbl) PERL_CALLCONV void Perl_ptr_table_clear(pTHX_ PTR_TBL_t *tbl); PERL_CALLCONV void Perl_ptr_table_free(pTHX_ PTR_TBL_t *tbl); @@ -2923,6 +4109,8 @@ PERL_CALLCONV void Perl_ptr_table_free(pTHX_ PTR_TBL_t *tbl); PERL_CALLCONV void Perl_sys_intern_dup(pTHX_ struct interp_intern* src, struct interp_intern* dst) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SYS_INTERN_DUP \ + assert(src); assert(dst) # endif #endif @@ -2934,10 +4122,14 @@ PERL_CALLCONV void Perl_sys_intern_init(pTHX); PERL_CALLCONV const char * Perl_custom_op_name(pTHX_ const OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CUSTOM_OP_NAME \ + assert(o) PERL_CALLCONV const char * Perl_custom_op_desc(pTHX_ const OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CUSTOM_OP_DESC \ + assert(o) PERL_CALLCONV void Perl_sv_nosharing(pTHX_ SV *sv); @@ -2956,41 +4148,59 @@ END_EXTERN_C STATIC I32 S_do_trans_simple(pTHX_ SV * const sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_TRANS_SIMPLE \ + assert(sv) STATIC I32 S_do_trans_count(pTHX_ SV * const sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_TRANS_COUNT \ + assert(sv) STATIC I32 S_do_trans_complex(pTHX_ SV * const sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_TRANS_COMPLEX \ + assert(sv) STATIC I32 S_do_trans_simple_utf8(pTHX_ SV * const sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_TRANS_SIMPLE_UTF8 \ + assert(sv) STATIC I32 S_do_trans_count_utf8(pTHX_ SV * const sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_TRANS_COUNT_UTF8 \ + assert(sv) STATIC I32 S_do_trans_complex_utf8(pTHX_ SV * const sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DO_TRANS_COMPLEX_UTF8 \ + assert(sv) #endif #if defined(PERL_IN_GV_C) || defined(PERL_DECL_PROT) STATIC void S_gv_init_sv(pTHX_ GV *gv, I32 sv_type) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_INIT_SV \ + assert(gv) STATIC HV* S_gv_get_super_pkg(pTHX_ const char* name, I32 namelen) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_GET_SUPER_PKG \ + assert(name) STATIC HV* S_require_tie_mod(pTHX_ GV *gv, const char *varpv, SV* namesv, const char *methpv, const U32 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_REQUIRE_TIE_MOD \ + assert(gv); assert(varpv); assert(namesv); assert(methpv) #endif @@ -3002,9 +4212,13 @@ PERL_CALLCONV void* Perl_get_arena(pTHX_ const size_t svtype, const U32 misc) #if defined(PERL_IN_HV_C) || defined(PERL_DECL_PROT) STATIC void S_hsplit(pTHX_ HV *hv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HSPLIT \ + assert(hv) STATIC void S_hfreeentries(pTHX_ HV *hv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HFREEENTRIES \ + assert(hv) STATIC HE* S_new_he(pTHX) __attribute__malloc__ @@ -3014,51 +4228,73 @@ STATIC HEK* S_save_hek_flags(const char *str, I32 len, U32 hash, int flags) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_SAVE_HEK_FLAGS \ + assert(str) STATIC void S_hv_magic_check(HV *hv, bool *needs_copy, bool *needs_store) __attribute__nonnull__(1) __attribute__nonnull__(2) __attribute__nonnull__(3); +#define PERL_ARGS_ASSERT_HV_MAGIC_CHECK \ + assert(hv); assert(needs_copy); assert(needs_store) STATIC void S_unshare_hek_or_pvn(pTHX_ const HEK* hek, const char* str, I32 len, U32 hash); STATIC HEK* S_share_hek_flags(pTHX_ const char *str, I32 len, U32 hash, int flags) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SHARE_HEK_FLAGS \ + assert(str) STATIC void S_hv_notallowed(pTHX_ int flags, const char *key, I32 klen, const char *msg) __attribute__noreturn__ __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_HV_NOTALLOWED \ + assert(key); assert(msg) STATIC struct xpvhv_aux* S_hv_auxinit(HV *hv) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_HV_AUXINIT \ + assert(hv) STATIC SV* S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, int k_flags, I32 d_flags, U32 hash); STATIC void S_clear_placeholders(pTHX_ HV *hv, U32 items) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CLEAR_PLACEHOLDERS \ + assert(hv) STATIC SV * S_refcounted_he_value(pTHX_ const struct refcounted_he *he) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REFCOUNTED_HE_VALUE \ + assert(he) #endif #if defined(PERL_IN_MG_C) || defined(PERL_DECL_PROT) STATIC void S_save_magic(pTHX_ I32 mgs_ix, SV *sv) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SAVE_MAGIC \ + assert(sv) STATIC int S_magic_methpack(pTHX_ SV *sv, const MAGIC *mg, const char *meth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_MAGIC_METHPACK \ + assert(sv); assert(mg); assert(meth) STATIC int S_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, const char *meth, I32 f, int n, SV *val) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_MAGIC_METHCALL \ + assert(sv); assert(mg); assert(meth) STATIC void S_restore_magic(pTHX_ const void *p); STATIC void S_unwind_handler_stack(pTHX_ const void *p) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_UNWIND_HANDLER_STACK \ + assert(p) #endif @@ -3067,174 +4303,260 @@ STATIC void S_unwind_handler_stack(pTHX_ const void *p) PERL_CALLCONV OP* Perl_ck_anoncode(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_ANONCODE \ + assert(o) PERL_CALLCONV OP* Perl_ck_bitop(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_BITOP \ + assert(o) PERL_CALLCONV OP* Perl_ck_concat(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_CONCAT \ + assert(o) PERL_CALLCONV OP* Perl_ck_defined(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_DEFINED \ + assert(o) PERL_CALLCONV OP* Perl_ck_delete(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_DELETE \ + assert(o) PERL_CALLCONV OP* Perl_ck_die(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_DIE \ + assert(o) PERL_CALLCONV OP* Perl_ck_eof(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_EOF \ + assert(o) PERL_CALLCONV OP* Perl_ck_eval(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_EVAL \ + assert(o) PERL_CALLCONV OP* Perl_ck_exec(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_EXEC \ + assert(o) PERL_CALLCONV OP* Perl_ck_exists(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_EXISTS \ + assert(o) PERL_CALLCONV OP* Perl_ck_exit(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_EXIT \ + assert(o) PERL_CALLCONV OP* Perl_ck_ftst(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_FTST \ + assert(o) PERL_CALLCONV OP* Perl_ck_fun(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_FUN \ + assert(o) PERL_CALLCONV OP* Perl_ck_glob(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_GLOB \ + assert(o) PERL_CALLCONV OP* Perl_ck_grep(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_GREP \ + assert(o) PERL_CALLCONV OP* Perl_ck_index(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_INDEX \ + assert(o) PERL_CALLCONV OP* Perl_ck_join(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_JOIN \ + assert(o) PERL_CALLCONV OP* Perl_ck_lengthconst(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_LENGTHCONST \ + assert(o) PERL_CALLCONV OP* Perl_ck_lfun(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_LFUN \ + assert(o) PERL_CALLCONV OP* Perl_ck_listiob(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_LISTIOB \ + assert(o) PERL_CALLCONV OP* Perl_ck_match(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_MATCH \ + assert(o) PERL_CALLCONV OP* Perl_ck_method(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_METHOD \ + assert(o) PERL_CALLCONV OP* Perl_ck_null(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_NULL \ + assert(o) PERL_CALLCONV OP* Perl_ck_open(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_OPEN \ + assert(o) PERL_CALLCONV OP* Perl_ck_readline(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_READLINE \ + assert(o) PERL_CALLCONV OP* Perl_ck_repeat(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_REPEAT \ + assert(o) PERL_CALLCONV OP* Perl_ck_require(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_REQUIRE \ + assert(o) PERL_CALLCONV OP* Perl_ck_return(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_RETURN \ + assert(o) PERL_CALLCONV OP* Perl_ck_rfun(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_RFUN \ + assert(o) PERL_CALLCONV OP* Perl_ck_rvconst(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_RVCONST \ + assert(o) PERL_CALLCONV OP* Perl_ck_sassign(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_SASSIGN \ + assert(o) PERL_CALLCONV OP* Perl_ck_select(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_SELECT \ + assert(o) PERL_CALLCONV OP* Perl_ck_shift(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_SHIFT \ + assert(o) PERL_CALLCONV OP* Perl_ck_sort(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_SORT \ + assert(o) PERL_CALLCONV OP* Perl_ck_spair(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_SPAIR \ + assert(o) PERL_CALLCONV OP* Perl_ck_split(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_SPLIT \ + assert(o) PERL_CALLCONV OP* Perl_ck_subr(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_SUBR \ + assert(o) PERL_CALLCONV OP* Perl_ck_substr(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_SUBSTR \ + assert(o) PERL_CALLCONV OP* Perl_ck_svconst(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_SVCONST \ + assert(o) PERL_CALLCONV OP* Perl_ck_trunc(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_TRUNC \ + assert(o) PERL_CALLCONV OP* Perl_ck_unpack(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_UNPACK \ + assert(o) PERL_CALLCONV OP* Perl_ck_each(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_EACH \ + assert(o) STATIC bool S_is_handle_constructor(const OP *o, I32 numargs) __attribute__warn_unused_result__ __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_IS_HANDLE_CONSTRUCTOR \ + assert(o) STATIC I32 S_is_list_assignment(pTHX_ const OP *o) __attribute__warn_unused_result__; @@ -3242,21 +4564,31 @@ STATIC I32 S_is_list_assignment(pTHX_ const OP *o) # ifdef USE_ITHREADS STATIC void S_forget_pmop(pTHX_ PMOP *const o, U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FORGET_PMOP \ + assert(o) # else STATIC void S_forget_pmop(pTHX_ PMOP *const o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FORGET_PMOP \ + assert(o) # endif STATIC void S_find_and_forget_pmops(pTHX_ OP *o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FIND_AND_FORGET_PMOPS \ + assert(o) STATIC void S_cop_free(pTHX_ COP *cop) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_COP_FREE \ + assert(cop) STATIC OP* S_modkids(pTHX_ OP *o, I32 type); STATIC OP* S_scalarboolean(pTHX_ OP *o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SCALARBOOLEAN \ + assert(o) STATIC OP* S_newDEFSVOP(pTHX) __attribute__warn_unused_result__; @@ -3265,65 +4597,97 @@ STATIC OP* S_new_logop(pTHX_ I32 type, I32 flags, OP **firstp, OP **otherp) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_NEW_LOGOP \ + assert(firstp); assert(otherp) STATIC void S_simplify_sort(pTHX_ OP *o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SIMPLIFY_SORT \ + assert(o) STATIC const char* S_gv_ename(pTHX_ GV *gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_ENAME \ + assert(gv) STATIC bool S_scalar_mod_type(const OP *o, I32 type) __attribute__warn_unused_result__ __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_SCALAR_MOD_TYPE \ + assert(o) STATIC OP * S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_MY_KID \ + assert(imopsp) STATIC OP * S_dup_attrlist(pTHX_ OP *o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DUP_ATTRLIST \ + assert(o) STATIC void S_apply_attrs(pTHX_ HV *stash, SV *target, OP *attrs, bool for_my) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_APPLY_ATTRS \ + assert(stash); assert(target) STATIC void S_apply_attrs_my(pTHX_ HV *stash, OP *target, OP *attrs, OP **imopsp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_APPLY_ATTRS_MY \ + assert(stash); assert(target); assert(imopsp) STATIC void S_bad_type(pTHX_ I32 n, const char *t, const char *name, const OP *kid) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_BAD_TYPE \ + assert(t); assert(name); assert(kid) STATIC void S_no_bareword_allowed(pTHX_ const OP *o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NO_BAREWORD_ALLOWED \ + assert(o) STATIC OP* S_no_fh_allowed(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NO_FH_ALLOWED \ + assert(o) STATIC OP* S_too_few_arguments(pTHX_ OP *o, const char* name) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_TOO_FEW_ARGUMENTS \ + assert(o); assert(name) STATIC OP* S_too_many_arguments(pTHX_ OP *o, const char* name) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_TOO_MANY_ARGUMENTS \ + assert(o); assert(name) STATIC bool S_looks_like_bool(pTHX_ const OP* o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_LOOKS_LIKE_BOOL \ + assert(o) STATIC OP* S_newGIVWHENOP(pTHX_ OP* cond, OP *block, I32 enter_opcode, I32 leave_opcode, PADOFFSET entertarg) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_NEWGIVWHENOP \ + assert(block) STATIC OP* S_ref_array_or_hash(pTHX_ OP* cond); STATIC void S_process_special_blocks(pTHX_ const char *const fullname, GV *const gv, CV *const cv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_PROCESS_SPECIAL_BLOCKS \ + assert(fullname); assert(gv); assert(cv) #endif #if defined(PL_OP_SLAB_ALLOC) @@ -3333,16 +4697,22 @@ PERL_CALLCONV void* Perl_Slab_Alloc(pTHX_ size_t sz) PERL_CALLCONV void Perl_Slab_Free(pTHX_ void *op) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SLAB_FREE \ + assert(op) # if defined(PERL_DEBUG_READONLY_OPS) PERL_CALLCONV void Perl_pending_Slabs_to_ro(pTHX); PERL_CALLCONV OP * Perl_op_refcnt_inc(pTHX_ OP *o); PERL_CALLCONV PADOFFSET Perl_op_refcnt_dec(pTHX_ OP *o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_OP_REFCNT_DEC \ + assert(o) # if defined(PERL_IN_OP_C) STATIC void S_Slab_to_rw(pTHX_ void *op) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SLAB_TO_RW \ + assert(op) # endif # endif @@ -3352,6 +4722,8 @@ STATIC void S_Slab_to_rw(pTHX_ void *op) STATIC void S_find_beginning(pTHX_ SV* linestr_sv, PerlIO *rsfp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_FIND_BEGINNING \ + assert(linestr_sv); assert(rsfp) STATIC void S_forbid_setid(pTHX_ const char flag, const bool suidscript); STATIC void S_incpush(pTHX_ const char *dir, bool addsubdirs, bool addoldvers, bool usesep, bool canrelocate); @@ -3361,6 +4733,8 @@ STATIC void S_init_main_stash(pTHX); STATIC void S_init_perllib(pTHX); STATIC void S_init_postdump_symbols(pTHX_ int argc, char **argv, char **env) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_INIT_POSTDUMP_SYMBOLS \ + assert(argv) STATIC void S_init_predump_symbols(pTHX); STATIC void S_my_exit_jump(pTHX) @@ -3371,9 +4745,13 @@ STATIC int S_open_script(pTHX_ const char *scriptname, bool dosearch, bool *suid __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_OPEN_SCRIPT \ + assert(scriptname); assert(suidscript); assert(rsfpp) STATIC void S_usage(pTHX_ const char *name) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_USAGE \ + assert(name) #ifdef DOSUID # ifdef IAMSUID @@ -3381,6 +4759,8 @@ STATIC void S_validate_suid(pTHX_ const char *validarg, int fdscript, bool suids __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_VALIDATE_SUID \ + assert(validarg); assert(linestr_sv); assert(rsfp) # else STATIC void S_validate_suid(pTHX_ const char *validarg, const char *scriptname, int fdscript, SV* linestr_sv, PerlIO *rsfp) @@ -3388,12 +4768,16 @@ STATIC void S_validate_suid(pTHX_ const char *validarg, const char *scriptname, __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_VALIDATE_SUID \ + assert(validarg); assert(scriptname); assert(linestr_sv); assert(rsfp) # endif #else # ifndef SETUID_SCRIPTS_ARE_SECURE_NOW STATIC void S_validate_suid(pTHX_ PerlIO *rsfp) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VALIDATE_SUID \ + assert(rsfp) # endif #endif @@ -3407,6 +4791,8 @@ STATIC void S_run_body(pTHX_ I32 oldscope) STATIC SV * S_incpush_if_exists(pTHX_ SV *dir) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_INCPUSH_IF_EXISTS \ + assert(dir) #endif @@ -3414,6 +4800,8 @@ STATIC SV * S_incpush_if_exists(pTHX_ SV *dir) STATIC SV* S_refto(pTHX_ SV* sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REFTO \ + assert(sv) #endif #if defined(PERL_IN_PP_C) || defined(PERL_IN_PP_HOT_C) || defined(PERL_DECL_PROT) @@ -3422,6 +4810,8 @@ PERL_CALLCONV GV* Perl_softref2xv(pTHX_ SV *const sv, const char *const what, co __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_SOFTREF2XV \ + assert(sv); assert(what); assert(spp) #endif @@ -3431,55 +4821,81 @@ STATIC I32 S_unpack_rec(pTHX_ struct tempsym* symptr, const char *s, const char __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_UNPACK_REC \ + assert(symptr); assert(s); assert(strbeg); assert(strend) STATIC SV ** S_pack_rec(pTHX_ SV *cat, struct tempsym* symptr, SV **beglist, SV **endlist) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_PACK_REC \ + assert(cat); assert(symptr); assert(beglist); assert(endlist) STATIC SV* S_mul128(pTHX_ SV *sv, U8 m) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MUL128 \ + assert(sv) STATIC I32 S_measure_struct(pTHX_ struct tempsym* symptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MEASURE_STRUCT \ + assert(symptr) STATIC bool S_next_symbol(pTHX_ struct tempsym* symptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEXT_SYMBOL \ + assert(symptr) STATIC SV* S_is_an_int(pTHX_ const char *s, STRLEN l) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_AN_INT \ + assert(s) STATIC int S_div128(pTHX_ SV *pnum, bool *done) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DIV128 \ + assert(pnum); assert(done) STATIC const char * S_group_end(pTHX_ const char *patptr, const char *patend, char ender) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GROUP_END \ + assert(patptr); assert(patend) STATIC const char * S_get_num(pTHX_ const char *patptr, I32 *lenptr) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GET_NUM \ + assert(patptr); assert(lenptr) STATIC bool S_need_utf8(const char *pat, const char *patend) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_NEED_UTF8 \ + assert(pat); assert(patend) STATIC char S_first_symbol(const char *pat, const char *patend) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_FIRST_SYMBOL \ + assert(pat); assert(patend) STATIC char * S_sv_exp_grow(pTHX_ SV *sv, STRLEN needed) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_EXP_GROW \ + assert(sv) STATIC char * S_bytes_to_uni(const U8 *start, STRLEN len, char *dest) __attribute__warn_unused_result__ __attribute__nonnull__(1) __attribute__nonnull__(3); +#define PERL_ARGS_ASSERT_BYTES_TO_UNI \ + assert(start); assert(dest) #endif @@ -3493,10 +4909,14 @@ STATIC OP* S_dofindlabel(pTHX_ OP *o, const char *label, OP **opstack, OP **opli __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_DOFINDLABEL \ + assert(o); assert(label); assert(opstack); assert(oplimit) STATIC OP* S_doparseform(pTHX_ SV *sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DOPARSEFORM \ + assert(sv) STATIC bool S_num_overflow(NV value, I32 fldsize, I32 frcsize) __attribute__warn_unused_result__; @@ -3510,6 +4930,8 @@ STATIC I32 S_dopoptogiven(pTHX_ I32 startingblock) STATIC I32 S_dopoptolabel(pTHX_ const char *label) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DOPOPTOLABEL \ + assert(label) STATIC I32 S_dopoptoloop(pTHX_ I32 startingblock) __attribute__warn_unused_result__; @@ -3517,43 +4939,61 @@ STATIC I32 S_dopoptoloop(pTHX_ I32 startingblock) STATIC I32 S_dopoptosub_at(pTHX_ const PERL_CONTEXT* cxstk, I32 startingblock) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DOPOPTOSUB_AT \ + assert(cxstk) STATIC I32 S_dopoptowhen(pTHX_ I32 startingblock) __attribute__warn_unused_result__; STATIC void S_save_lines(pTHX_ AV *array, SV *sv) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SAVE_LINES \ + assert(sv) STATIC bool S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq); STATIC PerlIO * S_check_type_and_open(pTHX_ const char *name) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CHECK_TYPE_AND_OPEN \ + assert(name) #ifndef PERL_DISABLE_PMC STATIC PerlIO * S_doopen_pm(pTHX_ const char *name, const STRLEN namelen) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DOOPEN_PM \ + assert(name) #endif STATIC bool S_path_is_absolute(const char *name) __attribute__warn_unused_result__ __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_PATH_IS_ABSOLUTE \ + assert(name) STATIC I32 S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_RUN_USER_FILTER \ + assert(buf_sv) STATIC PMOP* S_make_matcher(pTHX_ REGEXP* re) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MAKE_MATCHER \ + assert(re) STATIC bool S_matcher_matches_sv(pTHX_ PMOP* matcher, SV* sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MATCHER_MATCHES_SV \ + assert(matcher); assert(sv) STATIC void S_destroy_matcher(pTHX_ PMOP* matcher) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DESTROY_MATCHER \ + assert(matcher) STATIC OP* S_do_smartmatch(pTHX_ HV* seen_this, HV* seen_other); #endif @@ -3563,10 +5003,14 @@ STATIC void S_do_oddball(pTHX_ HV *hash, SV **relem, SV **firstrelem) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DO_ODDBALL \ + assert(hash); assert(relem); assert(firstrelem) STATIC SV* S_method_common(pTHX_ SV* meth, U32* hashp) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_METHOD_COMMON \ + assert(meth) #endif @@ -3574,41 +5018,61 @@ STATIC SV* S_method_common(pTHX_ SV* meth, U32* hashp) STATIC I32 S_sv_ncmp(pTHX_ SV *a, SV *b) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_NCMP \ + assert(a); assert(b) STATIC I32 S_sv_i_ncmp(pTHX_ SV *a, SV *b) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_I_NCMP \ + assert(a); assert(b) STATIC I32 S_amagic_ncmp(pTHX_ SV *a, SV *b) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_AMAGIC_NCMP \ + assert(a); assert(b) STATIC I32 S_amagic_i_ncmp(pTHX_ SV *a, SV *b) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_AMAGIC_I_NCMP \ + assert(a); assert(b) STATIC I32 S_amagic_cmp(pTHX_ SV *str1, SV *str2) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_AMAGIC_CMP \ + assert(str1); assert(str2) STATIC I32 S_amagic_cmp_locale(pTHX_ SV *str1, SV *str2) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE \ + assert(str1); assert(str2) STATIC I32 S_sortcv(pTHX_ SV *a, SV *b) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SORTCV \ + assert(a); assert(b) STATIC I32 S_sortcv_xsub(pTHX_ SV *a, SV *b) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SORTCV_XSUB \ + assert(a); assert(b) STATIC I32 S_sortcv_stacked(pTHX_ SV *a, SV *b) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SORTCV_STACKED \ + assert(a); assert(b) STATIC void S_qsortsvu(pTHX_ SV** array, size_t num_elts, SVCOMPARE_t compare) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_QSORTSVU \ + assert(compare) #endif @@ -3617,16 +5081,22 @@ STATIC OP* S_doform(pTHX_ CV *cv, GV *gv, OP *retop) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DOFORM \ + assert(cv); assert(gv); assert(retop) # if !defined(HAS_MKDIR) || !defined(HAS_RMDIR) STATIC int S_dooneliner(pTHX_ const char *cmd, const char *filename) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DOONELINER \ + assert(cmd); assert(filename) # endif STATIC SV * S_space_join_names_mortal(pTHX_ char *const *array) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SPACE_JOIN_NAMES_MORTAL \ + assert(array) #endif @@ -3634,99 +5104,149 @@ STATIC SV * S_space_join_names_mortal(pTHX_ char *const *array) STATIC regnode* S_reg(pTHX_ struct RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_REG \ + assert(pRExC_state); assert(flagp) STATIC regnode* S_reganode(pTHX_ struct RExC_state_t *pRExC_state, U8 op, U32 arg) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REGANODE \ + assert(pRExC_state) STATIC regnode* S_regatom(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REGATOM \ + assert(pRExC_state); assert(flagp) STATIC regnode* S_regbranch(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REGBRANCH \ + assert(pRExC_state); assert(flagp) STATIC STRLEN S_reguni(pTHX_ const struct RExC_state_t *pRExC_state, UV uv, char *s) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_REGUNI \ + assert(pRExC_state); assert(s) STATIC regnode* S_regclass(pTHX_ struct RExC_state_t *pRExC_state, U32 depth) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REGCLASS \ + assert(pRExC_state) STATIC I32 S_regcurly(const char *s) __attribute__warn_unused_result__ __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_REGCURLY \ + assert(s) STATIC regnode* S_reg_node(pTHX_ struct RExC_state_t *pRExC_state, U8 op) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_NODE \ + assert(pRExC_state) STATIC UV S_reg_recode(pTHX_ const char value, SV **encp) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REG_RECODE \ + assert(encp) STATIC regnode* S_regpiece(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REGPIECE \ + assert(pRExC_state); assert(flagp) STATIC regnode* S_reg_namedseq(pTHX_ struct RExC_state_t *pRExC_state, UV *valuep) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_NAMEDSEQ \ + assert(pRExC_state) STATIC void S_reginsert(pTHX_ struct RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_REGINSERT \ + assert(pRExC_state); assert(opnd) STATIC void S_regtail(pTHX_ struct RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_REGTAIL \ + assert(pRExC_state); assert(p); assert(val) STATIC SV * S_reg_scan_name(pTHX_ struct RExC_state_t *pRExC_state, U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_SCAN_NAME \ + assert(pRExC_state) STATIC U32 S_join_exact(pTHX_ struct RExC_state_t *pRExC_state, regnode *scan, I32 *min, U32 flags, regnode *val, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_JOIN_EXACT \ + assert(pRExC_state); assert(scan); assert(min) STATIC char * S_regwhite(struct RExC_state_t *pRExC_state, char *p) __attribute__warn_unused_result__ __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_REGWHITE \ + assert(pRExC_state); assert(p) STATIC char * S_nextchar(pTHX_ struct RExC_state_t *pRExC_state) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEXTCHAR \ + assert(pRExC_state) STATIC bool S_reg_skipcomment(pTHX_ struct RExC_state_t *pRExC_state) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REG_SKIPCOMMENT \ + assert(pRExC_state) STATIC void S_scan_commit(pTHX_ const struct RExC_state_t *pRExC_state, struct scan_data_t *data, I32 *minlenp, int is_inf) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SCAN_COMMIT \ + assert(pRExC_state); assert(data); assert(minlenp) STATIC void S_cl_anything(const struct RExC_state_t *pRExC_state, struct regnode_charclass_class *cl) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_CL_ANYTHING \ + assert(pRExC_state); assert(cl) STATIC int S_cl_is_anything(const struct regnode_charclass_class *cl) __attribute__warn_unused_result__ __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_CL_IS_ANYTHING \ + assert(cl) STATIC void S_cl_init(const struct RExC_state_t *pRExC_state, struct regnode_charclass_class *cl) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_CL_INIT \ + assert(pRExC_state); assert(cl) STATIC void S_cl_init_zero(const struct RExC_state_t *pRExC_state, struct regnode_charclass_class *cl) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_CL_INIT_ZERO \ + assert(pRExC_state); assert(cl) STATIC void S_cl_and(struct regnode_charclass_class *cl, const struct regnode_charclass_class *and_with) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_CL_AND \ + assert(cl); assert(and_with) STATIC void S_cl_or(const struct RExC_state_t *pRExC_state, struct regnode_charclass_class *cl, const struct regnode_charclass_class *or_with) __attribute__nonnull__(1) __attribute__nonnull__(2) __attribute__nonnull__(3); +#define PERL_ARGS_ASSERT_CL_OR \ + assert(pRExC_state); assert(cl); assert(or_with) STATIC I32 S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp, I32 *minlenp, I32 *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U8* recursed, struct regnode_charclass_class *and_withp, U32 flags, U32 depth) __attribute__nonnull__(pTHX_1) @@ -3734,22 +5254,32 @@ STATIC I32 S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_STUDY_CHUNK \ + assert(pRExC_state); assert(scanp); assert(minlenp); assert(deltap); assert(last) STATIC U32 S_add_data(struct RExC_state_t *pRExC_state, U32 n, const char *s) __attribute__warn_unused_result__ __attribute__nonnull__(1) __attribute__nonnull__(3); +#define PERL_ARGS_ASSERT_ADD_DATA \ + assert(pRExC_state); assert(s) STATIC void S_re_croak2(pTHX_ const char* pat1, const char* pat2, ...) __attribute__noreturn__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_RE_CROAK2 \ + assert(pat1); assert(pat2) STATIC I32 S_regpposixcc(pTHX_ struct RExC_state_t *pRExC_state, I32 value) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REGPPOSIXCC \ + assert(pRExC_state) STATIC void S_checkposixcc(pTHX_ struct RExC_state_t *pRExC_state) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CHECKPOSIXCC \ + assert(pRExC_state) STATIC I32 S_make_trie(pTHX_ struct RExC_state_t *pRExC_state, regnode *startbranch, regnode *first, regnode *last, regnode *tail, U32 word_count, U32 flags, U32 depth) __attribute__nonnull__(pTHX_1) @@ -3757,11 +5287,15 @@ STATIC I32 S_make_trie(pTHX_ struct RExC_state_t *pRExC_state, regnode *startbra __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_MAKE_TRIE \ + assert(pRExC_state); assert(startbranch); assert(first); assert(last); assert(tail) STATIC void S_make_trie_failtable(pTHX_ struct RExC_state_t *pRExC_state, regnode *source, regnode *stclass, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_MAKE_TRIE_FAILTABLE \ + assert(pRExC_state); assert(source); assert(stclass) # ifdef DEBUGGING STATIC void S_regdump_extflags(pTHX_ const char *lead, const U32 flags); @@ -3770,26 +5304,38 @@ STATIC const regnode* S_dumpuntil(pTHX_ const regexp *r, const regnode *start, c __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_6); +#define PERL_ARGS_ASSERT_DUMPUNTIL \ + assert(r); assert(start); assert(node); assert(sv) STATIC void S_put_byte(pTHX_ SV* sv, int c) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PUT_BYTE \ + assert(sv) STATIC void S_dump_trie(pTHX_ const struct _reg_trie_data *trie, HV* widecharmap, AV *revcharmap, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DUMP_TRIE \ + assert(trie); assert(revcharmap) STATIC void S_dump_trie_interim_list(pTHX_ const struct _reg_trie_data *trie, HV* widecharmap, AV *revcharmap, U32 next_alloc, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DUMP_TRIE_INTERIM_LIST \ + assert(trie); assert(revcharmap) STATIC void S_dump_trie_interim_table(pTHX_ const struct _reg_trie_data *trie, HV* widecharmap, AV *revcharmap, U32 next_alloc, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_DUMP_TRIE_INTERIM_TABLE \ + assert(trie); assert(revcharmap) STATIC U8 S_regtail_study(pTHX_ struct RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_REGTAIL_STUDY \ + assert(pRExC_state); assert(p); assert(val) # endif #endif @@ -3799,30 +5345,42 @@ STATIC I32 S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REGMATCH \ + assert(reginfo); assert(prog) STATIC I32 S_regrepeat(pTHX_ const regexp *prog, const regnode *p, I32 max, int depth) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REGREPEAT \ + assert(prog); assert(p) STATIC I32 S_regtry(pTHX_ regmatch_info *reginfo, char **startpos) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REGTRY \ + assert(reginfo); assert(startpos) STATIC bool S_reginclass(pTHX_ const regexp *prog, const regnode *n, const U8 *p, STRLEN *lenp, bool do_utf8sv_is_utf8) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_REGINCLASS \ + assert(n); assert(p) STATIC CHECKPOINT S_regcppush(pTHX_ I32 parenfloor); STATIC char* S_regcppop(pTHX_ const regexp *rex) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REGCPPOP \ + assert(rex) STATIC U8* S_reghop3(U8 *s, I32 off, const U8 *lim) __attribute__warn_unused_result__ __attribute__nonnull__(1) __attribute__nonnull__(3); +#define PERL_ARGS_ASSERT_REGHOP3 \ + assert(s); assert(lim) #ifdef XXX_dmq STATIC U8* S_reghop4(U8 *s, I32 off, const U8 *llim, const U8 *rlim) @@ -3830,12 +5388,16 @@ STATIC U8* S_reghop4(U8 *s, I32 off, const U8 *llim, const U8 *rlim) __attribute__nonnull__(1) __attribute__nonnull__(3) __attribute__nonnull__(4); +#define PERL_ARGS_ASSERT_REGHOP4 \ + assert(s); assert(llim); assert(rlim) #endif STATIC U8* S_reghopmaybe3(U8 *s, I32 off, const U8 *lim) __attribute__warn_unused_result__ __attribute__nonnull__(1) __attribute__nonnull__(3); +#define PERL_ARGS_ASSERT_REGHOPMAYBE3 \ + assert(s); assert(lim) STATIC char* S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, const char *strend, regmatch_info *reginfo) __attribute__warn_unused_result__ @@ -3843,20 +5405,30 @@ STATIC char* S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, cons __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_FIND_BYCLASS \ + assert(prog); assert(c); assert(s); assert(strend) STATIC void S_swap_match_buff(pTHX_ regexp * prog) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SWAP_MATCH_BUFF \ + assert(prog) STATIC void S_to_utf8_substr(pTHX_ regexp * prog) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_TO_UTF8_SUBSTR \ + assert(prog) STATIC void S_to_byte_substr(pTHX_ regexp * prog) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_TO_BYTE_SUBSTR \ + assert(prog) STATIC I32 S_reg_check_named_buff_matched(pTHX_ const regexp *rex, const regnode *scan) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REG_CHECK_NAMED_BUFF_MATCHED \ + assert(rex); assert(scan) # ifdef DEBUGGING STATIC void S_dump_exec_pos(pTHX_ const char *locinput, const regnode *scan, const char *loc_regeol, const char *loc_bostr, const char *loc_reg_starttry, const bool do_utf8) @@ -3865,12 +5437,16 @@ STATIC void S_dump_exec_pos(pTHX_ const char *locinput, const regnode *scan, con __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_DUMP_EXEC_POS \ + assert(locinput); assert(scan); assert(loc_regeol); assert(loc_bostr); assert(loc_reg_starttry) STATIC void S_debug_start_match(pTHX_ const REGEXP *prog, const bool do_utf8, const char *start, const char *end, const char *blurb) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_DEBUG_START_MATCH \ + assert(prog); assert(start); assert(end); assert(blurb) # endif #endif @@ -3879,18 +5455,24 @@ STATIC void S_debug_start_match(pTHX_ const REGEXP *prog, const bool do_utf8, co STATIC CV* S_deb_curcv(pTHX_ const I32 ix); STATIC void S_debprof(pTHX_ const OP *o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DEBPROF \ + assert(o) STATIC void S_sequence(pTHX_ const OP *o); STATIC void S_sequence_tail(pTHX_ const OP *o); STATIC UV S_sequence_num(pTHX_ const OP *o); STATIC SV* S_pm_description(pTHX_ const PMOP *pm) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PM_DESCRIPTION \ + assert(pm) #endif #if defined(PERL_IN_SCOPE_C) || defined(PERL_DECL_PROT) STATIC SV* S_save_scalar_at(pTHX_ SV **sptr) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_SCALAR_AT \ + assert(sptr) #endif @@ -3898,6 +5480,8 @@ STATIC SV* S_save_scalar_at(pTHX_ SV **sptr) PERL_CALLCONV void Perl_sv_add_backref(pTHX_ SV *tsv, SV *sv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_ADD_BACKREF \ + assert(tsv); assert(sv) #endif @@ -3905,6 +5489,8 @@ PERL_CALLCONV void Perl_sv_add_backref(pTHX_ SV *tsv, SV *sv) PERL_CALLCONV int Perl_sv_kill_backrefs(pTHX_ SV *sv, AV *av) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_KILL_BACKREFS \ + assert(sv); assert(av) #endif @@ -3913,19 +5499,29 @@ STATIC char * S_uiv_2buf(char *const buf, const IV iv, UV uv, const int is_uv, c __attribute__warn_unused_result__ __attribute__nonnull__(1) __attribute__nonnull__(5); +#define PERL_ARGS_ASSERT_UIV_2BUF \ + assert(buf); assert(peob) STATIC void S_sv_unglob(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_UNGLOB \ + assert(sv) STATIC void S_not_a_number(pTHX_ SV *const sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NOT_A_NUMBER \ + assert(sv) STATIC I32 S_visit(pTHX_ SVFUNC_t f, const U32 flags, const U32 mask) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VISIT \ + assert(f) STATIC void S_sv_del_backref(pTHX_ SV *tsv, SV *sv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_DEL_BACKREF \ + assert(tsv); assert(sv) STATIC SV * S_varname(pTHX_ GV *gv, const char gvtype, PADOFFSET targ, SV *keyname, I32 aindex, int subscript_type) __attribute__warn_unused_result__; @@ -3933,74 +5529,104 @@ STATIC SV * S_varname(pTHX_ GV *gv, const char gvtype, PADOFFSET targ, SV *keyna # ifdef DEBUGGING STATIC void S_del_sv(pTHX_ SV *p) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DEL_SV \ + assert(p) # endif # if !defined(NV_PRESERVES_UV) # ifdef DEBUGGING STATIC int S_sv_2iuv_non_preserve(pTHX_ SV *const sv, I32 numtype) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_2IUV_NON_PRESERVE \ + assert(sv) # else STATIC int S_sv_2iuv_non_preserve(pTHX_ SV *const sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_2IUV_NON_PRESERVE \ + assert(sv) # endif # endif STATIC I32 S_expect_number(pTHX_ char** pattern) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_EXPECT_NUMBER \ + assert(pattern) # STATIC STRLEN S_sv_pos_u2b_forwards(const U8 *const start, const U8 *const send, STRLEN uoffset) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_SV_POS_U2B_FORWARDS \ + assert(start); assert(send) STATIC STRLEN S_sv_pos_u2b_midway(const U8 *const start, const U8 *send, STRLEN uoffset, STRLEN uend) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_SV_POS_U2B_MIDWAY \ + assert(start); assert(send) STATIC STRLEN S_sv_pos_u2b_cached(pTHX_ SV *sv, MAGIC **mgp, const U8 *const start, const U8 *const send, STRLEN uoffset, STRLEN uoffset0, STRLEN boffset0) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_SV_POS_U2B_CACHED \ + assert(sv); assert(mgp); assert(start); assert(send) STATIC void S_utf8_mg_pos_cache_update(pTHX_ SV *sv, MAGIC **mgp, STRLEN byte, STRLEN utf8, STRLEN blen) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_UTF8_MG_POS_CACHE_UPDATE \ + assert(sv); assert(mgp) STATIC STRLEN S_sv_pos_b2u_midway(pTHX_ const U8 *s, const U8 *const target, const U8 *end, STRLEN endu) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SV_POS_B2U_MIDWAY \ + assert(s); assert(target); assert(end) STATIC char * S_F0convert(NV nv, char *endbuf, STRLEN *len) __attribute__nonnull__(2) __attribute__nonnull__(3); +#define PERL_ARGS_ASSERT_F0CONVERT \ + assert(endbuf); assert(len) # if defined(PERL_OLD_COPY_ON_WRITE) STATIC void S_sv_release_COW(pTHX_ SV *sv, const char *pvx, SV *after) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SV_RELEASE_COW \ + assert(sv); assert(pvx); assert(after) # endif STATIC SV * S_more_sv(pTHX); STATIC void * S_more_bodies(pTHX_ const svtype sv_type); STATIC bool S_sv_2iuv_common(pTHX_ SV *const sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_2IUV_COMMON \ + assert(sv) STATIC void S_glob_assign_glob(pTHX_ SV *dstr, SV *sstr, const int dtype) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GLOB_ASSIGN_GLOB \ + assert(dstr); assert(sstr) STATIC void S_glob_assign_ref(pTHX_ SV *dstr, SV *sstr) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GLOB_ASSIGN_REF \ + assert(dstr); assert(sstr) STATIC PTR_TBL_ENT_t * S_ptr_table_find(PTR_TBL_t *tbl, const void *sv) __attribute__warn_unused_result__ __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_PTR_TABLE_FIND \ + assert(tbl) #endif @@ -4009,93 +5635,139 @@ STATIC void S_check_uni(pTHX); STATIC void S_force_next(pTHX_ I32 type); STATIC char* S_force_version(pTHX_ char *s, int guessing) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FORCE_VERSION \ + assert(s) STATIC char* S_force_word(pTHX_ char *start, int token, int check_keyword, int allow_pack, int allow_tick) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FORCE_WORD \ + assert(start) STATIC SV* S_tokeq(pTHX_ SV *sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_TOKEQ \ + assert(sv) STATIC void S_readpipe_override(pTHX); STATIC char* S_scan_const(pTHX_ char *start) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SCAN_CONST \ + assert(start) STATIC char* S_scan_formline(pTHX_ char *s) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SCAN_FORMLINE \ + assert(s) STATIC char* S_scan_heredoc(pTHX_ char *s) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SCAN_HEREDOC \ + assert(s) STATIC char* S_scan_ident(pTHX_ char *s, const char *send, char *dest, STRLEN destlen, I32 ck_uni) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SCAN_IDENT \ + assert(s); assert(send); assert(dest) STATIC char* S_scan_inputsymbol(pTHX_ char *start) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SCAN_INPUTSYMBOL \ + assert(start) STATIC char* S_scan_pat(pTHX_ char *start, I32 type) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SCAN_PAT \ + assert(start) STATIC char* S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SCAN_STR \ + assert(start) STATIC char* S_scan_subst(pTHX_ char *start) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SCAN_SUBST \ + assert(start) STATIC char* S_scan_trans(pTHX_ char *start) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SCAN_TRANS \ + assert(start) STATIC char* S_scan_word(pTHX_ char *s, char *dest, STRLEN destlen, int allow_package, STRLEN *slp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_SCAN_WORD \ + assert(s); assert(dest); assert(slp) STATIC void S_update_debugger_info(pTHX_ SV *orig_sv, const char *const buf, STRLEN len); STATIC char* S_skipspace(pTHX_ char *s) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SKIPSPACE \ + assert(s) STATIC char* S_swallow_bom(pTHX_ U8 *s) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SWALLOW_BOM \ + assert(s) STATIC void S_checkcomma(pTHX_ const char *s, const char *name, const char *what) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_CHECKCOMMA \ + assert(s); assert(name); assert(what) STATIC bool S_feature_is_enabled(pTHX_ const char *const name, STRLEN namelen) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FEATURE_IS_ENABLED \ + assert(name) STATIC void S_force_ident(pTHX_ const char *s, int kind) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FORCE_IDENT \ + assert(s) STATIC void S_incline(pTHX_ const char *s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_INCLINE \ + assert(s) STATIC int S_intuit_method(pTHX_ char *s, GV *gv, CV *cv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_INTUIT_METHOD \ + assert(s) STATIC int S_intuit_more(pTHX_ char *s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_INTUIT_MORE \ + assert(s) STATIC I32 S_lop(pTHX_ I32 f, int x, char *s) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_LOP \ + assert(s) STATIC void S_missingterm(pTHX_ char *s) __attribute__noreturn__; STATIC void S_no_op(pTHX_ const char *const what, char *s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NO_OP \ + assert(what) STATIC I32 S_sublex_done(pTHX) __attribute__warn_unused_result__; @@ -4110,33 +5782,47 @@ STATIC char * S_filter_gets(pTHX_ SV *sv, PerlIO *fp, STRLEN append) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_FILTER_GETS \ + assert(sv); assert(fp) STATIC HV * S_find_in_my_stash(pTHX_ const char *pkgname, STRLEN len) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FIND_IN_MY_STASH \ + assert(pkgname) STATIC char * S_tokenize_use(pTHX_ int is_use, char *s) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_TOKENIZE_USE \ + assert(s) STATIC SV* S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, STRLEN keylen, SV *sv, SV *pv, const char *type, STRLEN typelen) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_NEW_CONSTANT \ + assert(key); assert(sv) STATIC int S_ao(pTHX_ int toketype); # if defined(PERL_CR_FILTER) STATIC I32 S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen); STATIC void S_strip_return(pTHX_ SV *sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_STRIP_RETURN \ + assert(sv) # endif # if defined(DEBUGGING) STATIC int S_tokereport(pTHX_ I32 rv, const YYSTYPE* lvalp) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_TOKEREPORT \ + assert(lvalp) STATIC void S_printbuf(pTHX_ const char *const fmt, const char *const s) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PRINTBUF \ + assert(fmt); assert(s) # endif #endif @@ -4144,6 +5830,8 @@ STATIC void S_printbuf(pTHX_ const char *const fmt, const char *const s) #if defined(PERL_IN_UNIVERSAL_C) || defined(PERL_DECL_PROT) STATIC bool S_isa_lookup(pTHX_ HV *stash, const char * const name, const HV * const name_stash) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_ISA_LOOKUP \ + assert(name) #endif @@ -4151,6 +5839,8 @@ STATIC bool S_isa_lookup(pTHX_ HV *stash, const char * const name, const HV * co #if defined(USE_LOCALE_NUMERIC) || defined(USE_LOCALE_COLLATE) STATIC char* S_stdize_locale(pTHX_ char* locs) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_STDIZE_LOCALE \ + assert(locs) #endif #endif @@ -4158,6 +5848,8 @@ STATIC char* S_stdize_locale(pTHX_ char* locs) #if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT) STATIC const COP* S_closest_cop(pTHX_ const COP *cop, const OP *o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CLOSEST_COP \ + assert(cop) STATIC SV* S_mess_alloc(pTHX); STATIC const char * S_vdie_croak_common(pTHX_ const char *pat, va_list *args, STRLEN *msglen, I32* utf8); @@ -4175,16 +5867,22 @@ STATIC NV S_mulexp10(NV value, I32 exponent); STATIC STRLEN S_is_utf8_char_slow(const U8 *s, const STRLEN len) __attribute__warn_unused_result__ __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_IS_UTF8_CHAR_SLOW \ + assert(s) STATIC bool S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char * const swashname) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_IS_UTF8_COMMON \ + assert(p); assert(swash); assert(swashname) STATIC SV* S_swash_get(pTHX_ SV* swash, UV start, UV span) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SWASH_GET \ + assert(swash) #endif @@ -4192,27 +5890,41 @@ START_EXTERN_C PERL_CALLCONV void Perl_sv_setsv_flags(pTHX_ SV *dstr, SV *sstr, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_SETSV_FLAGS \ + assert(dstr) PERL_CALLCONV void Perl_sv_catpvn_flags(pTHX_ SV *dstr, const char *sstr, STRLEN len, I32 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_CATPVN_FLAGS \ + assert(dstr); assert(sstr) PERL_CALLCONV void Perl_sv_catsv_flags(pTHX_ SV* dsv, SV* ssv, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_CATSV_FLAGS \ + assert(dsv) PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade_flags(pTHX_ SV *sv, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_UTF8_UPGRADE_FLAGS \ + assert(sv) PERL_CALLCONV char* Perl_sv_pvn_force_flags(pTHX_ SV* sv, STRLEN* lp, I32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_PVN_FORCE_FLAGS \ + assert(sv) PERL_CALLCONV void Perl_sv_copypv(pTHX_ SV *const dsv, SV *const ssv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_COPYPV \ + assert(dsv); assert(ssv) PERL_CALLCONV char* Perl_my_atof2(pTHX_ const char *s, NV* value) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MY_ATOF2 \ + assert(s); assert(value) PERL_CALLCONV int Perl_my_socketpair(int family, int type, int protocol, int fd[2]); PERL_CALLCONV int Perl_my_dirfd(pTHX_ DIR* dir); @@ -4220,6 +5932,8 @@ PERL_CALLCONV int Perl_my_dirfd(pTHX_ DIR* dir); PERL_CALLCONV SV* Perl_sv_setsv_cow(pTHX_ SV* dsv, SV* ssv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_SETSV_COW \ + assert(dsv); assert(ssv) #endif @@ -4238,12 +5952,18 @@ PERL_CALLCONV void Perl_PerlIO_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR *ptr, int cnt PERL_CALLCONV void Perl_PerlIO_setlinebuf(pTHX_ PerlIO *f); PERL_CALLCONV SSize_t Perl_PerlIO_read(pTHX_ PerlIO *f, void *vbuf, Size_t count) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PERLIO_READ \ + assert(vbuf) PERL_CALLCONV SSize_t Perl_PerlIO_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PERLIO_WRITE \ + assert(vbuf) PERL_CALLCONV SSize_t Perl_PerlIO_unread(pTHX_ PerlIO *f, const void *vbuf, Size_t count) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PERLIO_UNREAD \ + assert(vbuf) PERL_CALLCONV Off_t Perl_PerlIO_tell(pTHX_ PerlIO *f); PERL_CALLCONV int Perl_PerlIO_seek(pTHX_ PerlIO *f, Off_t offset, int whence); @@ -4272,6 +5992,8 @@ PERL_CALLCONV void Perl_deb_stack_all(pTHX); #ifdef PERL_IN_DEB_C STATIC void S_deb_stack_n(pTHX_ SV** stack_base, I32 stack_min, I32 stack_max, I32 mark_min, I32 mark_max) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DEB_STACK_N \ + assert(stack_base) #endif @@ -4281,35 +6003,51 @@ PERL_CALLCONV PADLIST* Perl_pad_new(pTHX_ int flags) PERL_CALLCONV void Perl_pad_undef(pTHX_ CV* cv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PAD_UNDEF \ + assert(cv) PERL_CALLCONV PADOFFSET Perl_pad_add_name(pTHX_ const char *name, HV* typestash, HV* ourstash, bool clone, bool state) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PAD_ADD_NAME \ + assert(name) PERL_CALLCONV PADOFFSET Perl_pad_add_anon(pTHX_ SV* sv, OPCODE op_type) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PAD_ADD_ANON \ + assert(sv) PERL_CALLCONV void Perl_pad_check_dup(pTHX_ const char* name, bool is_our, const HV* ourstash) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_PAD_CHECK_DUP \ + assert(name); assert(ourstash) #ifdef DEBUGGING PERL_CALLCONV void Perl_pad_setsv(pTHX_ PADOFFSET po, SV* sv) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PAD_SETSV \ + assert(sv) #endif PERL_CALLCONV void Perl_pad_block_start(pTHX_ int full); PERL_CALLCONV void Perl_pad_tidy(pTHX_ padtidy_type type); PERL_CALLCONV void Perl_do_dump_pad(pTHX_ I32 level, PerlIO *file, PADLIST *padlist, int full) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_DUMP_PAD \ + assert(file) PERL_CALLCONV void Perl_pad_fixup_inner_anons(pTHX_ PADLIST *padlist, CV *old_cv, CV *new_cv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_PAD_FIXUP_INNER_ANONS \ + assert(padlist); assert(old_cv); assert(new_cv) PERL_CALLCONV void Perl_pad_push(pTHX_ PADLIST *padlist, int depth) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PAD_PUSH \ + assert(padlist) PERL_CALLCONV HV* Perl_pad_compname_type(pTHX_ const PADOFFSET po) __attribute__warn_unused_result__; @@ -4321,11 +6059,15 @@ STATIC PADOFFSET S_pad_findlex(pTHX_ const char *name, const CV* cv, U32 seq, in __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_6) __attribute__nonnull__(pTHX_7); +#define PERL_ARGS_ASSERT_PAD_FINDLEX \ + assert(name); assert(cv); assert(out_name_sv); assert(out_flags) # if defined(DEBUGGING) STATIC void S_cv_dump(pTHX_ const CV *cv, const char *title) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_CV_DUMP \ + assert(cv); assert(title) # endif #endif @@ -4337,70 +6079,106 @@ PERL_CALLCONV void Perl_free_tied_hv_pool(pTHX); PERL_CALLCONV int Perl_get_debug_opts(pTHX_ const char **s, bool givehelp) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GET_DEBUG_OPTS \ + assert(s) #endif PERL_CALLCONV void Perl_save_set_svflags(pTHX_ SV *sv, U32 mask, U32 val) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_SET_SVFLAGS \ + assert(sv) PERL_CALLCONV void Perl_hv_assert(pTHX_ HV *hv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_ASSERT \ + assert(hv) PERL_CALLCONV SV* Perl_hv_scalar(pTHX_ HV *hv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_SCALAR \ + assert(hv) PERL_CALLCONV I32* Perl_hv_riter_p(pTHX_ HV *hv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_RITER_P \ + assert(hv) PERL_CALLCONV HE** Perl_hv_eiter_p(pTHX_ HV *hv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_EITER_P \ + assert(hv) PERL_CALLCONV void Perl_hv_riter_set(pTHX_ HV *hv, I32 riter) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_RITER_SET \ + assert(hv) PERL_CALLCONV void Perl_hv_eiter_set(pTHX_ HV *hv, HE *eiter) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_EITER_SET \ + assert(hv) PERL_CALLCONV void Perl_hv_name_set(pTHX_ HV *hv, const char *name, U32 len, U32 flags) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_NAME_SET \ + assert(hv) PERL_CALLCONV AV** Perl_hv_backreferences_p(pTHX_ HV *hv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_BACKREFERENCES_P \ + assert(hv) #if defined(PERL_IN_DUMP_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) PERL_CALLCONV void Perl_hv_kill_backrefs(pTHX_ HV *hv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_KILL_BACKREFS \ + assert(hv) #endif PERL_CALLCONV void Perl_hv_clear_placeholders(pTHX_ HV *hv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_CLEAR_PLACEHOLDERS \ + assert(hv) PERL_CALLCONV I32* Perl_hv_placeholders_p(pTHX_ HV *hv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_PLACEHOLDERS_P \ + assert(hv) PERL_CALLCONV I32 Perl_hv_placeholders_get(pTHX_ HV *hv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_PLACEHOLDERS_GET \ + assert(hv) PERL_CALLCONV void Perl_hv_placeholders_set(pTHX_ HV *hv, I32 ph) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_HV_PLACEHOLDERS_SET \ + assert(hv) PERL_CALLCONV SV* Perl_magic_scalarpack(pTHX_ HV *hv, MAGIC *mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SCALARPACK \ + assert(hv); assert(mg) #if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) STATIC SV * S_find_hash_subscript(pTHX_ HV *hv, SV *val) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_FIND_HASH_SUBSCRIPT \ + assert(val) STATIC I32 S_find_array_subscript(pTHX_ AV *av, SV *val) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_FIND_ARRAY_SUBSCRIPT \ + assert(val) STATIC SV* S_find_uninit_var(pTHX_ OP* obase, SV* uninit_sv, bool top); #endif @@ -4481,34 +6259,48 @@ PERL_CALLCONV long Perl_my_betohl(long n); PERL_CALLCONV void Perl_my_swabn(void* ptr, int n) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_MY_SWABN \ + assert(ptr) PERL_CALLCONV GV* Perl_gv_fetchpvn_flags(pTHX_ const char* name, STRLEN len, I32 flags, I32 sv_type) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_FETCHPVN_FLAGS \ + assert(name) PERL_CALLCONV GV* Perl_gv_fetchsv(pTHX_ SV *name, I32 flags, I32 sv_type) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_FETCHSV \ + assert(name) PERL_CALLCONV bool Perl_is_gv_magical_sv(pTHX_ SV *name, U32 flags) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_IS_GV_MAGICAL_SV \ + assert(name) PERL_CALLCONV bool Perl_stashpv_hvname_match(pTHX_ const COP *c, const HV *hv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_STASHPV_HVNAME_MATCH \ + assert(c); assert(hv) #ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP PERL_CALLCONV void Perl_dump_sv_child(pTHX_ SV *sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DUMP_SV_CHILD \ + assert(sv) #endif #ifdef PERL_DONT_CREATE_GVSV PERL_CALLCONV GV* Perl_gv_SVadd(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_SVADD \ + assert(gv) #endif PERL_CALLCONV bool Perl_ckwarn(pTHX_ U32 w); @@ -4517,16 +6309,22 @@ PERL_CALLCONV STRLEN * Perl_new_warnings_bitfield(pTHX_ STRLEN *buffer, const ch __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_NEW_WARNINGS_BITFIELD \ + assert(bits) PERL_CALLCONV void Perl_offer_nice_chunk(pTHX_ void *const chunk, const U32 chunk_size) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_OFFER_NICE_CHUNK \ + assert(chunk) #ifndef SPRINTF_RETURNS_STRLEN PERL_CALLCONV int Perl_my_sprintf(char *buffer, const char *pat, ...) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_MY_SPRINTF \ + assert(buffer); assert(pat) #endif @@ -4534,10 +6332,14 @@ PERL_CALLCONV int Perl_my_snprintf(char *buffer, const Size_t len, const char *f __attribute__format__(__printf__,3,4) __attribute__nonnull__(1) __attribute__nonnull__(3); +#define PERL_ARGS_ASSERT_MY_SNPRINTF \ + assert(buffer); assert(format) PERL_CALLCONV int Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap) __attribute__nonnull__(1) __attribute__nonnull__(3); +#define PERL_ARGS_ASSERT_MY_VSNPRINTF \ + assert(buffer); assert(format) PERL_CALLCONV void Perl_my_clearenv(pTHX); @@ -4546,13 +6348,19 @@ PERL_CALLCONV void Perl_my_clearenv(pTHX); #ifdef PERL_GLOBAL_STRUCT_PRIVATE PERL_CALLCONV void* Perl_my_cxt_init(pTHX_ const char *my_cxt_key, size_t size) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MY_CXT_INIT \ + assert(my_cxt_key) PERL_CALLCONV int Perl_my_cxt_index(pTHX_ const char *my_cxt_key) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MY_CXT_INDEX \ + assert(my_cxt_key) #else PERL_CALLCONV void* Perl_my_cxt_init(pTHX_ int *index, size_t size) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MY_CXT_INIT \ + assert(index) #endif #endif @@ -4568,62 +6376,92 @@ PERL_CALLCONV Size_t Perl_my_strlcpy(char *dst, const char *src, Size_t size); #ifdef PERL_MAD PERL_CALLCONV void Perl_pad_peg(const char* s) __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_PAD_PEG \ + assert(s) #if defined(PERL_IN_DUMP_C) || defined(PERL_DECL_PROT) STATIC void S_xmldump_attr(pTHX_ I32 level, PerlIO *file, const char* pat, ...) __attribute__format__(__printf__,pTHX_3,pTHX_4) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_XMLDUMP_ATTR \ + assert(file); assert(pat) #endif PERL_CALLCONV void Perl_xmldump_indent(pTHX_ I32 level, PerlIO *file, const char* pat, ...) __attribute__format__(__printf__,pTHX_3,pTHX_4) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_XMLDUMP_INDENT \ + assert(file); assert(pat) PERL_CALLCONV void Perl_xmldump_vindent(pTHX_ I32 level, PerlIO *file, const char* pat, va_list *args) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_XMLDUMP_VINDENT \ + assert(file); assert(pat) PERL_CALLCONV void Perl_xmldump_all(pTHX); PERL_CALLCONV void Perl_xmldump_packsubs(pTHX_ const HV* stash) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_XMLDUMP_PACKSUBS \ + assert(stash) PERL_CALLCONV void Perl_xmldump_sub(pTHX_ const GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_XMLDUMP_SUB \ + assert(gv) PERL_CALLCONV void Perl_xmldump_form(pTHX_ const GV* gv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_XMLDUMP_FORM \ + assert(gv) PERL_CALLCONV void Perl_xmldump_eval(pTHX); PERL_CALLCONV char* Perl_sv_catxmlsv(pTHX_ SV *dsv, SV *ssv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_CATXMLSV \ + assert(dsv); assert(ssv) PERL_CALLCONV char* Perl_sv_catxmlpvn(pTHX_ SV *dsv, const char *pv, STRLEN len, int utf8) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_CATXMLPVN \ + assert(dsv); assert(pv) PERL_CALLCONV char* Perl_sv_xmlpeek(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_XMLPEEK \ + assert(sv) PERL_CALLCONV void Perl_do_pmop_xmldump(pTHX_ I32 level, PerlIO *file, const PMOP *pm) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_PMOP_XMLDUMP \ + assert(file) PERL_CALLCONV void Perl_pmop_xmldump(pTHX_ const PMOP* pm); PERL_CALLCONV void Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_OP_XMLDUMP \ + assert(file) PERL_CALLCONV void Perl_op_xmldump(pTHX_ const OP *o) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_OP_XMLDUMP \ + assert(o) PERL_CALLCONV TOKEN* Perl_newTOKEN(pTHX_ I32 optype, YYSTYPE lval, MADPROP* madprop); PERL_CALLCONV void Perl_token_free(pTHX_ TOKEN *tk) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_TOKEN_FREE \ + assert(tk) PERL_CALLCONV void Perl_token_getmad(pTHX_ TOKEN *tk, OP *o, char slot) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_TOKEN_GETMAD \ + assert(tk) PERL_CALLCONV void Perl_op_getmad_weak(pTHX_ OP* from, OP* o, char slot); PERL_CALLCONV void Perl_op_getmad(pTHX_ OP* from, OP* o, char slot); @@ -4632,6 +6470,8 @@ PERL_CALLCONV void Perl_append_madprops(pTHX_ MADPROP* tm, OP* o, char slot); PERL_CALLCONV void Perl_addmad(pTHX_ MADPROP* tm, MADPROP** root, char slot); PERL_CALLCONV MADPROP* Perl_newMADsv(pTHX_ char key, SV* sv) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_NEWMADSV \ + assert(sv) PERL_CALLCONV MADPROP* Perl_newMADPROP(pTHX_ char key, char type, const void* val, I32 vlen); PERL_CALLCONV void Perl_mad_free(pTHX_ MADPROP* mp); @@ -4639,12 +6479,18 @@ PERL_CALLCONV void Perl_mad_free(pTHX_ MADPROP* mp); # if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT) STATIC char* S_skipspace0(pTHX_ char *s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SKIPSPACE0 \ + assert(s) STATIC char* S_skipspace1(pTHX_ char *s) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SKIPSPACE1 \ + assert(s) STATIC char* S_skipspace2(pTHX_ char *s, SV **sv) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SKIPSPACE2 \ + assert(s) STATIC void S_start_force(pTHX_ int where); STATIC void S_curmad(pTHX_ char slot, SV *sv); @@ -4661,44 +6507,64 @@ PERL_CALLCONV int Perl_signbit(NV f) PERL_CALLCONV void Perl_emulate_cop_io(pTHX_ const COP *const c, SV *const sv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_EMULATE_COP_IO \ + assert(c); assert(sv) PERL_CALLCONV REGEXP * Perl_get_re_arg(pTHX_ SV *sv); PERL_CALLCONV struct mro_meta* Perl_mro_meta_init(pTHX_ HV* stash) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MRO_META_INIT \ + assert(stash) #if defined(USE_ITHREADS) PERL_CALLCONV struct mro_meta* Perl_mro_meta_dup(pTHX_ struct mro_meta* smeta, CLONE_PARAMS* param) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MRO_META_DUP \ + assert(smeta); assert(param) #endif PERL_CALLCONV AV* Perl_mro_get_linear_isa(pTHX_ HV* stash) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA \ + assert(stash) #if defined(PERL_IN_MRO_C) || defined(PERL_DECL_PROT) STATIC AV* S_mro_get_linear_isa_c3(pTHX_ HV* stash, I32 level) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA_C3 \ + assert(stash) STATIC AV* S_mro_get_linear_isa_dfs(pTHX_ HV* stash, I32 level) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA_DFS \ + assert(stash) #endif PERL_CALLCONV void Perl_mro_isa_changed_in(pTHX_ HV* stash) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MRO_ISA_CHANGED_IN \ + assert(stash) PERL_CALLCONV void Perl_mro_method_changed_in(pTHX_ HV* stash) __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MRO_METHOD_CHANGED_IN \ + assert(stash) PERL_CALLCONV void Perl_boot_core_mro(pTHX); PERL_CALLCONV void Perl_sys_init(int* argc, char*** argv) __attribute__nonnull__(1) __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_SYS_INIT \ + assert(argc); assert(argv) PERL_CALLCONV void Perl_sys_init3(int* argc, char*** argv, char*** env) __attribute__nonnull__(1) __attribute__nonnull__(2) __attribute__nonnull__(3); +#define PERL_ARGS_ASSERT_SYS_INIT3 \ + assert(argc); assert(argv); assert(env) PERL_CALLCONV void Perl_sys_term(void); diff --git a/reentr.c b/reentr.c index bae6876..25fccf8 100644 --- a/reentr.c +++ b/reentr.c @@ -314,6 +314,11 @@ Perl_reentrant_retry(const char *f, ...) dTHX; void *retptr = NULL; va_list ap; +#ifdef USE_REENTRANT_API + /* Easier to special case this here than in embed.pl. (Look at what it + generates for proto.h) */ + PERL_ARGS_ASSERT_REENTRANT_RETRY; +#endif va_start(ap, f); { #ifdef USE_REENTRANT_API diff --git a/reentr.pl b/reentr.pl index ddbfab3..8bed03c 100644 --- a/reentr.pl +++ b/reentr.pl @@ -857,6 +857,11 @@ Perl_reentrant_retry(const char *f, ...) dTHX; void *retptr = NULL; va_list ap; +#ifdef USE_REENTRANT_API + /* Easier to special case this here than in embed.pl. (Look at what it + generates for proto.h) */ + PERL_ARGS_ASSERT_REENTRANT_RETRY; +#endif va_start(ap, f); { #ifdef USE_REENTRANT_API diff --git a/regcomp.c b/regcomp.c index 28c12d1..1959730 100644 --- a/regcomp.c +++ b/regcomp.c @@ -632,6 +632,8 @@ S_scan_commit(pTHX_ const RExC_state_t *pRExC_state, scan_data_t *data, I32 *min const STRLEN old_l = CHR_SVLEN(*data->longest); GET_RE_DEBUG_FLAGS_DECL; + PERL_ARGS_ASSERT_SCAN_COMMIT; + if ((l >= old_l) && ((l > old_l) || (data->flags & SF_BEFORE_EOL))) { SvSetMagicSV(*data->longest, data->last_found); if (*data->longest == data->longest_fixed) { @@ -678,6 +680,8 @@ S_scan_commit(pTHX_ const RExC_state_t *pRExC_state, scan_data_t *data, I32 *min STATIC void S_cl_anything(const RExC_state_t *pRExC_state, struct regnode_charclass_class *cl) { + PERL_ARGS_ASSERT_CL_ANYTHING; + ANYOF_CLASS_ZERO(cl); ANYOF_BITMAP_SETALL(cl); cl->flags = ANYOF_EOS|ANYOF_UNICODE_ALL; @@ -691,6 +695,8 @@ S_cl_is_anything(const struct regnode_charclass_class *cl) { int value; + PERL_ARGS_ASSERT_CL_IS_ANYTHING; + for (value = 0; value <= ANYOF_MAX; value += 2) if (ANYOF_CLASS_TEST(cl, value) && ANYOF_CLASS_TEST(cl, value + 1)) return 1; @@ -705,6 +711,8 @@ S_cl_is_anything(const struct regnode_charclass_class *cl) STATIC void S_cl_init(const RExC_state_t *pRExC_state, struct regnode_charclass_class *cl) { + PERL_ARGS_ASSERT_CL_INIT; + Zero(cl, 1, struct regnode_charclass_class); cl->type = ANYOF; cl_anything(pRExC_state, cl); @@ -713,6 +721,8 @@ S_cl_init(const RExC_state_t *pRExC_state, struct regnode_charclass_class *cl) STATIC void S_cl_init_zero(const RExC_state_t *pRExC_state, struct regnode_charclass_class *cl) { + PERL_ARGS_ASSERT_CL_INIT_ZERO; + Zero(cl, 1, struct regnode_charclass_class); cl->type = ANYOF; cl_anything(pRExC_state, cl); @@ -726,6 +736,7 @@ STATIC void S_cl_and(struct regnode_charclass_class *cl, const struct regnode_charclass_class *and_with) { + PERL_ARGS_ASSERT_CL_AND; assert(and_with->type == ANYOF); if (!(and_with->flags & ANYOF_CLASS) @@ -764,6 +775,8 @@ S_cl_and(struct regnode_charclass_class *cl, STATIC void S_cl_or(const RExC_state_t *pRExC_state, struct regnode_charclass_class *cl, const struct regnode_charclass_class *or_with) { + PERL_ARGS_ASSERT_CL_OR; + if (or_with->flags & ANYOF_INVERT) { /* We do not use * (B1 | CL1) | (!B2 & !CL2) = (B1 | !B2 & !CL2) | (CL1 | (!B2 & !CL2)) @@ -855,6 +868,7 @@ S_dump_trie(pTHX_ const struct _reg_trie_data *trie, HV *widecharmap, int colwidth= widecharmap ? 6 : 4; GET_RE_DEBUG_FLAGS_DECL; + PERL_ARGS_ASSERT_DUMP_TRIE; PerlIO_printf( Perl_debug_log, "%*sChar : %-6s%-6s%-4s ", (int)depth * 2 + 2,"", @@ -937,6 +951,9 @@ S_dump_trie_interim_list(pTHX_ const struct _reg_trie_data *trie, SV *sv=sv_newmortal(); int colwidth= widecharmap ? 6 : 4; GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_DUMP_TRIE_INTERIM_LIST; + /* print out the table precompression. */ PerlIO_printf( Perl_debug_log, "%*sState :Word | Transition Data\n%*s%s", (int)depth * 2 + 2,"", (int)depth * 2 + 2,"", @@ -992,6 +1009,8 @@ S_dump_trie_interim_table(pTHX_ const struct _reg_trie_data *trie, SV *sv=sv_newmortal(); int colwidth= widecharmap ? 6 : 4; GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_DUMP_TRIE_INTERIM_TABLE; /* print out the table precompression so that we can do a visual check @@ -1319,6 +1338,8 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs #endif SV *re_trie_maxbuff; GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_MAKE_TRIE; #ifndef DEBUGGING PERL_UNUSED_ARG(depth); #endif @@ -2163,6 +2184,8 @@ S_make_trie_failtable(pTHX_ RExC_state_t *pRExC_state, regnode *source, regnode reg_ac_data *aho; const U32 data_slot = add_data( pRExC_state, 1, "T" ); GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_MAKE_TRIE_FAILTABLE; #ifndef DEBUGGING PERL_UNUSED_ARG(depth); #endif @@ -2279,6 +2302,8 @@ S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan, I32 *min, U32 flags #else PERL_UNUSED_ARG(depth); #endif + + PERL_ARGS_ASSERT_JOIN_EXACT; #ifndef EXPERIMENTAL_INPLACESCAN PERL_UNUSED_ARG(flags); PERL_UNUSED_ARG(val); @@ -2489,9 +2514,10 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, regnode *first_non_open = scan; I32 stopmin = I32_MAX; scan_frame *frame = NULL; - GET_RE_DEBUG_FLAGS_DECL; + PERL_ARGS_ASSERT_STUDY_CHUNK; + #ifdef DEBUGGING StructCopy(&zero_scan_data, &data_fake, scan_data_t); #endif @@ -4049,6 +4075,8 @@ S_add_data(RExC_state_t *pRExC_state, U32 n, const char *s) { U32 count = RExC_rxi->data ? RExC_rxi->data->count : 0; + PERL_ARGS_ASSERT_ADD_DATA; + Renewc(RExC_rxi->data, sizeof(*RExC_rxi->data) + sizeof(void*) * (count + n - 1), char, struct reg_data); @@ -4132,6 +4160,9 @@ Perl_pregcomp(pTHX_ const SV * const pattern, const U32 flags) { dVAR; HV * const table = GvHV(PL_hintgv); + + PERL_ARGS_ASSERT_PREGCOMP; + /* Dispatch a request to compile a regexp to correct regexp engine. */ if (table) { @@ -4173,6 +4204,9 @@ Perl_re_compile(pTHX_ const SV * const pattern, U32 pm_flags) RExC_state_t copyRExC_state; #endif GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_RE_COMPILE; + DEBUG_r(if (!PL_colorset) reginitcolors()); RExC_utf8 = RExC_orig_utf8 = SvUTF8(pattern); @@ -4869,6 +4903,8 @@ SV* Perl_reg_named_buff(pTHX_ REGEXP * const rx, SV * const key, SV * const value, const U32 flags) { + PERL_ARGS_ASSERT_REG_NAMED_BUFF; + PERL_UNUSED_ARG(value); if (flags & RXapif_FETCH) { @@ -4894,6 +4930,7 @@ SV* Perl_reg_named_buff_iter(pTHX_ REGEXP * const rx, const SV * const lastkey, const U32 flags) { + PERL_ARGS_ASSERT_REG_NAMED_BUFF_ITER; PERL_UNUSED_ARG(lastkey); if (flags & RXapif_FIRSTKEY) @@ -4913,6 +4950,9 @@ Perl_reg_named_buff_fetch(pTHX_ REGEXP * const r, SV * const namesv, AV *retarray = NULL; SV *ret; struct regexp *const rx = (struct regexp *)SvANY(r); + + PERL_ARGS_ASSERT_REG_NAMED_BUFF_FETCH; + if (flags & RXapif_ALL) retarray=newAV(); @@ -4951,6 +4991,9 @@ Perl_reg_named_buff_exists(pTHX_ REGEXP * const r, SV * const key, const U32 flags) { struct regexp *const rx = (struct regexp *)SvANY(r); + + PERL_ARGS_ASSERT_REG_NAMED_BUFF_EXISTS; + if (rx && RXp_PAREN_NAMES(rx)) { if (flags & RXapif_ALL) { return hv_exists_ent(RXp_PAREN_NAMES(rx), key, 0); @@ -4972,6 +5015,9 @@ SV* Perl_reg_named_buff_firstkey(pTHX_ REGEXP * const r, const U32 flags) { struct regexp *const rx = (struct regexp *)SvANY(r); + + PERL_ARGS_ASSERT_REG_NAMED_BUFF_FIRSTKEY; + if ( rx && RXp_PAREN_NAMES(rx) ) { (void)hv_iterinit(RXp_PAREN_NAMES(rx)); @@ -4985,6 +5031,9 @@ SV* Perl_reg_named_buff_nextkey(pTHX_ REGEXP * const r, const U32 flags) { struct regexp *const rx = (struct regexp *)SvANY(r); + + PERL_ARGS_ASSERT_REG_NAMED_BUFF_NEXTKEY; + if (rx && RXp_PAREN_NAMES(rx)) { HV *hv = RXp_PAREN_NAMES(rx); HE *temphe; @@ -5018,6 +5067,8 @@ Perl_reg_named_buff_scalar(pTHX_ REGEXP * const r, const U32 flags) I32 length; struct regexp *const rx = (struct regexp *)SvANY(r); + PERL_ARGS_ASSERT_REG_NAMED_BUFF_SCALAR; + if (rx && RXp_PAREN_NAMES(rx)) { if (flags & (RXapif_ALL | RXapif_REGNAMES_COUNT)) { return newSViv(HvTOTALKEYS(RXp_PAREN_NAMES(rx))); @@ -5040,6 +5091,8 @@ Perl_reg_named_buff_all(pTHX_ REGEXP * const r, const U32 flags) struct regexp *const rx = (struct regexp *)SvANY(r); AV *av = newAV(); + PERL_ARGS_ASSERT_REG_NAMED_BUFF_ALL; + if (rx && RXp_PAREN_NAMES(rx)) { HV *hv= RXp_PAREN_NAMES(rx); HE *temphe; @@ -5075,6 +5128,8 @@ Perl_reg_numbered_buff_fetch(pTHX_ REGEXP * const r, const I32 paren, char *s = NULL; I32 i = 0; I32 s1, t1; + + PERL_ARGS_ASSERT_REG_NUMBERED_BUFF_FETCH; if (!rx->subbeg) { sv_setsv(sv,&PL_sv_undef); @@ -5148,6 +5203,8 @@ void Perl_reg_numbered_buff_store(pTHX_ REGEXP * const rx, const I32 paren, SV const * const value) { + PERL_ARGS_ASSERT_REG_NUMBERED_BUFF_STORE; + PERL_UNUSED_ARG(rx); PERL_UNUSED_ARG(paren); PERL_UNUSED_ARG(value); @@ -5164,6 +5221,8 @@ Perl_reg_numbered_buff_length(pTHX_ REGEXP * const r, const SV * const sv, I32 i; I32 s1, t1; + PERL_ARGS_ASSERT_REG_NUMBERED_BUFF_LENGTH; + /* Some of this code was originally in C in F */ switch (paren) { /* $` / ${^PREMATCH} */ @@ -5218,6 +5277,7 @@ Perl_reg_numbered_buff_length(pTHX_ REGEXP * const r, const SV * const sv, SV* Perl_reg_qr_package(pTHX_ REGEXP * const rx) { + PERL_ARGS_ASSERT_REG_QR_PACKAGE; PERL_UNUSED_ARG(rx); if (0) return NULL; @@ -5238,9 +5298,12 @@ Perl_reg_qr_package(pTHX_ REGEXP * const rx) #define REG_RSN_RETURN_DATA 2 STATIC SV* -S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags) { +S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags) +{ char *name_start = RExC_parse; + PERL_ARGS_ASSERT_REG_SCAN_NAME; + if (isIDFIRST_lazy_if(RExC_parse, UTF)) { /* skip IDFIRST by using do...while */ if (UTF) @@ -5371,6 +5434,8 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth) char * const oregcomp_parse = RExC_parse; GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_REG; DEBUG_PARSE("reg "); *flagp = 0; /* Tentatively. */ @@ -6215,6 +6280,9 @@ S_regbranch(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth) register regnode *latest; I32 flags = 0, c = 0; GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_REGBRANCH; + DEBUG_PARSE("brnc"); if (first) @@ -6290,6 +6358,9 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) char *parse_start; const char *maxpos = NULL; GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_REGPIECE; + DEBUG_PARSE("piec"); ret = regatom(pRExC_state, &flags,depth+1); @@ -6507,7 +6578,9 @@ S_reg_namedseq(pTHX_ RExC_state_t *pRExC_state, UV *valuep) STRLEN len; /* this has various purposes throughout the code */ bool cached = 0; /* if this is true then we shouldn't refcount dev sv_str */ regnode *ret = NULL; - + + PERL_ARGS_ASSERT_REG_NAMEDSEQ; + if (*RExC_parse != '{') { vFAIL("Missing braces on \\N{}"); } @@ -6753,6 +6826,8 @@ S_reg_recode(pTHX_ const char value, SV **encp) const STRLEN newlen = SvCUR(sv); UV uv = UNICODE_REPLACEMENT; + PERL_ARGS_ASSERT_REG_RECODE; + if (newlen) uv = SvUTF8(sv) ? utf8n_to_uvchr((U8*)s, newlen, &numlen, UTF8_ALLOW_DEFAULT) @@ -6799,6 +6874,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) DEBUG_PARSE("atom"); *flagp = WORST; /* Tentatively. */ + PERL_ARGS_ASSERT_REGATOM; tryagain: switch ((U8)*RExC_parse) { @@ -7479,6 +7555,9 @@ STATIC char * S_regwhite( RExC_state_t *pRExC_state, char *p ) { const char *e = RExC_end; + + PERL_ARGS_ASSERT_REGWHITE; + while (p < e) { if (isSPACE(*p)) ++p; @@ -7515,6 +7594,8 @@ S_regpposixcc(pTHX_ RExC_state_t *pRExC_state, I32 value) dVAR; I32 namedclass = OOB_NAMEDCLASS; + PERL_ARGS_ASSERT_REGPPOSIXCC; + if (value == '[' && RExC_parse + 1 < RExC_end && /* I smell either [: or [= or [. -- POSIX has been here, right? */ POSIXCC(UCHARAT(RExC_parse))) { @@ -7629,6 +7710,9 @@ STATIC void S_checkposixcc(pTHX_ RExC_state_t *pRExC_state) { dVAR; + + PERL_ARGS_ASSERT_CHECKPOSIXCC; + if (POSIXCC(UCHARAT(RExC_parse))) { const char *s = RExC_parse; const char c = *s++; @@ -7727,6 +7811,8 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, U32 depth) case we need to change the emitted regop to an EXACT. */ const char * orig_parse = RExC_parse; GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_REGCLASS; #ifndef DEBUGGING PERL_UNUSED_ARG(depth); #endif @@ -8314,6 +8400,9 @@ STATIC bool S_reg_skipcomment(pTHX_ RExC_state_t *pRExC_state) { bool ended = 0; + + PERL_ARGS_ASSERT_REG_SKIPCOMMENT; + while (RExC_parse < RExC_end) if (*RExC_parse++ == '\n') { ended = 1; @@ -8346,6 +8435,8 @@ S_nextchar(pTHX_ RExC_state_t *pRExC_state) { char* const retval = RExC_parse++; + PERL_ARGS_ASSERT_NEXTCHAR; + for (;;) { if (*RExC_parse == '(' && RExC_parse[1] == '?' && RExC_parse[2] == '#') { @@ -8382,6 +8473,8 @@ S_reg_node(pTHX_ RExC_state_t *pRExC_state, U8 op) regnode * const ret = RExC_emit; GET_RE_DEBUG_FLAGS_DECL; + PERL_ARGS_ASSERT_REG_NODE; + if (SIZE_ONLY) { SIZE_ALIGN(RExC_size); RExC_size += 1; @@ -8421,6 +8514,8 @@ S_reganode(pTHX_ RExC_state_t *pRExC_state, U8 op, U32 arg) regnode * const ret = RExC_emit; GET_RE_DEBUG_FLAGS_DECL; + PERL_ARGS_ASSERT_REGANODE; + if (SIZE_ONLY) { SIZE_ALIGN(RExC_size); RExC_size += 2; @@ -8471,6 +8566,9 @@ STATIC STRLEN S_reguni(pTHX_ const RExC_state_t *pRExC_state, UV uv, char* s) { dVAR; + + PERL_ARGS_ASSERT_REGUNI; + return SIZE_ONLY ? UNISKIP(uv) : (uvchr_to_utf8((U8*)s, uv) - (U8*)s); } @@ -8489,6 +8587,8 @@ S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth) const int offset = regarglen[(U8)op]; const int size = NODE_STEP_REGNODE + offset; GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_REGINSERT; PERL_UNUSED_ARG(depth); /* (PL_regkind[(U8)op] == CURLY ? EXTRA_STEP_2ARGS : 0); */ DEBUG_PARSE_FMT("inst"," - %s",PL_reg_name[op]); @@ -8571,6 +8671,8 @@ S_regtail(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val,U32 de dVAR; register regnode *scan; GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_REGTAIL; #ifndef DEBUGGING PERL_UNUSED_ARG(depth); #endif @@ -8631,9 +8733,10 @@ S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val, #ifdef EXPERIMENTAL_INPLACESCAN I32 min = 0; #endif - GET_RE_DEBUG_FLAGS_DECL; + PERL_ARGS_ASSERT_REGTAIL_STUDY; + if (SIZE_ONLY) return exact; @@ -8703,6 +8806,8 @@ S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val, STATIC I32 S_regcurly(register const char *s) { + PERL_ARGS_ASSERT_REGCURLY; + if (*s++ != '{') return FALSE; if (!isDIGIT(*s)) @@ -8724,9 +8829,11 @@ S_regcurly(register const char *s) */ #ifdef DEBUGGING void -S_regdump_extflags(pTHX_ const char *lead, const U32 flags) { +S_regdump_extflags(pTHX_ const char *lead, const U32 flags) +{ int bit; int set=0; + for (bit=0; bit<32; bit++) { if (flags & (1<program, ri->program + 1, NULL, NULL, sv, 0, 0); /* Header fields of interest. */ @@ -8827,6 +8936,7 @@ Perl_regdump(pTHX_ const regexp *r) PerlIO_printf(Perl_debug_log, "\n"); DEBUG_FLAGS_r(regdump_extflags("r->extflags: ",r->extflags)); #else + PERL_ARGS_ASSERT_REGDUMP; PERL_UNUSED_CONTEXT; PERL_UNUSED_ARG(r); #endif /* DEBUGGING */ @@ -8844,6 +8954,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o) RXi_GET_DECL(prog,progi); GET_RE_DEBUG_FLAGS_DECL; + PERL_ARGS_ASSERT_REGPROP; sv_setpvn(sv, "", 0); @@ -9111,6 +9222,8 @@ Perl_re_intuit_string(pTHX_ REGEXP * const r) dVAR; struct regexp *const prog = (struct regexp *)SvANY(r); GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_RE_INTUIT_STRING; PERL_UNUSED_CONTEXT; DEBUG_COMPILE_r( @@ -9158,6 +9271,8 @@ Perl_pregfree2(pTHX_ REGEXP *rx) struct regexp *const r = (struct regexp *)SvANY(rx); GET_RE_DEBUG_FLAGS_DECL; + PERL_ARGS_ASSERT_PREGFREE2; + if (r->mother_re) { ReREFCNT_dec(r->mother_re); } else { @@ -9203,11 +9318,15 @@ Perl_pregfree2(pTHX_ REGEXP *rx) REGEXP * -Perl_reg_temp_copy (pTHX_ REGEXP *rx) { +Perl_reg_temp_copy (pTHX_ REGEXP *rx) +{ REGEXP *ret_x = (REGEXP*) newSV_type(SVt_REGEXP); struct regexp *ret = (struct regexp *)SvANY(ret_x); struct regexp *const r = (struct regexp *)SvANY(rx); register const I32 npar = r->nparens+1; + + PERL_ARGS_ASSERT_REG_TEMP_COPY; + (void)ReREFCNT_inc(rx); /* We can take advantage of the existing "copied buffer" mechanism in SVs by pointing directly at the buffer, but flagging that the allocated @@ -9261,7 +9380,9 @@ Perl_regfree_internal(pTHX_ REGEXP * const rx) struct regexp *const r = (struct regexp *)SvANY(rx); RXi_GET_DECL(r,ri); GET_RE_DEBUG_FLAGS_DECL; - + + PERL_ARGS_ASSERT_REGFREE_INTERNAL; + DEBUG_COMPILE_r({ if (!PL_colorset) reginitcolors(); @@ -9397,6 +9518,8 @@ Perl_re_dup_guts(pTHX_ const REGEXP *sstr, REGEXP *dstr, CLONE_PARAMS *param) const struct regexp *r = (const struct regexp *)SvANY(sstr); struct regexp *ret = (struct regexp *)SvANY(dstr); + PERL_ARGS_ASSERT_RE_DUP_GUTS; + npar = r->nparens+1; Newx(ret->offs, npar, regexp_paren_pair); Copy(r->offs, ret->offs, npar, regexp_paren_pair); @@ -9483,6 +9606,8 @@ Perl_regdupe_internal(pTHX_ REGEXP * const rx, CLONE_PARAMS *param) regexp_internal *reti; int len, npar; RXi_GET_DECL(r,ri); + + PERL_ARGS_ASSERT_REGDUPE_INTERNAL; npar = r->nparens+1; len = ProgLen(ri); @@ -9601,6 +9726,8 @@ S_re_croak2(pTHX_ const char* pat1,const char* pat2,...) SV *msv; const char *message; + PERL_ARGS_ASSERT_RE_CROAK2; + if (l1 > 510) l1 = 510; if (l1 + l2 > 510) @@ -9690,6 +9817,8 @@ clear_re(pTHX_ void *r) STATIC void S_put_byte(pTHX_ SV *sv, int c) { + PERL_ARGS_ASSERT_PUT_BYTE; + /* Our definition of isPRINT() ignores locales, so only bytes that are not part of UTF-8 are considered printable. I assume that the same holds for UTF-EBCDIC. @@ -9731,7 +9860,9 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node, RXi_GET_DECL(r,ri); GET_RE_DEBUG_FLAGS_DECL; - + + PERL_ARGS_ASSERT_DUMPUNTIL; + #ifdef DEBUG_DUMPUNTIL PerlIO_printf(Perl_debug_log, "--- %d : %d - %d - %d\n",indent,node-start, last ? last-start : 0,plast ? plast-start : 0); diff --git a/regexec.c b/regexec.c index e64846f..16b1495 100644 --- a/regexec.c +++ b/regexec.c @@ -237,9 +237,10 @@ S_regcppop(pTHX_ const regexp *rex) dVAR; U32 i; char *input; - GET_RE_DEBUG_FLAGS_DECL; + PERL_ARGS_ASSERT_REGCPPOP; + /* Pop REGCP_OTHER_ELEMS before the parentheses loop starts. */ i = SSPOPINT; assert(i == SAVEt_REGCONTEXT); /* Check that the magic cookie is there. */ @@ -314,6 +315,8 @@ Perl_pregexec(pTHX_ REGEXP * const prog, char* stringarg, register char *strend, /* minend: end of match must be >=minend after stringarg. */ /* nosave: For optimizations. */ { + PERL_ARGS_ASSERT_PREGEXEC; + return regexec_flags(prog, stringarg, strend, strbeg, minend, screamer, NULL, nosave ? 0 : REXEC_COPY_STR); @@ -392,9 +395,10 @@ Perl_re_intuit_start(pTHX_ REGEXP * const rx, SV *sv, char *strpos, #ifdef DEBUGGING const char * const i_strpos = strpos; #endif - GET_RE_DEBUG_FLAGS_DECL; + PERL_ARGS_ASSERT_RE_INTUIT_START; + RX_MATCH_UTF8_set(rx,do_utf8); if (RX_UTF8(rx)) { @@ -1181,6 +1185,8 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, register I32 tmp = 1; /* Scratch variable? */ register const bool do_utf8 = PL_reg_match_utf8; RXi_GET_DECL(prog,progi); + + PERL_ARGS_ASSERT_FIND_BYCLASS; /* We know what class it must start with. */ switch (OP(c)) { @@ -1720,9 +1726,12 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, } static void -S_swap_match_buff (pTHX_ regexp *prog) { +S_swap_match_buff (pTHX_ regexp *prog) +{ regexp_paren_pair *t; + PERL_ARGS_ASSERT_SWAP_MATCH_BUFF; + if (!prog->swap) { /* We have to be careful. If the previous successful match was from this regex we don't want a subsequent paritally @@ -1768,9 +1777,9 @@ Perl_regexec_flags(pTHX_ REGEXP * const rx, char *stringarg, register char *stre RXi_GET_DECL(prog,progi); regmatch_info reginfo; /* create some info to pass to regtry etc */ bool swap_on_fail = 0; - GET_RE_DEBUG_FLAGS_DECL; + PERL_ARGS_ASSERT_REGEXEC_FLAGS; PERL_UNUSED_ARG(data); /* Be paranoid... */ @@ -2211,6 +2220,9 @@ S_regtry(pTHX_ regmatch_info *reginfo, char **startpos) regexp *const prog = (struct regexp *)SvANY(rx); RXi_GET_DECL(prog,progi); GET_RE_DEBUG_FLAGS_DECL; + + PERL_ARGS_ASSERT_REGTRY; + reginfo->cutpoint=NULL; if ((prog->extflags & RXf_EVAL_SEEN) && !PL_reg_eval_set) { @@ -2566,6 +2578,9 @@ S_debug_start_match(pTHX_ const REGEXP *prog, const bool do_utf8, const char *start, const char *end, const char *blurb) { const bool utf8_pat = RX_UTF8(prog) ? 1 : 0; + + PERL_ARGS_ASSERT_DEBUG_START_MATCH; + if (!PL_colorset) reginitcolors(); { @@ -2609,6 +2624,8 @@ S_dump_exec_pos(pTHX_ const char *locinput, ? (5 + taill) - l : locinput - loc_bostr; int pref0_len; + PERL_ARGS_ASSERT_DUMP_EXEC_POS; + while (do_utf8 && UTF8_IS_CONTINUATION(*(U8*)(locinput - pref_len))) pref_len++; pref0_len = pref_len - (locinput - loc_reg_starttry); @@ -2659,11 +2676,15 @@ S_dump_exec_pos(pTHX_ const char *locinput, * or 0 if non of the buffers matched. */ STATIC I32 -S_reg_check_named_buff_matched(pTHX_ const regexp *rex, const regnode *scan) { +S_reg_check_named_buff_matched(pTHX_ const regexp *rex, const regnode *scan) +{ I32 n; RXi_GET_DECL(rex,rexi); SV *sv_dat=(SV*)rexi->data->data[ ARG( scan ) ]; I32 *nums=(I32*)SvPVX(sv_dat); + + PERL_ARGS_ASSERT_REG_CHECK_NAMED_BUFF_MATCHED; + for ( n=0; n= nums[n] && PL_regoffs[nums[n]].end != -1) @@ -2707,16 +2728,12 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog) dVAR; register const bool do_utf8 = PL_reg_match_utf8; const U32 uniflags = UTF8_ALLOW_DEFAULT; - REGEXP *rex_sv = reginfo->prog; regexp *rex = (struct regexp *)SvANY(rex_sv); RXi_GET_DECL(rex,rexi); - I32 oldsave; - /* the current state. This is a cached copy of PL_regmatch_state */ register regmatch_state *st; - /* cache heavy used fields of st in registers */ register regnode *scan; register regnode *next; @@ -2731,13 +2748,11 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog) const U32 max_nochange_depth = (3 * rex->nparens > MAX_RECURSE_EVAL_NOCHANGE_DEPTH) ? 3 * rex->nparens : MAX_RECURSE_EVAL_NOCHANGE_DEPTH; - regmatch_state *yes_state = NULL; /* state to pop to on success of subpattern */ /* mark_state piggy backs on the yes_state logic so that when we unwind the stack on success we can update the mark_state as we go */ regmatch_state *mark_state = NULL; /* last mark state we have seen */ - regmatch_state *cur_eval = NULL; /* most recent EVAL_AB state */ struct regmatch_state *cur_curlyx = NULL; /* most recent curlyx */ U32 state_num; @@ -2750,10 +2765,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog) during a successfull match */ U32 lastopen = 0; /* last open we saw */ bool has_cutgroup = RX_HAS_CUTGROUP(rex) ? 1 : 0; - SV* const oreplsv = GvSV(PL_replgv); - - /* these three flags are set by various ops to signal information to * the very next op. They have a useful lifetime of exactly one loop * iteration, and are not preserved or restored by state pushes/pops @@ -2768,11 +2780,12 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog) false: plain (?=foo) true: used as a condition: (?(?=foo)) */ - #ifdef DEBUGGING GET_RE_DEBUG_FLAGS_DECL; #endif + PERL_ARGS_ASSERT_REGMATCH; + DEBUG_OPTIMISE_r( DEBUG_EXECUTE_r({ PerlIO_printf(Perl_debug_log,"regmatch start\n"); })); @@ -5348,6 +5361,8 @@ S_regrepeat(pTHX_ const regexp *prog, const regnode *p, I32 max, int depth) PERL_UNUSED_ARG(depth); #endif + PERL_ARGS_ASSERT_REGREPEAT; + scan = PL_reginput; if (max == REG_INFTY) max = I32_MAX; @@ -5663,6 +5678,8 @@ Perl_regclass_swash(pTHX_ const regexp *prog, register const regnode* node, bool RXi_GET_DECL(prog,progi); const struct reg_data * const data = prog ? progi->data : NULL; + PERL_ARGS_ASSERT_REGCLASS_SWASH; + if (data && data->count) { const U32 n = ARG(node); @@ -5719,6 +5736,8 @@ S_reginclass(pTHX_ const regexp *prog, register const regnode *n, register const STRLEN len = 0; STRLEN plen; + PERL_ARGS_ASSERT_REGINCLASS; + if (do_utf8 && !UTF8_IS_INVARIANT(c)) { c = utf8n_to_uvchr(p, UTF8_MAXBYTES, &len, (UTF8_ALLOW_DEFAULT & UTF8_ALLOW_ANYUV) | UTF8_CHECK_ONLY); @@ -5836,6 +5855,9 @@ STATIC U8 * S_reghop3(U8 *s, I32 off, const U8* lim) { dVAR; + + PERL_ARGS_ASSERT_REGHOP3; + if (off >= 0) { while (off-- && s < lim) { /* XXX could check well-formedness here */ @@ -5864,6 +5886,9 @@ STATIC U8 * S_reghop4(U8 *s, I32 off, const U8* llim, const U8* rlim) { dVAR; + + PERL_ARGS_ASSERT_REGHOP4; + if (off >= 0) { while (off-- && s < rlim) { /* XXX could check well-formedness here */ @@ -5888,6 +5913,9 @@ STATIC U8 * S_reghopmaybe3(U8* s, I32 off, const U8* lim) { dVAR; + + PERL_ARGS_ASSERT_REGHOPMAYBE3; + if (off >= 0) { while (off-- && s < lim) { /* XXX could check well-formedness here */ @@ -5935,6 +5963,9 @@ STATIC void S_to_utf8_substr(pTHX_ register regexp *prog) { int i = 1; + + PERL_ARGS_ASSERT_TO_UTF8_SUBSTR; + do { if (prog->substrs->data[i].substr && !prog->substrs->data[i].utf8_substr) { @@ -5964,6 +5995,9 @@ S_to_byte_substr(pTHX_ register regexp *prog) { dVAR; int i = 1; + + PERL_ARGS_ASSERT_TO_BYTE_SUBSTR; + do { if (prog->substrs->data[i].utf8_substr && !prog->substrs->data[i].substr) { diff --git a/scope.c b/scope.c index fae4892..59d77fc 100644 --- a/scope.c +++ b/scope.c @@ -28,6 +28,9 @@ SV** Perl_stack_grow(pTHX_ SV **sp, SV **p, int n) { dVAR; + + PERL_ARGS_ASSERT_STACK_GROW; + PL_stack_sp = sp; #ifndef STRESS_REALLOC av_extend(PL_curstack, (p - PL_stack_base) + (n) + 128); @@ -165,6 +168,8 @@ S_save_scalar_at(pTHX_ SV **sptr) SV * const osv = *sptr; register SV * const sv = *sptr = newSV(0); + PERL_ARGS_ASSERT_SAVE_SCALAR_AT; + if (SvTYPE(osv) >= SVt_PVMG && SvMAGIC(osv) && SvTYPE(osv) != SVt_PVGV) { if (SvGMAGICAL(osv)) { const bool oldtainted = PL_tainted; @@ -182,6 +187,9 @@ Perl_save_scalar(pTHX_ GV *gv) { dVAR; SV ** const sptr = &GvSVn(gv); + + PERL_ARGS_ASSERT_SAVE_SCALAR; + PL_localizing = 1; SvGETMAGIC(*sptr); PL_localizing = 0; @@ -198,6 +206,9 @@ void Perl_save_generic_svref(pTHX_ SV **sptr) { dVAR; + + PERL_ARGS_ASSERT_SAVE_GENERIC_SVREF; + SSCHECK(3); SSPUSHPTR(sptr); SSPUSHPTR(SvREFCNT_inc(*sptr)); @@ -211,6 +222,9 @@ void Perl_save_generic_pvref(pTHX_ char **str) { dVAR; + + PERL_ARGS_ASSERT_SAVE_GENERIC_PVREF; + SSCHECK(3); SSPUSHPTR(*str); SSPUSHPTR(str); @@ -224,6 +238,9 @@ void Perl_save_shared_pvref(pTHX_ char **str) { dVAR; + + PERL_ARGS_ASSERT_SAVE_SHARED_PVREF; + SSCHECK(3); SSPUSHPTR(str); SSPUSHPTR(*str); @@ -236,6 +253,9 @@ void Perl_save_set_svflags(pTHX_ SV* sv, U32 mask, U32 val) { dVAR; + + PERL_ARGS_ASSERT_SAVE_SET_SVFLAGS; + SSCHECK(4); SSPUSHPTR(sv); SSPUSHINT(mask); @@ -247,6 +267,9 @@ void Perl_save_gp(pTHX_ GV *gv, I32 empty) { dVAR; + + PERL_ARGS_ASSERT_SAVE_GP; + SSGROW(3); SSPUSHPTR(SvREFCNT_inc(gv)); SSPUSHPTR(GvGP(gv)); @@ -284,6 +307,8 @@ Perl_save_ary(pTHX_ GV *gv) AV * const oav = GvAVn(gv); AV *av; + PERL_ARGS_ASSERT_SAVE_ARY; + if (!AvREAL(oav) && AvREIFY(oav)) av_reify(oav); SSCHECK(3); @@ -304,6 +329,8 @@ Perl_save_hash(pTHX_ GV *gv) dVAR; HV *ohv, *hv; + PERL_ARGS_ASSERT_SAVE_HASH; + SSCHECK(3); SSPUSHPTR(gv); SSPUSHPTR(ohv = GvHVn(gv)); @@ -322,6 +349,8 @@ Perl_save_item(pTHX_ register SV *item) dVAR; register SV * const sv = newSVsv(item); + PERL_ARGS_ASSERT_SAVE_ITEM; + SSCHECK(3); SSPUSHPTR(item); /* remember the pointer */ SSPUSHPTR(sv); /* remember the value */ @@ -332,6 +361,9 @@ void Perl_save_int(pTHX_ int *intp) { dVAR; + + PERL_ARGS_ASSERT_SAVE_INT; + SSCHECK(3); SSPUSHINT(*intp); SSPUSHPTR(intp); @@ -342,6 +374,9 @@ void Perl_save_bool(pTHX_ bool *boolp) { dVAR; + + PERL_ARGS_ASSERT_SAVE_BOOL; + SSCHECK(3); SSPUSHBOOL(*boolp); SSPUSHPTR(boolp); @@ -352,6 +387,9 @@ void Perl_save_I8(pTHX_ I8 *bytep) { dVAR; + + PERL_ARGS_ASSERT_SAVE_I8; + SSCHECK(3); SSPUSHINT(*bytep); SSPUSHPTR(bytep); @@ -362,6 +400,9 @@ void Perl_save_I16(pTHX_ I16 *intp) { dVAR; + + PERL_ARGS_ASSERT_SAVE_I16; + SSCHECK(3); SSPUSHINT(*intp); SSPUSHPTR(intp); @@ -372,6 +413,9 @@ void Perl_save_I32(pTHX_ I32 *intp) { dVAR; + + PERL_ARGS_ASSERT_SAVE_I32; + SSCHECK(3); SSPUSHINT(*intp); SSPUSHPTR(intp); @@ -385,6 +429,9 @@ void Perl_save_pptr(pTHX_ char **pptr) { dVAR; + + PERL_ARGS_ASSERT_SAVE_PPTR; + SSCHECK(3); SSPUSHPTR(*pptr); SSPUSHPTR(pptr); @@ -395,6 +442,9 @@ void Perl_save_vptr(pTHX_ void *ptr) { dVAR; + + PERL_ARGS_ASSERT_SAVE_VPTR; + SSCHECK(3); SSPUSHPTR(*(char**)ptr); SSPUSHPTR(ptr); @@ -405,6 +455,9 @@ void Perl_save_sptr(pTHX_ SV **sptr) { dVAR; + + PERL_ARGS_ASSERT_SAVE_SPTR; + SSCHECK(3); SSPUSHPTR(*sptr); SSPUSHPTR(sptr); @@ -427,6 +480,9 @@ void Perl_save_hptr(pTHX_ HV **hptr) { dVAR; + + PERL_ARGS_ASSERT_SAVE_HPTR; + SSCHECK(3); SSPUSHPTR(*hptr); SSPUSHPTR(hptr); @@ -437,6 +493,9 @@ void Perl_save_aptr(pTHX_ AV **aptr) { dVAR; + + PERL_ARGS_ASSERT_SAVE_APTR; + SSCHECK(3); SSPUSHPTR(*aptr); SSPUSHPTR(aptr); @@ -456,6 +515,9 @@ void Perl_save_mortalizesv(pTHX_ SV *sv) { dVAR; + + PERL_ARGS_ASSERT_SAVE_MORTALIZESV; + SSCHECK(2); SSPUSHPTR(sv); SSPUSHINT(SAVEt_MORTALIZESV); @@ -483,6 +545,9 @@ void Perl_save_clearsv(pTHX_ SV **svp) { dVAR; + + PERL_ARGS_ASSERT_SAVE_CLEARSV; + ASSERT_CURPAD_ACTIVE("save_clearsv"); SSCHECK(2); SSPUSHLONG((long)(svp-PL_curpad)); @@ -494,6 +559,9 @@ void Perl_save_delete(pTHX_ HV *hv, char *key, I32 klen) { dVAR; + + PERL_ARGS_ASSERT_SAVE_DELETE; + SSCHECK(4); SSPUSHINT(klen); SSPUSHPTR(key); @@ -505,6 +573,9 @@ void Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p) { dVAR; + + PERL_ARGS_ASSERT_SAVE_DESTRUCTOR; + SSCHECK(3); SSPUSHDPTR(f); SSPUSHPTR(p); @@ -526,6 +597,9 @@ Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr) { dVAR; SV *sv; + + PERL_ARGS_ASSERT_SAVE_AELEM; + SvGETMAGIC(*sptr); SSCHECK(4); SSPUSHPTR(SvREFCNT_inc_simple(av)); @@ -550,6 +624,9 @@ Perl_save_helem(pTHX_ HV *hv, SV *key, SV **sptr) { dVAR; SV *sv; + + PERL_ARGS_ASSERT_SAVE_HELEM; + SvGETMAGIC(*sptr); SSCHECK(4); SSPUSHPTR(SvREFCNT_inc_simple(hv)); @@ -570,6 +647,9 @@ SV* Perl_save_svref(pTHX_ SV **sptr) { dVAR; + + PERL_ARGS_ASSERT_SAVE_SVREF; + SvGETMAGIC(*sptr); SSCHECK(3); SSPUSHPTR(sptr); @@ -1035,6 +1115,9 @@ void Perl_cx_dump(pTHX_ PERL_CONTEXT *cx) { dVAR; + + PERL_ARGS_ASSERT_CX_DUMP; + #ifdef DEBUGGING PerlIO_printf(Perl_debug_log, "CX %ld = %s\n", (long)(cx - cxstack), PL_block_type[CxTYPE(cx)]); if (CxTYPE(cx) != CXt_SUBST) { diff --git a/sv.c b/sv.c index 41374b2..d0f9edb 100644 --- a/sv.c +++ b/sv.c @@ -159,6 +159,9 @@ Perl_offer_nice_chunk(pTHX_ void *const chunk, const U32 chunk_size) dVAR; void *new_chunk; U32 new_chunk_size; + + PERL_ARGS_ASSERT_OFFER_NICE_CHUNK; + new_chunk = (void *)(chunk); new_chunk_size = (chunk_size); if (new_chunk_size > PL_nice_chunk_size) { @@ -291,6 +294,9 @@ STATIC void S_del_sv(pTHX_ SV *p) { dVAR; + + PERL_ARGS_ASSERT_DEL_SV; + if (DEBUG_D_TEST) { SV* sva; bool ok = 0; @@ -339,6 +345,8 @@ Perl_sv_add_arena(pTHX_ char *const ptr, const U32 size, const U32 flags) register SV* sv; register SV* svend; + PERL_ARGS_ASSERT_SV_ADD_ARENA; + /* The first SV in an arena isn't an SV. */ SvANY(sva) = (void *) PL_sv_arenaroot; /* ptr to next arena */ SvREFCNT(sva) = size / sizeof(SV); /* number of SV slots */ @@ -376,6 +384,8 @@ S_visit(pTHX_ SVFUNC_t f, const U32 flags, const U32 mask) SV* sva; I32 visited = 0; + PERL_ARGS_ASSERT_VISIT; + for (sva = PL_sv_arenaroot; sva; sva = (SV*)SvANY(sva)) { register const SV * const svend = &sva[SvREFCNT(sva)]; register SV* sv; @@ -1125,6 +1135,8 @@ Perl_sv_upgrade(pTHX_ register SV *const sv, svtype new_type) = bodies_by_type + old_type; SV *referant = NULL; + PERL_ARGS_ASSERT_SV_UPGRADE; + if (new_type != SVt_PV && SvIsCOW(sv)) { sv_force_normal_flags(sv, 0); } @@ -1402,7 +1414,10 @@ Perl_sv_backoff(pTHX_ register SV *const sv) { STRLEN delta; const char * const s = SvPVX_const(sv); + + PERL_ARGS_ASSERT_SV_BACKOFF; PERL_UNUSED_CONTEXT; + assert(SvOOK(sv)); assert(SvTYPE(sv) != SVt_PVHV); assert(SvTYPE(sv) != SVt_PVAV); @@ -1431,6 +1446,8 @@ Perl_sv_grow(pTHX_ register SV *const sv, register STRLEN newlen) { register char *s; + PERL_ARGS_ASSERT_SV_GROW; + if (PL_madskills && newlen >= 0x100000) { PerlIO_printf(Perl_debug_log, "Allocation too large: %"UVxf"\n", (UV)newlen); @@ -1498,6 +1515,9 @@ void Perl_sv_setiv(pTHX_ register SV *const sv, const IV i) { dVAR; + + PERL_ARGS_ASSERT_SV_SETIV; + SV_CHECK_THINKFIRST_COW_DROP(sv); switch (SvTYPE(sv)) { case SVt_NULL: @@ -1534,6 +1554,8 @@ Like C, but also handles 'set' magic. void Perl_sv_setiv_mg(pTHX_ register SV *const sv, const IV i) { + PERL_ARGS_ASSERT_SV_SETIV_MG; + sv_setiv(sv,i); SvSETMAGIC(sv); } @@ -1550,6 +1572,8 @@ Does not handle 'set' magic. See also C. void Perl_sv_setuv(pTHX_ register SV *const sv, const UV u) { + PERL_ARGS_ASSERT_SV_SETUV; + /* With these two if statements: u=1.49 s=0.52 cu=72.49 cs=10.64 scripts=270 tests=20865 @@ -1578,6 +1602,8 @@ Like C, but also handles 'set' magic. void Perl_sv_setuv_mg(pTHX_ register SV *const sv, const UV u) { + PERL_ARGS_ASSERT_SV_SETUV_MG; + sv_setuv(sv,u); SvSETMAGIC(sv); } @@ -1595,6 +1621,9 @@ void Perl_sv_setnv(pTHX_ register SV *const sv, const NV num) { dVAR; + + PERL_ARGS_ASSERT_SV_SETNV; + SV_CHECK_THINKFIRST_COW_DROP(sv); switch (SvTYPE(sv)) { case SVt_NULL: @@ -1632,6 +1661,8 @@ Like C, but also handles 'set' magic. void Perl_sv_setnv_mg(pTHX_ register SV *const sv, const NV num) { + PERL_ARGS_ASSERT_SV_SETNV_MG; + sv_setnv(sv,num); SvSETMAGIC(sv); } @@ -1648,6 +1679,8 @@ S_not_a_number(pTHX_ SV *const sv) char tmpbuf[64]; const char *pv; + PERL_ARGS_ASSERT_NOT_A_NUMBER; + if (DO_UTF8(sv)) { dsv = newSVpvs_flags("", SVs_TEMP); pv = sv_uni_display(dsv, sv, 10, 0); @@ -1727,6 +1760,8 @@ Perl_looks_like_number(pTHX_ SV *const sv) register const char *sbegin; STRLEN len; + PERL_ARGS_ASSERT_LOOKS_LIKE_NUMBER; + if (SvPOK(sv)) { sbegin = SvPVX_const(sv); len = SvCUR(sv); @@ -1744,6 +1779,8 @@ S_glob_2number(pTHX_ GV * const gv) const U32 wasfake = SvFLAGS(gv) & SVf_FAKE; SV *const buffer = sv_newmortal(); + PERL_ARGS_ASSERT_GLOB_2NUMBER; + /* FAKE globs can get coerced, so need to turn this off temporarily if it is on. */ SvFAKE_off(gv); @@ -1765,6 +1802,8 @@ S_glob_2pv(pTHX_ GV * const gv, STRLEN * const len) const U32 wasfake = SvFLAGS(gv) & SVf_FAKE; SV *const buffer = sv_newmortal(); + PERL_ARGS_ASSERT_GLOB_2PV; + /* FAKE globs can get coerced, so need to turn this off temporarily if it is on. */ SvFAKE_off(gv); @@ -1870,6 +1909,9 @@ S_sv_2iuv_non_preserve(pTHX_ register SV *const sv ) { dVAR; + + PERL_ARGS_ASSERT_SV_2IUV_NON_PRESERVE; + DEBUG_c(PerlIO_printf(Perl_debug_log,"sv_2iuv_non '%s', IV=0x%"UVxf" NV=%"NVgf" inttype=%"UVXf"\n", SvPVX_const(sv), SvIVX(sv), SvNVX(sv), (UV)numtype)); if (SvNVX(sv) < (NV)IV_MIN) { (void)SvIOKp_on(sv); @@ -1915,8 +1957,12 @@ S_sv_2iuv_non_preserve(pTHX_ register SV *const sv #endif /* !NV_PRESERVES_UV*/ STATIC bool -S_sv_2iuv_common(pTHX_ SV *const sv) { +S_sv_2iuv_common(pTHX_ SV *const sv) +{ dVAR; + + PERL_ARGS_ASSERT_SV_2IUV_COMMON; + if (SvNOKp(sv)) { /* erm. not sure. *should* never get NOKp (without NOK) from sv_2nv * without also getting a cached IV/UV from it at the same time @@ -2579,6 +2625,8 @@ access this function. SV * Perl_sv_2num(pTHX_ register SV *const sv) { + PERL_ARGS_ASSERT_SV_2NUM; + if (!SvROK(sv)) return sv; if (SvAMAGIC(sv)) { @@ -2603,6 +2651,8 @@ S_uiv_2buf(char *const buf, const IV iv, UV uv, const int is_uv, char **const pe char * const ebuf = ptr; int sign; + PERL_ARGS_ASSERT_UIV_2BUF; + if (is_uv) sign = 0; else if (iv >= 0) { @@ -2923,6 +2973,9 @@ Perl_sv_copypv(pTHX_ SV *const dsv, register SV *const ssv) { STRLEN len; const char * const s = SvPV_const(ssv,len); + + PERL_ARGS_ASSERT_SV_COPYPV; + sv_setpvn(dsv,s,len); if (SvUTF8(ssv)) SvUTF8_on(dsv); @@ -2945,6 +2998,8 @@ Usually accessed via the C macro. char * Perl_sv_2pvbyte(pTHX_ register SV *const sv, STRLEN *const lp) { + PERL_ARGS_ASSERT_SV_2PVBYTE; + sv_utf8_downgrade(sv,0); return lp ? SvPV(sv,*lp) : SvPV_nolen(sv); } @@ -2963,6 +3018,8 @@ Usually accessed via the C macro. char * Perl_sv_2pvutf8(pTHX_ register SV *sv, STRLEN *lp) { + PERL_ARGS_ASSERT_SV_2PVUTF8; + sv_utf8_upgrade(sv); return lp ? SvPV(sv,*lp) : SvPV_nolen(sv); } @@ -2981,6 +3038,9 @@ bool Perl_sv_2bool(pTHX_ register SV *sv) { dVAR; + + PERL_ARGS_ASSERT_SV_2BOOL; + SvGETMAGIC(sv); if (!SvOK(sv)) @@ -3049,6 +3109,9 @@ STRLEN Perl_sv_utf8_upgrade_flags(pTHX_ register SV *sv, I32 flags) { dVAR; + + PERL_ARGS_ASSERT_SV_UTF8_UPGRADE_FLAGS; + if (sv == &PL_sv_undef) return 0; if (!SvPOK(sv)) { @@ -3119,6 +3182,9 @@ bool Perl_sv_utf8_downgrade(pTHX_ register SV* sv, bool fail_ok) { dVAR; + + PERL_ARGS_ASSERT_SV_UTF8_DOWNGRADE; + if (SvPOKp(sv) && SvUTF8(sv)) { if (SvCUR(sv)) { U8 *s; @@ -3158,6 +3224,8 @@ flag off so that it looks like octets again. void Perl_sv_utf8_encode(pTHX_ register SV *sv) { + PERL_ARGS_ASSERT_SV_UTF8_ENCODE; + if (SvIsCOW(sv)) { sv_force_normal_flags(sv, 0); } @@ -3183,6 +3251,8 @@ Scans PV for validity and returns false if the PV is invalid UTF-8. bool Perl_sv_utf8_decode(pTHX_ register SV *sv) { + PERL_ARGS_ASSERT_SV_UTF8_DECODE; + if (SvPOKp(sv)) { const U8 *c; const U8 *e; @@ -3251,6 +3321,8 @@ S_glob_assign_glob(pTHX_ SV *dstr, SV *sstr, const int dtype) { I32 mro_changes = 0; /* 1 = method, 2 = isa */ + PERL_ARGS_ASSERT_GLOB_ASSIGN_GLOB; + if (dtype != SVt_PVGV) { const char * const name = GvNAME(sstr); const STRLEN len = GvNAMELEN(sstr); @@ -3322,7 +3394,8 @@ S_glob_assign_glob(pTHX_ SV *dstr, SV *sstr, const int dtype) } static void -S_glob_assign_ref(pTHX_ SV *dstr, SV *sstr) { +S_glob_assign_ref(pTHX_ SV *dstr, SV *sstr) +{ SV * const sref = SvREFCNT_inc(SvRV(sstr)); SV *dref = NULL; const int intro = GvINTRO(dstr); @@ -3330,6 +3403,7 @@ S_glob_assign_ref(pTHX_ SV *dstr, SV *sstr) { U8 import_flag = 0; const U32 stype = SvTYPE(sref); + PERL_ARGS_ASSERT_GLOB_ASSIGN_REF; #ifdef GV_UNIQUE_CHECK if (GvUNIQUE((GV*)dstr)) { @@ -3440,6 +3514,8 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV *sstr, I32 flags) register int dtype; register svtype stype; + PERL_ARGS_ASSERT_SV_SETSV_FLAGS; + if (sstr == dstr) return; @@ -3870,6 +3946,8 @@ Like C, but also handles 'set' magic. void Perl_sv_setsv_mg(pTHX_ SV *dstr, register SV *sstr) { + PERL_ARGS_ASSERT_SV_SETSV_MG; + sv_setsv(dstr,sstr); SvSETMAGIC(dstr); } @@ -3882,6 +3960,8 @@ Perl_sv_setsv_cow(pTHX_ SV *dstr, SV *sstr) STRLEN len = SvLEN(sstr); register char *new_pv; + PERL_ARGS_ASSERT_SV_SETSV_COW; + if (DEBUG_C_TEST) { PerlIO_printf(Perl_debug_log, "Fast copy on write: %p -> %p\n", (void*)sstr, (void*)dstr); @@ -3959,6 +4039,8 @@ Perl_sv_setpvn(pTHX_ register SV *sv, register const char *ptr, register STRLEN dVAR; register char *dptr; + PERL_ARGS_ASSERT_SV_SETPVN; + SV_CHECK_THINKFIRST_COW_DROP(sv); if (!ptr) { (void)SvOK_off(sv); @@ -3991,6 +4073,8 @@ Like C, but also handles 'set' magic. void Perl_sv_setpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRLEN len) { + PERL_ARGS_ASSERT_SV_SETPVN_MG; + sv_setpvn(sv,ptr,len); SvSETMAGIC(sv); } @@ -4010,6 +4094,8 @@ Perl_sv_setpv(pTHX_ register SV *sv, register const char *ptr) dVAR; register STRLEN len; + PERL_ARGS_ASSERT_SV_SETPV; + SV_CHECK_THINKFIRST_COW_DROP(sv); if (!ptr) { (void)SvOK_off(sv); @@ -4036,6 +4122,8 @@ Like C, but also handles 'set' magic. void Perl_sv_setpv_mg(pTHX_ register SV *sv, register const char *ptr) { + PERL_ARGS_ASSERT_SV_SETPV_MG; + sv_setpv(sv,ptr); SvSETMAGIC(sv); } @@ -4065,6 +4153,9 @@ Perl_sv_usepvn_flags(pTHX_ SV *sv, char *ptr, STRLEN len, U32 flags) { dVAR; STRLEN allocate; + + PERL_ARGS_ASSERT_SV_USEPVN_FLAGS; + SV_CHECK_THINKFIRST_COW_DROP(sv); SvUPGRADE(sv, SVt_PV); if (!ptr) { @@ -4119,6 +4210,8 @@ Perl_sv_usepvn_flags(pTHX_ SV *sv, char *ptr, STRLEN len, U32 flags) STATIC void S_sv_release_COW(pTHX_ register SV *sv, const char *pvx, SV *after) { + PERL_ARGS_ASSERT_SV_RELEASE_COW; + { /* this SV was SvIsCOW_normal(sv) */ /* we need to find the SV pointing to us. */ SV *current = SV_COW_NEXT_SV(after); @@ -4166,6 +4259,9 @@ void Perl_sv_force_normal_flags(pTHX_ register SV *sv, U32 flags) { dVAR; + + PERL_ARGS_ASSERT_SV_FORCE_NORMAL_FLAGS; + #ifdef PERL_OLD_COPY_ON_WRITE if (SvREADONLY(sv)) { /* At this point I believe I should acquire a global SV mutex. */ @@ -4258,6 +4354,8 @@ Perl_sv_chop(pTHX_ register SV *sv, register const char *ptr) const U8 *real_start; #endif + PERL_ARGS_ASSERT_SV_CHOP; + if (!ptr || !SvPOKp(sv)) return; delta = ptr - SvPVX_const(sv); @@ -4339,6 +4437,8 @@ Perl_sv_catpvn_flags(pTHX_ register SV *dsv, register const char *sstr, register STRLEN dlen; const char * const dstr = SvPV_force_flags(dsv, dlen, flags); + PERL_ARGS_ASSERT_SV_CATPVN_FLAGS; + SvGROW(dsv, dlen + slen + 1); if (sstr == dstr) sstr = SvPVX_const(dsv); @@ -4371,7 +4471,10 @@ void Perl_sv_catsv_flags(pTHX_ SV *dsv, register SV *ssv, I32 flags) { dVAR; - if (ssv) { + + PERL_ARGS_ASSERT_SV_CATSV_FLAGS; + + if (ssv) { STRLEN slen; const char *spv = SvPV_const(ssv, slen); if (spv) { @@ -4424,6 +4527,8 @@ Perl_sv_catpv(pTHX_ register SV *sv, register const char *ptr) STRLEN tlen; char *junk; + PERL_ARGS_ASSERT_SV_CATPV; + if (!ptr) return; junk = SvPV_force(sv, tlen); @@ -4448,6 +4553,8 @@ Like C, but also handles 'set' magic. void Perl_sv_catpv_mg(pTHX_ register SV *sv, register const char *ptr) { + PERL_ARGS_ASSERT_SV_CATPV_MG; + sv_catpv(sv,ptr); SvSETMAGIC(sv); } @@ -4508,6 +4615,8 @@ Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, const MGVTBL *vtable, dVAR; MAGIC* mg; + PERL_ARGS_ASSERT_SV_MAGICEXT; + SvUPGRADE(sv, SVt_PVMG); Newxz(mg, 1, MAGIC); mg->mg_moremagic = SvMAGIC(sv); @@ -4591,6 +4700,8 @@ Perl_sv_magic(pTHX_ register SV *sv, SV *obj, int how, const char *name, I32 nam const MGVTBL *vtable; MAGIC* mg; + PERL_ARGS_ASSERT_SV_MAGIC; + #ifdef PERL_OLD_COPY_ON_WRITE if (SvIsCOW(sv)) sv_force_normal_flags(sv, 0); @@ -4774,6 +4885,9 @@ Perl_sv_unmagic(pTHX_ SV *sv, int type) { MAGIC* mg; MAGIC** mgp; + + PERL_ARGS_ASSERT_SV_UNMAGIC; + if (SvTYPE(sv) < SVt_PVMG || !SvMAGIC(sv)) return 0; mgp = &(((XPVMG*) SvANY(sv))->xmg_u.xmg_magic); @@ -4823,6 +4937,9 @@ SV * Perl_sv_rvweaken(pTHX_ SV *sv) { SV *tsv; + + PERL_ARGS_ASSERT_SV_RVWEAKEN; + if (!SvOK(sv)) /* let undefs pass */ return sv; if (!SvROK(sv)) @@ -4849,6 +4966,8 @@ Perl_sv_add_backref(pTHX_ SV *tsv, SV *sv) dVAR; AV *av; + PERL_ARGS_ASSERT_SV_ADD_BACKREF; + if (SvTYPE(tsv) == SVt_PVHV) { AV **const avp = Perl_hv_backreferences_p(aTHX_ (HV*)tsv); @@ -4905,6 +5024,8 @@ S_sv_del_backref(pTHX_ SV *tsv, SV *sv) SV **svp; I32 i; + PERL_ARGS_ASSERT_SV_DEL_BACKREF; + if (SvTYPE(tsv) == SVt_PVHV && SvOOK(tsv)) { av = *Perl_hv_backreferences_p(aTHX_ (HV*)tsv); /* We mustn't attempt to "fix up" the hash here by moving the @@ -4952,6 +5073,7 @@ Perl_sv_kill_backrefs(pTHX_ SV *sv, AV *av) { SV **svp = AvARRAY(av); + PERL_ARGS_ASSERT_SV_KILL_BACKREFS; PERL_UNUSED_ARG(sv); /* Not sure why the av can get freed ahead of its sv, but somehow it does @@ -5009,6 +5131,7 @@ Perl_sv_insert(pTHX_ SV *bigstr, STRLEN offset, STRLEN len, const char *little, register I32 i; STRLEN curlen; + PERL_ARGS_ASSERT_SV_INSERT; if (!bigstr) Perl_croak(aTHX_ "Can't modify non-existent substring"); @@ -5099,6 +5222,9 @@ Perl_sv_replace(pTHX_ register SV *sv, register SV *nsv) { dVAR; const U32 refcnt = SvREFCNT(sv); + + PERL_ARGS_ASSERT_SV_REPLACE; + SV_CHECK_THINKFIRST_COW_DROP(sv); if (SvREFCNT(nsv) != 1) { Perl_croak(aTHX_ "panic: reference miscount on nsv in sv_replace() (%" @@ -5182,7 +5308,7 @@ Perl_sv_clear(pTHX_ register SV *sv) = bodies_by_type + type; HV *stash; - assert(sv); + PERL_ARGS_ASSERT_SV_CLEAR; assert(SvREFCNT(sv) == 0); assert(SvTYPE(sv) != SVTYPEMASK); @@ -5469,6 +5595,9 @@ void Perl_sv_free2(pTHX_ SV *sv) { dVAR; + + PERL_ARGS_ASSERT_SV_FREE2; + #ifdef DEBUGGING if (SvTEMP(sv)) { if (ckWARN_d(WARN_DEBUGGING)) @@ -5588,6 +5717,8 @@ S_sv_pos_u2b_forwards(const U8 *const start, const U8 *const send, { const U8 *s = start; + PERL_ARGS_ASSERT_SV_POS_U2B_FORWARDS; + while (s < send && uoffset--) s += UTF8SKIP(s); if (s > send) { @@ -5606,6 +5737,9 @@ S_sv_pos_u2b_midway(const U8 *const start, const U8 *send, STRLEN uoffset, STRLEN uend) { STRLEN backw = uend - uoffset; + + PERL_ARGS_ASSERT_SV_POS_U2B_MIDWAY; + if (uoffset < 2 * backw) { /* The assumption is that going forwards is twice the speed of going forward (that's where the 2 * backw comes from). @@ -5632,10 +5766,13 @@ S_sv_pos_u2b_midway(const U8 *const start, const U8 *send, static STRLEN S_sv_pos_u2b_cached(pTHX_ SV *sv, MAGIC **mgp, const U8 *const start, const U8 *const send, STRLEN uoffset, - STRLEN uoffset0, STRLEN boffset0) { + STRLEN uoffset0, STRLEN boffset0) +{ STRLEN boffset = 0; /* Actually always set, but let's keep gcc happy. */ bool found = FALSE; + PERL_ARGS_ASSERT_SV_POS_U2B_CACHED; + assert (uoffset >= uoffset0); if (SvMAGICAL(sv) && !SvREADONLY(sv) && PL_utf8cache @@ -5753,6 +5890,8 @@ Perl_sv_pos_u2b(pTHX_ register SV *sv, I32* offsetp, I32* lenp) const U8 *start; STRLEN len; + PERL_ARGS_ASSERT_SV_POS_U2B; + if (!sv) return; @@ -5813,6 +5952,9 @@ S_utf8_mg_pos_cache_update(pTHX_ SV *sv, MAGIC **mgp, STRLEN byte, STRLEN utf8, STRLEN blen) { STRLEN *cache; + + PERL_ARGS_ASSERT_UTF8_MG_POS_CACHE_UPDATE; + if (SvREADONLY(sv)) return; @@ -5952,6 +6094,8 @@ S_sv_pos_b2u_midway(pTHX_ const U8 *s, const U8 *const target, const U8 *end, const STRLEN forw = target - s; STRLEN backw = end - target; + PERL_ARGS_ASSERT_SV_POS_B2U_MIDWAY; + if (forw < 2 * backw) { return utf8_length(s, target); } @@ -5993,6 +6137,8 @@ Perl_sv_pos_b2u(pTHX_ register SV* sv, I32* offsetp) const U8* send; bool found = FALSE; + PERL_ARGS_ASSERT_SV_POS_B2U; + if (!sv) return; @@ -6336,6 +6482,8 @@ Perl_sv_collxfrm(pTHX_ SV *sv, STRLEN *nxp) dVAR; MAGIC *mg; + PERL_ARGS_ASSERT_SV_COLLXFRM; + mg = SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_collxfrm) : (MAGIC *) NULL; if (!mg || !mg->mg_ptr || *(U32*)mg->mg_ptr != PL_collation_ix) { const char *s; @@ -6403,6 +6551,8 @@ Perl_sv_gets(pTHX_ register SV *sv, register PerlIO *fp, I32 append) I32 i = 0; I32 rspara = 0; + PERL_ARGS_ASSERT_SV_GETS; + if (SvTHINKFIRST(sv)) sv_force_normal_flags(sv, append ? 0 : SV_COW_DROP_PV); /* XXX. If you make this PVIV, then copy on write can copy scalars read @@ -7313,6 +7463,9 @@ Perl_newSVpvf_nocontext(const char* pat, ...) dTHX; register SV *sv; va_list args; + + PERL_ARGS_ASSERT_NEWSVPVF_NOCONTEXT; + va_start(args, pat); sv = vnewSVpvf(pat, &args); va_end(args); @@ -7334,6 +7487,9 @@ Perl_newSVpvf(pTHX_ const char* pat, ...) { register SV *sv; va_list args; + + PERL_ARGS_ASSERT_NEWSVPVF; + va_start(args, pat); sv = vnewSVpvf(pat, &args); va_end(args); @@ -7347,6 +7503,9 @@ Perl_vnewSVpvf(pTHX_ const char* pat, va_list* args) { dVAR; register SV *sv; + + PERL_ARGS_ASSERT_VNEWSVPVF; + new_SV(sv); sv_vsetpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL); return sv; @@ -7445,6 +7604,9 @@ Perl_newRV_noinc(pTHX_ SV *tmpRef) { dVAR; register SV *sv = newSV_type(SVt_IV); + + PERL_ARGS_ASSERT_NEWRV_NOINC; + SvTEMP_off(tmpRef); SvRV_set(sv, tmpRef); SvROK_on(sv); @@ -7459,6 +7621,9 @@ SV * Perl_newRV(pTHX_ SV *sv) { dVAR; + + PERL_ARGS_ASSERT_NEWRV; + return newRV_noinc(SvREFCNT_inc_simple_NN(sv)); } @@ -7507,6 +7672,8 @@ Perl_sv_reset(pTHX_ register const char *s, HV *stash) dVAR; char todo[PERL_UCHAR_MAX+1]; + PERL_ARGS_ASSERT_SV_RESET; + if (!stash) return; @@ -7609,6 +7776,8 @@ Perl_sv_2io(pTHX_ SV *sv) IO* io; GV* gv; + PERL_ARGS_ASSERT_SV_2IO; + switch (SvTYPE(sv)) { case SVt_PVIO: io = (IO*)sv; @@ -7653,6 +7822,8 @@ Perl_sv_2cv(pTHX_ SV *sv, HV **st, GV **gvp, I32 lref) GV *gv = NULL; CV *cv = NULL; + PERL_ARGS_ASSERT_SV_2CV; + if (!sv) { *st = NULL; *gvp = NULL; @@ -7787,6 +7958,9 @@ char * Perl_sv_pvn_force_flags(pTHX_ SV *sv, STRLEN *lp, I32 flags) { dVAR; + + PERL_ARGS_ASSERT_SV_PVN_FORCE_FLAGS; + if (SvTHINKFIRST(sv) && !SvROK(sv)) sv_force_normal_flags(sv, 0); @@ -7844,6 +8018,8 @@ The backend for the C macro. Always use the macro instead. char * Perl_sv_pvbyten_force(pTHX_ SV *sv, STRLEN *lp) { + PERL_ARGS_ASSERT_SV_PVBYTEN_FORCE; + sv_pvn_force(sv,lp); sv_utf8_downgrade(sv,0); *lp = SvCUR(sv); @@ -7861,6 +8037,8 @@ The backend for the C macro. Always use the macro instead. char * Perl_sv_pvutf8n_force(pTHX_ SV *sv, STRLEN *lp) { + PERL_ARGS_ASSERT_SV_PVUTF8N_FORCE; + sv_pvn_force(sv,lp); sv_utf8_upgrade(sv); *lp = SvCUR(sv); @@ -7878,6 +8056,8 @@ Returns a string describing what the SV is a reference to. const char * Perl_sv_reftype(pTHX_ const SV *sv, int ob) { + PERL_ARGS_ASSERT_SV_REFTYPE; + /* The fact that I don't need to downcast to char * everywhere, only in ?: inside return suggests a const propagation bug in g++. */ if (ob && SvOBJECT(sv)) { @@ -7956,6 +8136,9 @@ int Perl_sv_isa(pTHX_ SV *sv, const char *name) { const char *hvname; + + PERL_ARGS_ASSERT_SV_ISA; + if (!sv) return 0; SvGETMAGIC(sv); @@ -7988,6 +8171,8 @@ Perl_newSVrv(pTHX_ SV *rv, const char *classname) dVAR; SV *sv; + PERL_ARGS_ASSERT_NEWSVRV; + new_SV(sv); SV_CHECK_THINKFIRST_COW_DROP(rv); @@ -8040,6 +8225,9 @@ SV* Perl_sv_setref_pv(pTHX_ SV *rv, const char *classname, void *pv) { dVAR; + + PERL_ARGS_ASSERT_SV_SETREF_PV; + if (!pv) { sv_setsv(rv, &PL_sv_undef); SvSETMAGIC(rv); @@ -8064,6 +8252,8 @@ will have a reference count of 1, and the RV will be returned. SV* Perl_sv_setref_iv(pTHX_ SV *rv, const char *classname, IV iv) { + PERL_ARGS_ASSERT_SV_SETREF_IV; + sv_setiv(newSVrv(rv,classname), iv); return rv; } @@ -8083,6 +8273,8 @@ will have a reference count of 1, and the RV will be returned. SV* Perl_sv_setref_uv(pTHX_ SV *rv, const char *classname, UV uv) { + PERL_ARGS_ASSERT_SV_SETREF_UV; + sv_setuv(newSVrv(rv,classname), uv); return rv; } @@ -8102,6 +8294,8 @@ will have a reference count of 1, and the RV will be returned. SV* Perl_sv_setref_nv(pTHX_ SV *rv, const char *classname, NV nv) { + PERL_ARGS_ASSERT_SV_SETREF_NV; + sv_setnv(newSVrv(rv,classname), nv); return rv; } @@ -8124,6 +8318,8 @@ Note that C copies the pointer while this copies the string. SV* Perl_sv_setref_pvn(pTHX_ SV *rv, const char *classname, const char *pv, STRLEN n) { + PERL_ARGS_ASSERT_SV_SETREF_PVN; + sv_setpvn(newSVrv(rv,classname), pv, n); return rv; } @@ -8143,6 +8339,9 @@ Perl_sv_bless(pTHX_ SV *sv, HV *stash) { dVAR; SV *tmpRef; + + PERL_ARGS_ASSERT_SV_BLESS; + if (!SvROK(sv)) Perl_croak(aTHX_ "Can't bless non-reference value"); tmpRef = SvRV(sv); @@ -8188,6 +8387,8 @@ S_sv_unglob(pTHX_ SV *sv) HV *stash; SV * const temp = sv_newmortal(); + PERL_ARGS_ASSERT_SV_UNGLOB; + assert(SvTYPE(sv) == SVt_PVGV); SvFAKE_off(sv); gv_efullname3(temp, (GV *) sv, "*"); @@ -8240,6 +8441,8 @@ Perl_sv_unref_flags(pTHX_ SV *ref, U32 flags) { SV* const target = SvRV(ref); + PERL_ARGS_ASSERT_SV_UNREF_FLAGS; + if (SvWEAKREF(ref)) { sv_del_backref(target, ref); SvWEAKREF_off(ref); @@ -8266,6 +8469,8 @@ Untaint an SV. Use C instead. void Perl_sv_untaint(pTHX_ SV *sv) { + PERL_ARGS_ASSERT_SV_UNTAINT; + if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) { MAGIC * const mg = mg_find(sv, PERL_MAGIC_taint); if (mg) @@ -8283,6 +8488,8 @@ Test an SV for taintedness. Use C instead. bool Perl_sv_tainted(pTHX_ SV *sv) { + PERL_ARGS_ASSERT_SV_TAINTED; + if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) { const MAGIC * const mg = mg_find(sv, PERL_MAGIC_taint); if (mg && (mg->mg_len & 1) ) @@ -8307,6 +8514,8 @@ Perl_sv_setpviv(pTHX_ SV *sv, IV iv) char *ebuf; char * const ptr = uiv_2buf(buf, iv, 0, 0, &ebuf); + PERL_ARGS_ASSERT_SV_SETPVIV; + sv_setpvn(sv, ptr, ebuf - ptr); } @@ -8321,6 +8530,8 @@ Like C, but also handles 'set' magic. void Perl_sv_setpviv_mg(pTHX_ SV *sv, IV iv) { + PERL_ARGS_ASSERT_SV_SETPVIV_MG; + sv_setpviv(sv, iv); SvSETMAGIC(sv); } @@ -8337,6 +8548,9 @@ Perl_sv_setpvf_nocontext(SV *sv, const char* pat, ...) { dTHX; va_list args; + + PERL_ARGS_ASSERT_SV_SETPVF_NOCONTEXT; + va_start(args, pat); sv_vsetpvf(sv, pat, &args); va_end(args); @@ -8352,6 +8566,9 @@ Perl_sv_setpvf_mg_nocontext(SV *sv, const char* pat, ...) { dTHX; va_list args; + + PERL_ARGS_ASSERT_SV_SETPVF_MG_NOCONTEXT; + va_start(args, pat); sv_vsetpvf_mg(sv, pat, &args); va_end(args); @@ -8371,6 +8588,9 @@ void Perl_sv_setpvf(pTHX_ SV *sv, const char* pat, ...) { va_list args; + + PERL_ARGS_ASSERT_SV_SETPVF; + va_start(args, pat); sv_vsetpvf(sv, pat, &args); va_end(args); @@ -8390,6 +8610,8 @@ Usually used via its frontend C. void Perl_sv_vsetpvf(pTHX_ SV *sv, const char* pat, va_list* args) { + PERL_ARGS_ASSERT_SV_VSETPVF; + sv_vsetpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL); } @@ -8405,6 +8627,9 @@ void Perl_sv_setpvf_mg(pTHX_ SV *sv, const char* pat, ...) { va_list args; + + PERL_ARGS_ASSERT_SV_SETPVF_MG; + va_start(args, pat); sv_vsetpvf_mg(sv, pat, &args); va_end(args); @@ -8423,6 +8648,8 @@ Usually used via its frontend C. void Perl_sv_vsetpvf_mg(pTHX_ SV *sv, const char* pat, va_list* args) { + PERL_ARGS_ASSERT_SV_VSETPVF_MG; + sv_vsetpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL); SvSETMAGIC(sv); } @@ -8439,6 +8666,9 @@ Perl_sv_catpvf_nocontext(SV *sv, const char* pat, ...) { dTHX; va_list args; + + PERL_ARGS_ASSERT_SV_CATPVF_NOCONTEXT; + va_start(args, pat); sv_vcatpvf(sv, pat, &args); va_end(args); @@ -8454,6 +8684,9 @@ Perl_sv_catpvf_mg_nocontext(SV *sv, const char* pat, ...) { dTHX; va_list args; + + PERL_ARGS_ASSERT_SV_CATPVF_MG_NOCONTEXT; + va_start(args, pat); sv_vcatpvf_mg(sv, pat, &args); va_end(args); @@ -8477,6 +8710,9 @@ void Perl_sv_catpvf(pTHX_ SV *sv, const char* pat, ...) { va_list args; + + PERL_ARGS_ASSERT_SV_CATPVF; + va_start(args, pat); sv_vcatpvf(sv, pat, &args); va_end(args); @@ -8496,6 +8732,8 @@ Usually used via its frontend C. void Perl_sv_vcatpvf(pTHX_ SV *sv, const char* pat, va_list* args) { + PERL_ARGS_ASSERT_SV_VCATPVF; + sv_vcatpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL); } @@ -8511,6 +8749,9 @@ void Perl_sv_catpvf_mg(pTHX_ SV *sv, const char* pat, ...) { va_list args; + + PERL_ARGS_ASSERT_SV_CATPVF_MG; + va_start(args, pat); sv_vcatpvf_mg(sv, pat, &args); va_end(args); @@ -8529,6 +8770,8 @@ Usually used via its frontend C. void Perl_sv_vcatpvf_mg(pTHX_ SV *sv, const char* pat, va_list* args) { + PERL_ARGS_ASSERT_SV_VCATPVF_MG; + sv_vcatpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL); SvSETMAGIC(sv); } @@ -8547,6 +8790,8 @@ Usually used via one of its frontends C and C. void Perl_sv_vsetpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV **svargs, I32 svmax, bool *maybe_tainted) { + PERL_ARGS_ASSERT_SV_VSETPVFN; + sv_setpvn(sv, "", 0); sv_vcatpvfn(sv, pat, patlen, args, svargs, svmax, maybe_tainted); } @@ -8556,6 +8801,9 @@ S_expect_number(pTHX_ char** pattern) { dVAR; I32 var = 0; + + PERL_ARGS_ASSERT_EXPECT_NUMBER; + switch (**pattern) { case '1': case '2': case '3': case '4': case '5': case '6': @@ -8577,6 +8825,8 @@ S_F0convert(NV nv, char *endbuf, STRLEN *len) const int neg = nv < 0; UV uv; + PERL_ARGS_ASSERT_F0CONVERT; + if (neg) nv = -nv; if (nv < UV_MAX) { @@ -8640,6 +8890,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV /* large enough for "%#.#f" --chip */ /* what about long double NVs? --jhi */ + PERL_ARGS_ASSERT_SV_VCATPVFN; PERL_UNUSED_ARG(maybe_tainted); /* no matter what, this is a string now */ @@ -9732,6 +9983,8 @@ Perl_parser_dup(pTHX_ const yy_parser *proto, CLONE_PARAMS* param) { yy_parser *parser; + PERL_ARGS_ASSERT_PARSER_DUP; + if (!proto) return NULL; @@ -9849,6 +10102,7 @@ Perl_fp_dup(pTHX_ PerlIO *fp, char type, CLONE_PARAMS *param) { PerlIO *ret; + PERL_ARGS_ASSERT_FP_DUP; PERL_UNUSED_ARG(type); if (!fp) @@ -9884,6 +10138,8 @@ Perl_gp_dup(pTHX_ GP *gp, CLONE_PARAMS* param) { GP *ret; + PERL_ARGS_ASSERT_GP_DUP; + if (!gp) return (GP*)NULL; /* look for it in the table first */ @@ -9917,6 +10173,9 @@ Perl_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS* param) { MAGIC *mgprev = (MAGIC*)NULL; MAGIC *mgret; + + PERL_ARGS_ASSERT_MG_DUP; + if (!mg) return (MAGIC*)NULL; /* look for it in the table first */ @@ -10009,10 +10268,13 @@ Perl_ptr_table_new(pTHX) /* map an existing pointer using a table */ STATIC PTR_TBL_ENT_t * -S_ptr_table_find(PTR_TBL_t *tbl, const void *sv) { +S_ptr_table_find(PTR_TBL_t *tbl, const void *sv) +{ PTR_TBL_ENT_t *tblent; const UV hash = PTR_TABLE_HASH(sv); - assert(tbl); + + PERL_ARGS_ASSERT_PTR_TABLE_FIND; + tblent = tbl->tbl_ary[hash & tbl->tbl_max]; for (; tblent; tblent = tblent->next) { if (tblent->oldval == sv) @@ -10025,7 +10287,10 @@ void * Perl_ptr_table_fetch(pTHX_ PTR_TBL_t *tbl, const void *sv) { PTR_TBL_ENT_t const *const tblent = ptr_table_find(tbl, sv); + + PERL_ARGS_ASSERT_PTR_TABLE_FETCH; PERL_UNUSED_CONTEXT; + return tblent ? tblent->newval : NULL; } @@ -10035,6 +10300,8 @@ void Perl_ptr_table_store(pTHX_ PTR_TBL_t *tbl, const void *oldsv, void *newsv) { PTR_TBL_ENT_t *tblent = ptr_table_find(tbl, oldsv); + + PERL_ARGS_ASSERT_PTR_TABLE_STORE; PERL_UNUSED_CONTEXT; if (tblent) { @@ -10063,6 +10330,8 @@ Perl_ptr_table_split(pTHX_ PTR_TBL_t *tbl) const UV oldsize = tbl->tbl_max + 1; UV newsize = oldsize * 2; UV i; + + PERL_ARGS_ASSERT_PTR_TABLE_SPLIT; PERL_UNUSED_CONTEXT; Renew(ary, newsize, PTR_TBL_ENT_t*); @@ -10128,6 +10397,8 @@ Perl_ptr_table_free(pTHX_ PTR_TBL_t *tbl) void Perl_rvpv_dup(pTHX_ SV *dstr, const SV *sstr, CLONE_PARAMS* param) { + PERL_ARGS_ASSERT_RVPV_DUP; + if (SvROK(sstr)) { SvRV_set(dstr, SvWEAKREF(sstr) ? sv_dup(SvRV(sstr), param) @@ -10177,6 +10448,8 @@ Perl_sv_dup(pTHX_ const SV *sstr, CLONE_PARAMS* param) dVAR; SV *dstr; + PERL_ARGS_ASSERT_SV_DUP; + if (!sstr) return NULL; if (SvTYPE(sstr) == SVTYPEMASK) { @@ -10505,6 +10778,8 @@ Perl_cx_dup(pTHX_ PERL_CONTEXT *cxs, I32 ix, I32 max, CLONE_PARAMS* param) { PERL_CONTEXT *ncxs; + PERL_ARGS_ASSERT_CX_DUP; + if (!cxs) return (PERL_CONTEXT*)NULL; @@ -10589,6 +10864,8 @@ Perl_si_dup(pTHX_ PERL_SI *si, CLONE_PARAMS* param) { PERL_SI *nsi; + PERL_ARGS_ASSERT_SI_DUP; + if (!si) return (PERL_SI*)NULL; @@ -10642,6 +10919,8 @@ Perl_any_dup(pTHX_ void *v, const PerlInterpreter *proto_perl) { void *ret; + PERL_ARGS_ASSERT_ANY_DUP; + if (!v) return (void*)NULL; @@ -10684,6 +10963,8 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param) void (*dptr) (void*); void (*dxptr) (pTHX_ void*); + PERL_ARGS_ASSERT_SS_DUP; + Newxz(nss, max, ANY); while (ix > 0) { @@ -11055,6 +11336,8 @@ perl_clone(PerlInterpreter *proto_perl, UV flags) dVAR; #ifdef PERL_IMPLICIT_SYS + PERL_ARGS_ASSERT_PERL_CLONE; + /* perlhost.h so we need to call into it to clone the host, CPerlHost should have a c interface, sky */ @@ -11090,6 +11373,9 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, CLONE_PARAMS* const param = &clone_params; PerlInterpreter * const my_perl = (PerlInterpreter*)(*ipM->pMalloc)(ipM, sizeof(PerlInterpreter)); + + PERL_ARGS_ASSERT_PERL_CLONE_USING; + /* for each stash, determine whether its objects should be cloned */ S_visit(proto_perl, do_mark_cloneable_stash, SVt_PVHV, SVTYPEMASK); PERL_SET_THX(my_perl); @@ -11125,6 +11411,9 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, CLONE_PARAMS clone_params; CLONE_PARAMS* param = &clone_params; PerlInterpreter * const my_perl = (PerlInterpreter*)PerlMem_malloc(sizeof(PerlInterpreter)); + + PERL_ARGS_ASSERT_PERL_CLONE; + /* for each stash, determine whether its objects should be cloned */ S_visit(proto_perl, do_mark_cloneable_stash, SVt_PVHV, SVTYPEMASK); PERL_SET_THX(my_perl); @@ -11769,6 +12058,9 @@ char * Perl_sv_recode_to_utf8(pTHX_ SV *sv, SV *encoding) { dVAR; + + PERL_ARGS_ASSERT_SV_RECODE_TO_UTF8; + if (SvPOK(sv) && !SvUTF8(sv) && !IN_BYTES && SvROK(encoding)) { SV *uni; STRLEN len; @@ -11831,6 +12123,9 @@ Perl_sv_cat_decode(pTHX_ SV *dsv, SV *encoding, { dVAR; bool ret = FALSE; + + PERL_ARGS_ASSERT_SV_CAT_DECODE; + if (SvPOK(ssv) && SvPOK(dsv) && SvROK(encoding) && offset) { SV *offsv; dSP; @@ -11880,6 +12175,8 @@ S_find_hash_subscript(pTHX_ HV *hv, SV* val) register HE **array; I32 i; + PERL_ARGS_ASSERT_FIND_HASH_SUBSCRIPT; + if (!hv || SvMAGICAL(hv) || !HvARRAY(hv) || (HvTOTALKEYS(hv) > FUV_MAX_SEARCH_SIZE)) return NULL; @@ -11911,6 +12208,9 @@ STATIC I32 S_find_array_subscript(pTHX_ AV *av, SV* val) { dVAR; + + PERL_ARGS_ASSERT_FIND_ARRAY_SUBSCRIPT; + if (!av || SvMAGICAL(av) || !AvARRAY(av) || (AvFILLp(av) > FUV_MAX_SEARCH_SIZE)) return -1; diff --git a/taint.c b/taint.c index 1bb292a..549d2ae 100644 --- a/taint.c +++ b/taint.c @@ -26,6 +26,9 @@ Perl_taint_proper(pTHX_ const char *f, const char *const s) { #if defined(HAS_SETEUID) && defined(DEBUGGING) dVAR; + + PERL_ARGS_ASSERT_TAINT_PROPER; + # if Uid_t_size == 1 { const UV uid = PL_uid; diff --git a/toke.c b/toke.c index ecee902..cb73104 100644 --- a/toke.c +++ b/toke.c @@ -377,6 +377,9 @@ STATIC int S_tokereport(pTHX_ I32 rv, const YYSTYPE* lvalp) { dVAR; + + PERL_ARGS_ASSERT_TOKEREPORT; + if (DEBUG_T_TEST) { const char *name = NULL; enum token_type type = TOKENTYPE_NONE; @@ -438,6 +441,9 @@ STATIC void S_printbuf(pTHX_ const char *const fmt, const char *const s) { SV* const tmp = newSVpvs(""); + + PERL_ARGS_ASSERT_PRINTBUF; + PerlIO_printf(Perl_debug_log, fmt, pv_display(tmp, s, strlen(s), 0, 60)); SvREFCNT_dec(tmp); } @@ -488,6 +494,8 @@ S_no_op(pTHX_ const char *const what, char *s) char * const oldbp = PL_bufptr; const bool is_first = (PL_oldbufptr == PL_linestart); + PERL_ARGS_ASSERT_NO_OP; + if (!s) s = oldbp; else @@ -572,6 +580,9 @@ S_feature_is_enabled(pTHX_ const char *const name, STRLEN namelen) dVAR; HV * const hinthv = GvHV(PL_hintgv); char he_name[8 + MAX_FEATURE_LEN] = "feature_"; + + PERL_ARGS_ASSERT_FEATURE_IS_ENABLED; + assert(namelen <= MAX_FEATURE_LEN); memcpy(&he_name[8], name, namelen); @@ -585,6 +596,8 @@ S_feature_is_enabled(pTHX_ const char *const name, STRLEN namelen) void Perl_deprecate(pTHX_ const char *const s) { + PERL_ARGS_ASSERT_DEPRECATE; + if (ckWARN(WARN_DEPRECATED)) Perl_warner(aTHX_ packWARN(WARN_DEPRECATED), "Use of %s is deprecated", s); } @@ -600,6 +613,8 @@ Perl_deprecate_old(pTHX_ const char *const s) /* live under the "syntax" category. It is now a top-level category */ /* in its own right. */ + PERL_ARGS_ASSERT_DEPRECATE_OLD; + if (ckWARN2(WARN_DEPRECATED, WARN_SYNTAX)) Perl_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX), "Use of %s is deprecated", s); @@ -616,6 +631,9 @@ strip_return(SV *sv) { register const char *s = SvPVX_const(sv); register const char * const e = s + SvCUR(sv); + + PERL_ARGS_ASSERT_STRIP_RETURN; + /* outer loop optimized to do nothing if there are no CR-LFs */ while (s < e) { if (*s++ == '\r' && *s == '\n') { @@ -735,6 +753,8 @@ Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, bool new_filter) void Perl_parser_free(pTHX_ const yy_parser *parser) { + PERL_ARGS_ASSERT_PARSER_FREE; + PL_curcop = parser->saved_curcop; SvREFCNT_dec(parser->linestr); @@ -784,6 +804,8 @@ S_incline(pTHX_ const char *s) const char *n; const char *e; + PERL_ARGS_ASSERT_INCLINE; + CopLINE_inc(PL_curcop); if (*s++ != '#') return; @@ -900,6 +922,8 @@ S_incline(pTHX_ const char *s) STATIC char * S_skipspace0(pTHX_ register char *s) { + PERL_ARGS_ASSERT_SKIPSPACE0; + s = skipspace(s); if (!PL_madskills) return s; @@ -922,6 +946,8 @@ S_skipspace1(pTHX_ register char *s) const char *start = s; I32 startoff = start - SvPVX(PL_linestr); + PERL_ARGS_ASSERT_SKIPSPACE1; + s = skipspace(s); if (!PL_madskills) return s; @@ -948,6 +974,8 @@ S_skipspace2(pTHX_ register char *s, SV **svp) const I32 bufptroff = PL_bufptr - SvPVX(PL_linestr); const I32 startoff = s - SvPVX(PL_linestr); + PERL_ARGS_ASSERT_SKIPSPACE2; + s = skipspace(s); PL_bufptr = SvPVX(PL_linestr) + bufptroff; if (!PL_madskills || !svp) @@ -1000,11 +1028,14 @@ S_skipspace(pTHX_ register char *s) int curoff; int startoff = s - SvPVX(PL_linestr); + PERL_ARGS_ASSERT_SKIPSPACE; + if (PL_skipwhite) { sv_free(PL_skipwhite); PL_skipwhite = 0; } #endif + PERL_ARGS_ASSERT_SKIPSPACE; if (PL_lex_formbrack && PL_lex_brackets <= PL_lex_formbrack) { while (s < PL_bufend && SPACE_OR_TAB(*s)) @@ -1217,6 +1248,9 @@ STATIC I32 S_lop(pTHX_ I32 f, int x, char *s) { dVAR; + + PERL_ARGS_ASSERT_LOP; + pl_yylval.ival = f; CLINE; PL_expect = x; @@ -1382,6 +1416,8 @@ S_force_word(pTHX_ register char *start, int token, int check_keyword, int allow register char *s; STRLEN len; + PERL_ARGS_ASSERT_FORCE_WORD; + start = SKIPSPACE1(start); s = start; if (isIDFIRST_lazy_if(s,UTF) || @@ -1426,6 +1462,9 @@ STATIC void S_force_ident(pTHX_ register const char *s, int kind) { dVAR; + + PERL_ARGS_ASSERT_FORCE_IDENT; + if (*s) { const STRLEN len = strlen(s); OP* const o = (OP*)newSVOP(OP_CONST, 0, newSVpvn(s, len)); @@ -1458,6 +1497,9 @@ Perl_str_to_version(pTHX_ SV *sv) const char *start = SvPV_const(sv,len); const char * const end = start + len; const bool utf = SvUTF8(sv) ? TRUE : FALSE; + + PERL_ARGS_ASSERT_STR_TO_VERSION; + while (start < end) { STRLEN skip; UV n; @@ -1492,6 +1534,8 @@ S_force_version(pTHX_ char *s, int guessing) I32 startoff = s - SvPVX(PL_linestr); #endif + PERL_ARGS_ASSERT_FORCE_VERSION; + s = SKIPSPACE1(s); d = s; @@ -1562,6 +1606,8 @@ S_tokeq(pTHX_ SV *sv) STRLEN len = 0; SV *pv = sv; + PERL_ARGS_ASSERT_TOKEQ; + if (!SvLEN(sv)) goto finish; @@ -1910,6 +1956,8 @@ S_scan_const(pTHX_ char *start) bool native_range = TRUE; /* turned to FALSE if the first endpoint is Unicode. */ #endif + PERL_ARGS_ASSERT_SCAN_CONST; + if (PL_lex_inwhat == OP_TRANS && PL_sublex_info.sub_op) { /* If we are doing a trans and we know we want UTF8 set expectation */ has_utf8 = PL_sublex_info.sub_op->op_private & (OPpTRANS_FROM_UTF|OPpTRANS_TO_UTF); @@ -2518,6 +2566,9 @@ STATIC int S_intuit_more(pTHX_ register char *s) { dVAR; + + PERL_ARGS_ASSERT_INTUIT_MORE; + if (PL_lex_brackets) return TRUE; if (*s == '-' && s[1] == '>' && (s[2] == '[' || s[2] == '{')) @@ -2683,6 +2734,8 @@ S_intuit_method(pTHX_ char *start, GV *gv, CV *cv) int soff; #endif + PERL_ARGS_ASSERT_INTUIT_METHOD; + if (gv) { if (SvTYPE(gv) == SVt_PVGV && GvIO(gv)) return 0; @@ -2809,6 +2862,8 @@ Perl_filter_del(pTHX_ filter_t funcp) dVAR; SV *datasv; + PERL_ARGS_ASSERT_FILTER_DEL; + #ifdef DEBUGGING DEBUG_P(PerlIO_printf(Perl_debug_log, "filter_del func %p", FPTR2DPTR(void*, funcp))); @@ -2849,6 +2904,8 @@ Perl_filter_read(pTHX_ int idx, SV *buf_sv, int maxlen) #endif : maxlen; + PERL_ARGS_ASSERT_FILTER_READ; + if (!PL_parser || !PL_rsfp_filters) return -1; if (idx > AvFILLp(PL_rsfp_filters)) { /* Any more filters? */ @@ -2904,6 +2961,9 @@ STATIC char * S_filter_gets(pTHX_ register SV *sv, register PerlIO *fp, STRLEN append) { dVAR; + + PERL_ARGS_ASSERT_FILTER_GETS; + #ifdef PERL_CR_FILTER if (!PL_rsfp_filters) { filter_add(S_cr_textfilter,NULL); @@ -2927,6 +2987,8 @@ S_find_in_my_stash(pTHX_ const char *pkgname, STRLEN len) dVAR; GV *gv; + PERL_ARGS_ASSERT_FIND_IN_MY_STASH; + if (len == 11 && *pkgname == '_' && strEQ(pkgname, "__PACKAGE__")) return PL_curstash; @@ -3161,6 +3223,9 @@ Perl_madlex(pTHX) STATIC char * S_tokenize_use(pTHX_ int is_use, char *s) { dVAR; + + PERL_ARGS_ASSERT_TOKENIZE_USE; + if (PL_expect != XSTATE) yyerror(Perl_form(aTHX_ "\"%s\" not allowed in expression", is_use ? "use" : "no")); @@ -7058,6 +7123,9 @@ I32 Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) { dVAR; + + PERL_ARGS_ASSERT_KEYWORD; + switch (len) { case 1: /* 5 tokens of length 1 */ @@ -10446,6 +10514,8 @@ S_checkcomma(pTHX_ const char *s, const char *name, const char *what) { dVAR; + PERL_ARGS_ASSERT_CHECKCOMMA; + if (*s == ' ' && s[1] == '(') { /* XXX gotta be a better way */ if (ckWARN(WARN_SYNTAX)) { int level = 1; @@ -10508,6 +10578,8 @@ S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, STRLEN keylen, SV *cv, *typesv; const char *why1 = "", *why2 = "", *why3 = ""; + PERL_ARGS_ASSERT_NEW_CONSTANT; + if (!table || !(PL_hints & HINT_LOCALIZE_HH)) { SV *msg; @@ -10602,6 +10674,9 @@ S_scan_word(pTHX_ register char *s, char *dest, STRLEN destlen, int allow_packag dVAR; register char *d = dest; register char * const e = d + destlen - 3; /* two-character token, ending NUL */ + + PERL_ARGS_ASSERT_SCAN_WORD; + for (;;) { if (d >= e) Perl_croak(aTHX_ ident_too_long); @@ -10645,6 +10720,8 @@ S_scan_ident(pTHX_ register char *s, register const char *send, char *dest, STRL register char *d = dest; register char * const e = d + destlen + 3; /* two-character token, ending NUL */ + PERL_ARGS_ASSERT_SCAN_IDENT; + if (isSPACE(*s)) s = PEEKSPACE(s); if (isDIGIT(*s)) { @@ -10799,6 +10876,8 @@ S_scan_ident(pTHX_ register char *s, register const char *send, char *dest, STRL void Perl_pmflag(pTHX_ U32* pmfl, int ch) { + PERL_ARGS_ASSERT_PMFLAG; + PERL_UNUSED_CONTEXT; if (ch<256) { const char c = (char)ch; @@ -10824,6 +10903,7 @@ S_scan_pat(pTHX_ char *start, I32 type) char *modstart; #endif + PERL_ARGS_ASSERT_SCAN_PAT; if (!s) { const char * const delimiter = skipspace(start); @@ -10893,6 +10973,8 @@ S_scan_subst(pTHX_ char *start) char *modstart; #endif + PERL_ARGS_ASSERT_SCAN_SUBST; + pl_yylval.ival = OP_NULL; s = scan_str(start,!!PL_madskills,FALSE); @@ -10999,6 +11081,8 @@ S_scan_trans(pTHX_ char *start) char *modstart; #endif + PERL_ARGS_ASSERT_SCAN_TRANS; + pl_yylval.ival = OP_NULL; s = scan_str(start,!!PL_madskills,FALSE); @@ -11096,6 +11180,8 @@ S_scan_heredoc(pTHX_ register char *s) PL_realtokenstart = -1; #endif + PERL_ARGS_ASSERT_SCAN_HEREDOC; + s += 2; d = PL_tokenbuf; e = PL_tokenbuf + sizeof PL_tokenbuf - 1; @@ -11359,10 +11445,11 @@ S_scan_inputsymbol(pTHX_ char *start) register char *s = start; /* current position in buffer */ char *end; I32 len; - char *d = PL_tokenbuf; /* start of temp holding space */ const char * const e = PL_tokenbuf + sizeof PL_tokenbuf; /* end of temp holding space */ + PERL_ARGS_ASSERT_SCAN_INPUTSYMBOL; + end = strchr(s, '\n'); if (!end) end = PL_bufend; @@ -11559,6 +11646,8 @@ S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims) char *tstart; #endif + PERL_ARGS_ASSERT_SCAN_STR; + /* skip space before the delimiter */ if (isSPACE(*s)) { s = PEEKSPACE(s); @@ -11899,6 +11988,8 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp) const char *lastub = NULL; /* position of last underbar */ static char const number_too_long[] = "Number too long"; + PERL_ARGS_ASSERT_SCAN_NUM; + /* We use the first character to decide what type of number this is */ switch (*s) { @@ -12289,6 +12380,8 @@ S_scan_formline(pTHX_ register char *s) } #endif + PERL_ARGS_ASSERT_SCAN_FORMLINE; + while (!needargs) { if (*s == '.') { t = s+1; @@ -12433,6 +12526,9 @@ int Perl_yywarn(pTHX_ const char *const s) { dVAR; + + PERL_ARGS_ASSERT_YYWARN; + PL_in_eval |= EVAL_WARNONLY; yyerror(s); PL_in_eval &= ~EVAL_WARNONLY; @@ -12449,6 +12545,8 @@ Perl_yyerror(pTHX_ const char *const s) SV *msg; int yychar = PL_parser->yychar; + PERL_ARGS_ASSERT_YYERROR; + if (!yychar || (yychar == ';' && !PL_rsfp)) where = "at EOF"; else if (PL_oldoldbufptr && PL_bufptr > PL_oldoldbufptr && @@ -12547,6 +12645,9 @@ S_swallow_bom(pTHX_ U8 *s) { dVAR; const STRLEN slen = SvCUR(PL_linestr); + + PERL_ARGS_ASSERT_SWALLOW_BOM; + switch (s[0]) { case 0xFF: if (s[1] == 0xFE) { @@ -12725,6 +12826,9 @@ Perl_scan_vstring(pTHX_ const char *s, const char *const e, SV *sv) dVAR; const char *pos = s; const char *start = s; + + PERL_ARGS_ASSERT_SCAN_VSTRING; + if (*pos == 'v') pos++; /* get past 'v' */ while (pos < e && (isDIGIT(*pos) || *pos == '_')) pos++; diff --git a/universal.c b/universal.c index ce73c82..d03596c 100644 --- a/universal.c +++ b/universal.c @@ -45,6 +45,8 @@ S_isa_lookup(pTHX_ HV *stash, const char * const name, const HV* const name_stas const char *hvname; I32 items; + PERL_ARGS_ASSERT_ISA_LOOKUP; + /* A stash/class can go by many names (ie. User == main::User), so we compare the stash itself just in case */ if (name_stash && ((const HV *)stash == name_stash)) @@ -96,6 +98,8 @@ Perl_sv_derived_from(pTHX_ SV *sv, const char *const name) dVAR; HV *stash; + PERL_ARGS_ASSERT_SV_DERIVED_FROM; + SvGETMAGIC(sv); if (SvROK(sv)) { @@ -136,8 +140,10 @@ Perl_sv_does(pTHX_ SV *sv, const char *const name) const char *classname; bool does_it; SV *methodname; - dSP; + + PERL_ARGS_ASSERT_SV_DOES; + ENTER; SAVETMPS; diff --git a/utf8.c b/utf8.c index 440ee76..3b5d5d4 100644 --- a/utf8.c +++ b/utf8.c @@ -71,6 +71,8 @@ is the recommended Unicode-aware way of saying U8 * Perl_uvuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags) { + PERL_ARGS_ASSERT_UVUNI_TO_UTF8_FLAGS; + if (ckWARN(WARN_UTF8)) { if (UNICODE_IS_SURROGATE(uv) && !(flags & UNICODE_ALLOW_SURROGATE)) @@ -199,6 +201,8 @@ S_is_utf8_char_slow(const U8 *s, const STRLEN len) STRLEN slen; UV uv, ouv; + PERL_ARGS_ASSERT_IS_UTF8_CHAR_SLOW; + if (UTF8_IS_INVARIANT(u)) return 1; @@ -245,6 +249,8 @@ STRLEN Perl_is_utf8_char(pTHX_ const U8 *s) { const STRLEN len = UTF8SKIP(s); + + PERL_ARGS_ASSERT_IS_UTF8_CHAR; PERL_UNUSED_CONTEXT; #ifdef IS_UTF8_CHAR if (IS_UTF8_CHAR_FAST(len)) @@ -272,6 +278,7 @@ Perl_is_utf8_string(pTHX_ const U8 *s, STRLEN len) const U8* const send = s + (len ? len : strlen((const char *)s)); const U8* x = s; + PERL_ARGS_ASSERT_IS_UTF8_STRING; PERL_UNUSED_CONTEXT; while (x < send) { @@ -337,6 +344,8 @@ Perl_is_utf8_string_loclen(pTHX_ const U8 *s, STRLEN len, const U8 **ep, STRLEN const U8* x = s; STRLEN c; STRLEN outlen = 0; + + PERL_ARGS_ASSERT_IS_UTF8_STRING_LOCLEN; PERL_UNUSED_CONTEXT; while (x < send) { @@ -410,6 +419,8 @@ Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) STRLEN expectlen = 0; U32 warning = 0; + PERL_ARGS_ASSERT_UTF8N_TO_UVUNI; + /* This list is a superset of the UTF8_ALLOW_XXX. */ #define UTF8_WARN_EMPTY 1 @@ -617,6 +628,8 @@ returned and retlen is set, if possible, to -1. UV Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen) { + PERL_ARGS_ASSERT_UTF8_TO_UVCHR; + return utf8n_to_uvchr(s, UTF8_MAXBYTES, retlen, ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANY); } @@ -640,6 +653,8 @@ returned and retlen is set, if possible, to -1. UV Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen) { + PERL_ARGS_ASSERT_UTF8_TO_UVUNI; + /* Call the low level routine asking for checks */ return Perl_utf8n_to_uvuni(aTHX_ s, UTF8_MAXBYTES, retlen, ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANY); @@ -662,6 +677,8 @@ Perl_utf8_length(pTHX_ const U8 *s, const U8 *e) STRLEN len = 0; U8 t = 0; + PERL_ARGS_ASSERT_UTF8_LENGTH; + /* Note: cannot use UTF8_IS_...() too eagerly here since e.g. * the bitops (especially ~) can create illegal UTF-8. * In other words: in Perl UTF-8 is not just for Unicode. */ @@ -703,6 +720,8 @@ same UTF-8 buffer. IV Perl_utf8_distance(pTHX_ const U8 *a, const U8 *b) { + PERL_ARGS_ASSERT_UTF8_DISTANCE; + return (a < b) ? -1 * (IV) utf8_length(a, b) : (IV) utf8_length(b, a); } @@ -722,6 +741,8 @@ on the first byte of character or just after the last byte of a character. U8 * Perl_utf8_hop(pTHX_ const U8 *s, I32 off) { + PERL_ARGS_ASSERT_UTF8_HOP; + PERL_UNUSED_CONTEXT; /* Note: cannot use UTF8_IS_...() too eagerly here since e.g * the bitops (especially ~) can create illegal UTF-8. @@ -761,6 +782,8 @@ Perl_utf8_to_bytes(pTHX_ U8 *s, STRLEN *len) U8 * const send = s + *len; U8 *d; + PERL_ARGS_ASSERT_UTF8_TO_BYTES; + /* ensure valid UTF-8 and chars < 256 before updating string */ while (s < send) { U8 c = *s++; @@ -805,6 +828,8 @@ Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *len, bool *is_utf8) const U8 *send; I32 count = 0; + PERL_ARGS_ASSERT_BYTES_FROM_UTF8; + PERL_UNUSED_CONTEXT; if (!*is_utf8) return (U8 *)start; @@ -858,6 +883,8 @@ Perl_bytes_to_utf8(pTHX_ const U8 *s, STRLEN *len) const U8 * const send = s + (*len); U8 *d; U8 *dst; + + PERL_ARGS_ASSERT_BYTES_TO_UTF8; PERL_UNUSED_CONTEXT; Newx(d, (*len) * 2 + 1, U8); @@ -889,6 +916,8 @@ Perl_utf16_to_utf8(pTHX_ U8* p, U8* d, I32 bytelen, I32 *newlen) U8* pend; U8* dstart = d; + PERL_ARGS_ASSERT_UTF16_TO_UTF8; + if (bytelen == 1 && p[0] == 0) { /* Be understanding. */ d[0] = 0; *newlen = 1; @@ -948,6 +977,9 @@ Perl_utf16_to_utf8_reversed(pTHX_ U8* p, U8* d, I32 bytelen, I32 *newlen) { U8* s = (U8*)p; U8* const send = s + bytelen; + + PERL_ARGS_ASSERT_UTF16_TO_UTF8_REVERSED; + while (s < send) { const U8 tmp = s[0]; s[0] = s[1]; @@ -1074,6 +1106,8 @@ Perl_is_uni_xdigit(pTHX_ UV c) UV Perl_to_uni_upper(pTHX_ UV c, U8* p, STRLEN *lenp) { + PERL_ARGS_ASSERT_TO_UNI_UPPER; + uvchr_to_utf8(p, c); return to_utf8_upper(p, p, lenp); } @@ -1081,6 +1115,8 @@ Perl_to_uni_upper(pTHX_ UV c, U8* p, STRLEN *lenp) UV Perl_to_uni_title(pTHX_ UV c, U8* p, STRLEN *lenp) { + PERL_ARGS_ASSERT_TO_UNI_TITLE; + uvchr_to_utf8(p, c); return to_utf8_title(p, p, lenp); } @@ -1088,6 +1124,8 @@ Perl_to_uni_title(pTHX_ UV c, U8* p, STRLEN *lenp) UV Perl_to_uni_lower(pTHX_ UV c, U8* p, STRLEN *lenp) { + PERL_ARGS_ASSERT_TO_UNI_LOWER; + uvchr_to_utf8(p, c); return to_utf8_lower(p, p, lenp); } @@ -1095,6 +1133,8 @@ Perl_to_uni_lower(pTHX_ UV c, U8* p, STRLEN *lenp) UV Perl_to_uni_fold(pTHX_ UV c, U8* p, STRLEN *lenp) { + PERL_ARGS_ASSERT_TO_UNI_FOLD; + uvchr_to_utf8(p, c); return to_utf8_fold(p, p, lenp); } @@ -1220,6 +1260,9 @@ S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char *const swashname) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_COMMON; + if (!is_utf8_char(p)) return FALSE; if (!*swash) @@ -1231,6 +1274,9 @@ bool Perl_is_utf8_alnum(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_ALNUM; + /* NOTE: "IsWord", not "IsAlnum", since Alnum is a true * descendant of isalnum(3), in other words, it doesn't * contain the '_'. --jhi */ @@ -1241,6 +1287,9 @@ bool Perl_is_utf8_alnumc(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_ALNUMC; + return is_utf8_common(p, &PL_utf8_alnumc, "IsAlnumC"); } @@ -1248,6 +1297,9 @@ bool Perl_is_utf8_idfirst(pTHX_ const U8 *p) /* The naming is historical. */ { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_IDFIRST; + if (*p == '_') return TRUE; /* is_utf8_idstart would be more logical. */ @@ -1258,6 +1310,9 @@ bool Perl_is_utf8_idcont(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_IDCONT; + if (*p == '_') return TRUE; return is_utf8_common(p, &PL_utf8_idcont, "IdContinue"); @@ -1267,6 +1322,9 @@ bool Perl_is_utf8_alpha(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_ALPHA; + return is_utf8_common(p, &PL_utf8_alpha, "IsAlpha"); } @@ -1274,6 +1332,9 @@ bool Perl_is_utf8_ascii(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_ASCII; + return is_utf8_common(p, &PL_utf8_ascii, "IsAscii"); } @@ -1281,6 +1342,9 @@ bool Perl_is_utf8_space(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_SPACE; + return is_utf8_common(p, &PL_utf8_space, "IsSpacePerl"); } @@ -1288,6 +1352,9 @@ bool Perl_is_utf8_digit(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_DIGIT; + return is_utf8_common(p, &PL_utf8_digit, "IsDigit"); } @@ -1295,6 +1362,9 @@ bool Perl_is_utf8_upper(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_UPPER; + return is_utf8_common(p, &PL_utf8_upper, "IsUppercase"); } @@ -1302,6 +1372,9 @@ bool Perl_is_utf8_lower(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_LOWER; + return is_utf8_common(p, &PL_utf8_lower, "IsLowercase"); } @@ -1309,6 +1382,9 @@ bool Perl_is_utf8_cntrl(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_CNTRL; + return is_utf8_common(p, &PL_utf8_cntrl, "IsCntrl"); } @@ -1316,6 +1392,9 @@ bool Perl_is_utf8_graph(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_GRAPH; + return is_utf8_common(p, &PL_utf8_graph, "IsGraph"); } @@ -1323,6 +1402,9 @@ bool Perl_is_utf8_print(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_PRINT; + return is_utf8_common(p, &PL_utf8_print, "IsPrint"); } @@ -1330,6 +1412,9 @@ bool Perl_is_utf8_punct(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_PUNCT; + return is_utf8_common(p, &PL_utf8_punct, "IsPunct"); } @@ -1337,6 +1422,9 @@ bool Perl_is_utf8_xdigit(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_XDIGIT; + return is_utf8_common(p, &PL_utf8_xdigit, "Isxdigit"); } @@ -1344,6 +1432,9 @@ bool Perl_is_utf8_mark(pTHX_ const U8 *p) { dVAR; + + PERL_ARGS_ASSERT_IS_UTF8_MARK; + return is_utf8_common(p, &PL_utf8_mark, "IsM"); } @@ -1379,12 +1470,14 @@ Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, dVAR; U8 tmpbuf[UTF8_MAXBYTES_CASE+1]; STRLEN len = 0; - const UV uv0 = utf8_to_uvchr(p, NULL); /* The NATIVE_TO_UNI() and UNI_TO_NATIVE() mappings * are necessary in EBCDIC, they are redundant no-ops * in ASCII-ish platforms, and hopefully optimized away. */ const UV uv1 = NATIVE_TO_UNI(uv0); + + PERL_ARGS_ASSERT_TO_UTF8_CASE; + uvuni_to_utf8(tmpbuf, uv1); if (!*swashp) /* load on-demand */ @@ -1477,6 +1570,9 @@ UV Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) { dVAR; + + PERL_ARGS_ASSERT_TO_UTF8_UPPER; + return Perl_to_utf8_case(aTHX_ p, ustrp, lenp, &PL_utf8_toupper, "ToUpper", "utf8::ToSpecUpper"); } @@ -1498,6 +1594,9 @@ UV Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) { dVAR; + + PERL_ARGS_ASSERT_TO_UTF8_TITLE; + return Perl_to_utf8_case(aTHX_ p, ustrp, lenp, &PL_utf8_totitle, "ToTitle", "utf8::ToSpecTitle"); } @@ -1519,6 +1618,9 @@ UV Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) { dVAR; + + PERL_ARGS_ASSERT_TO_UTF8_LOWER; + return Perl_to_utf8_case(aTHX_ p, ustrp, lenp, &PL_utf8_tolower, "ToLower", "utf8::ToSpecLower"); } @@ -1541,6 +1643,9 @@ UV Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) { dVAR; + + PERL_ARGS_ASSERT_TO_UTF8_FOLD; + return Perl_to_utf8_case(aTHX_ p, ustrp, lenp, &PL_utf8_tofold, "ToFold", "utf8::ToSpecFold"); } @@ -1562,6 +1667,8 @@ Perl_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits HV * const stash = gv_stashpvn(pkg, pkg_len, 0); SV* errsv_save; + PERL_ARGS_ASSERT_SWASH_INIT; + PUSHSTACKi(PERLSI_MAGIC); ENTER; SAVEI32(PL_hints); @@ -1644,6 +1751,8 @@ Perl_swash_fetch(pTHX_ SV *swash, const U8 *ptr, bool do_utf8) U8 tmputf8[2]; const UV c = NATIVE_TO_ASCII(*ptr); + PERL_ARGS_ASSERT_SWASH_FETCH; + if (!do_utf8 && !UNI_IS_INVARIANT(c)) { tmputf8[0] = (U8)UTF8_EIGHT_BIT_HI(c); tmputf8[1] = (U8)UTF8_EIGHT_BIT_LO(c); @@ -1754,7 +1863,6 @@ S_swash_get(pTHX_ SV* swash, UV start, UV span) SV *swatch; U8 *l, *lend, *x, *xend, *s; STRLEN lcur, xcur, scur; - HV* const hv = (HV*)SvRV(swash); SV** const listsvp = hv_fetchs(hv, "LIST", FALSE); SV** const typesvp = hv_fetchs(hv, "TYPE", FALSE); @@ -1768,6 +1876,8 @@ S_swash_get(pTHX_ SV* swash, UV start, UV span) const UV none = SvUV(*nonesvp); const UV end = start + span; + PERL_ARGS_ASSERT_SWASH_GET; + if (bits != 1 && bits != 8 && bits != 16 && bits != 32) { Perl_croak(aTHX_ "panic: swash_get doesn't expect bits %"UVuf, (UV)bits); @@ -2079,12 +2189,16 @@ is the recommended wide native character-aware way of saying U8 * Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv) { + PERL_ARGS_ASSERT_UVCHR_TO_UTF8; + return Perl_uvuni_to_utf8_flags(aTHX_ d, NATIVE_TO_UNI(uv), 0); } U8 * Perl_uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags) { + PERL_ARGS_ASSERT_UVCHR_TO_UTF8_FLAGS; + return Perl_uvuni_to_utf8_flags(aTHX_ d, NATIVE_TO_UNI(uv), flags); } @@ -2109,6 +2223,9 @@ Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) { const UV uv = Perl_utf8n_to_uvuni(aTHX_ s, curlen, retlen, flags); + + PERL_ARGS_ASSERT_UTF8N_TO_UVCHR; + return UNI_TO_NATIVE(uv); } @@ -2135,6 +2252,8 @@ Perl_pv_uni_display(pTHX_ SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV f int truncated = 0; const char *s, *e; + PERL_ARGS_ASSERT_PV_UNI_DISPLAY; + sv_setpvn(dsv, "", 0); SvUTF8_off(dsv); for (s = (const char *)spv, e = s + len; s < e; s += UTF8SKIP(s)) { @@ -2204,6 +2323,8 @@ The pointer to the PV of the dsv is returned. char * Perl_sv_uni_display(pTHX_ SV *dsv, SV *ssv, STRLEN pvlim, UV flags) { + PERL_ARGS_ASSERT_SV_UNI_DISPLAY; + return Perl_pv_uni_display(aTHX_ dsv, (const U8*)SvPVX_const(ssv), SvCUR(ssv), pvlim, flags); } @@ -2251,6 +2372,8 @@ Perl_ibcmp_utf8(pTHX_ const char *s1, char **pe1, register UV l1, bool u1, const U8 natbuf[1+1]; STRLEN foldlen1, foldlen2; bool match; + + PERL_ARGS_ASSERT_IBCMP_UTF8; if (pe1) e1 = *(U8**)pe1; diff --git a/util.c b/util.c index c2604e4..b7e1cce 100644 --- a/util.c +++ b/util.c @@ -362,6 +362,8 @@ Perl_delimcpy(pTHX_ register char *to, register const char *toend, register cons register I32 tolen; PERL_UNUSED_CONTEXT; + PERL_ARGS_ASSERT_DELIMCPY; + for (tolen = 0; from < fromend; from++, tolen++) { if (*from == '\\') { if (from[1] != delim) { @@ -391,6 +393,8 @@ Perl_instr(pTHX_ register const char *big, register const char *little) register I32 first; PERL_UNUSED_CONTEXT; + PERL_ARGS_ASSERT_INSTR; + if (!little) return (char*)big; first = *little++; @@ -421,6 +425,7 @@ Perl_instr(pTHX_ register const char *big, register const char *little) char * Perl_ninstr(pTHX_ const char *big, const char *bigend, const char *little, const char *lend) { + PERL_ARGS_ASSERT_NINSTR; PERL_UNUSED_CONTEXT; if (little >= lend) return (char*)big; @@ -452,6 +457,8 @@ Perl_rninstr(pTHX_ register const char *big, const char *bigend, const char *lit register const char * const littleend = lend; PERL_UNUSED_CONTEXT; + PERL_ARGS_ASSERT_RNINSTR; + if (little >= littleend) return (char*)bigend; bigbeg = big; @@ -501,6 +508,8 @@ Perl_fbm_compile(pTHX_ SV *sv, U32 flags) U32 rarest = 0; U32 frequency = 256; + PERL_ARGS_ASSERT_FBM_COMPILE; + if (flags & FBMcf_TAIL) { MAGIC * const mg = SvUTF8(sv) && SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_utf8) : NULL; sv_catpvs(sv, "\n"); /* Taken into account in fbm_instr() */ @@ -578,6 +587,8 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit register STRLEN littlelen = l; register const I32 multiline = flags & FBMrf_MULTILINE; + PERL_ARGS_ASSERT_FBM_INSTR; + if ((STRLEN)(bigend - big) < littlelen) { if ( SvTAIL(littlestr) && ((STRLEN)(bigend - big) == littlelen - 1) @@ -781,6 +792,8 @@ Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift register const unsigned char *littleend; I32 found = 0; + PERL_ARGS_ASSERT_SCREAMINSTR; + assert(SvTYPE(littlestr) == SVt_PVGV); assert(SvVALID(littlestr)); @@ -864,6 +877,8 @@ Perl_ibcmp(pTHX_ const char *s1, const char *s2, register I32 len) register const U8 *b = (const U8 *)s2; PERL_UNUSED_CONTEXT; + PERL_ARGS_ASSERT_IBCMP; + while (len--) { if (*a != *b && *a != PL_fold[*b]) return 1; @@ -880,6 +895,8 @@ Perl_ibcmp_locale(pTHX_ const char *s1, const char *s2, register I32 len) register const U8 *b = (const U8 *)s2; PERL_UNUSED_CONTEXT; + PERL_ARGS_ASSERT_IBCMP_LOCALE; + while (len--) { if (*a != *b && *a != PL_fold_locale[*b]) return 1; @@ -985,7 +1002,9 @@ char * Perl_savesharedpvn(pTHX_ const char *const pv, const STRLEN len) { char *const newaddr = (char*)PerlMemShared_malloc(len + 1); - assert(pv); + + PERL_ARGS_ASSERT_SAVESHAREDPVN; + if (!newaddr) { return write_no_mem(); } @@ -1009,6 +1028,8 @@ Perl_savesvpv(pTHX_ SV *sv) const char * const pv = SvPV_const(sv, len); register char *newaddr; + PERL_ARGS_ASSERT_SAVESVPV; + ++len; Newx(newaddr,len,char); return (char *) CopyD(pv,newaddr,len,char); @@ -1048,6 +1069,7 @@ Perl_form_nocontext(const char* pat, ...) dTHX; char *retval; va_list args; + PERL_ARGS_ASSERT_FORM_NOCONTEXT; va_start(args, pat); retval = vform(pat, &args); va_end(args); @@ -1080,6 +1102,7 @@ Perl_form(pTHX_ const char* pat, ...) { char *retval; va_list args; + PERL_ARGS_ASSERT_FORM; va_start(args, pat); retval = vform(pat, &args); va_end(args); @@ -1090,6 +1113,7 @@ char * Perl_vform(pTHX_ const char *pat, va_list *args) { SV * const sv = mess_alloc(); + PERL_ARGS_ASSERT_VFORM; sv_vsetpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL); return SvPVX(sv); } @@ -1101,6 +1125,7 @@ Perl_mess_nocontext(const char *pat, ...) dTHX; SV *retval; va_list args; + PERL_ARGS_ASSERT_MESS_NOCONTEXT; va_start(args, pat); retval = vmess(pat, &args); va_end(args); @@ -1113,6 +1138,7 @@ Perl_mess(pTHX_ const char *pat, ...) { SV *retval; va_list args; + PERL_ARGS_ASSERT_MESS; va_start(args, pat); retval = vmess(pat, &args); va_end(args); @@ -1125,6 +1151,8 @@ S_closest_cop(pTHX_ const COP *cop, const OP *o) dVAR; /* Look for PL_op starting from o. cop is the last COP we've seen. */ + PERL_ARGS_ASSERT_CLOSEST_COP; + if (!o || o == PL_op) return cop; @@ -1158,6 +1186,8 @@ Perl_vmess(pTHX_ const char *pat, va_list *args) dVAR; SV * const sv = mess_alloc(); + PERL_ARGS_ASSERT_VMESS; + sv_vsetpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL); if (!SvCUR(sv) || *(SvEND(sv) - 1) != '\n') { /* @@ -1199,6 +1229,8 @@ Perl_write_to_stderr(pTHX_ const char* message, int msglen) IO *io; MAGIC *mg; + PERL_ARGS_ASSERT_WRITE_TO_STDERR; + if (PL_stderrgv && SvREFCNT(PL_stderrgv) && (io = GvIO(PL_stderrgv)) && (mg = SvTIED_mg((SV*)io, PERL_MAGIC_tiedscalar))) @@ -1353,6 +1385,7 @@ Perl_die_nocontext(const char* pat, ...) dTHX; OP *o; va_list args; + PERL_ARGS_ASSERT_DIE_NOCONTEXT; va_start(args, pat); o = vdie(pat, &args); va_end(args); @@ -1399,6 +1432,7 @@ Perl_croak_nocontext(const char *pat, ...) { dTHX; va_list args; + PERL_ARGS_ASSERT_CROAK_NOCONTEXT; va_start(args, pat); vcroak(pat, &args); /* NOTREACHED */ @@ -1445,6 +1479,8 @@ Perl_vwarn(pTHX_ const char* pat, va_list *args) const I32 utf8 = SvUTF8(msv); const char * const message = SvPV_const(msv, msglen); + PERL_ARGS_ASSERT_VWARN; + if (PL_warnhook) { if (vdie_common(message, msglen, utf8, TRUE)) return; @@ -1459,6 +1495,7 @@ Perl_warn_nocontext(const char *pat, ...) { dTHX; va_list args; + PERL_ARGS_ASSERT_WARN_NOCONTEXT; va_start(args, pat); vwarn(pat, &args); va_end(args); @@ -1478,6 +1515,7 @@ void Perl_warn(pTHX_ const char *pat, ...) { va_list args; + PERL_ARGS_ASSERT_WARN; va_start(args, pat); vwarn(pat, &args); va_end(args); @@ -1489,6 +1527,7 @@ Perl_warner_nocontext(U32 err, const char *pat, ...) { dTHX; va_list args; + PERL_ARGS_ASSERT_WARNER_NOCONTEXT; va_start(args, pat); vwarner(err, pat, &args); va_end(args); @@ -1499,6 +1538,7 @@ void Perl_warner(pTHX_ U32 err, const char* pat,...) { va_list args; + PERL_ARGS_ASSERT_WARNER; va_start(args, pat); vwarner(err, pat, &args); va_end(args); @@ -1508,6 +1548,7 @@ void Perl_vwarner(pTHX_ U32 err, const char* pat, va_list* args) { dVAR; + PERL_ARGS_ASSERT_VWARNER; if (PL_warnhook == PERL_WARNHOOK_FATAL || ckDEAD(err)) { SV * const msv = vmess(pat, args); STRLEN msglen; @@ -1589,6 +1630,7 @@ Perl_new_warnings_bitfield(pTHX_ STRLEN *buffer, const char *const bits, STRLEN size) { const MEM_SIZE len_wanted = sizeof(STRLEN) + size; PERL_UNUSED_CONTEXT; + PERL_ARGS_ASSERT_NEW_WARNINGS_BITFIELD; buffer = (STRLEN*) (specialWARN(buffer) ? @@ -1736,6 +1778,8 @@ Perl_setenv_getix(pTHX_ const char *nam) { register I32 i; register const I32 len = strlen(nam); + + PERL_ARGS_ASSERT_SETENV_GETIX; PERL_UNUSED_CONTEXT; for (i = 0; environ[i]; i++) { @@ -1760,6 +1804,8 @@ Perl_unlnk(pTHX_ const char *f) /* unlink all versions of a file */ { I32 retries = 0; + PERL_ARGS_ASSERT_UNLNK; + while (PerlLIO_unlink(f) >= 0) retries++; return retries ? 0 : -1; @@ -1773,6 +1819,8 @@ Perl_my_bcopy(register const char *from,register char *to,register I32 len) { char * const retval = to; + PERL_ARGS_ASSERT_MY_BCOPY; + if (from - to >= 0) { while (len--) *to++ = *from++; @@ -1794,6 +1842,8 @@ Perl_my_memset(register char *loc, register I32 ch, register I32 len) { char * const retval = loc; + PERL_ARGS_ASSERT_MY_MEMSET; + while (len--) *loc++ = ch; return retval; @@ -1807,6 +1857,8 @@ Perl_my_bzero(register char *loc, register I32 len) { char * const retval = loc; + PERL_ARGS_ASSERT_MY_BZERO; + while (len--) *loc++ = 0; return retval; @@ -1822,6 +1874,8 @@ Perl_my_memcmp(const char *s1, const char *s2, register I32 len) register const U8 *b = (const U8 *)s2; register I32 tmp; + PERL_ARGS_ASSERT_MY_MEMCMP; + while (len--) { if ((tmp = *a++ - *b++)) return tmp; @@ -2205,6 +2259,8 @@ Perl_my_swabn(void *ptr, int n) register char *e = s + (n-1); register char tc; + PERL_ARGS_ASSERT_MY_SWABN; + for (n /= 2; n > 0; s++, e--, n--) { tc = *s; *s = *e; @@ -2224,6 +2280,8 @@ Perl_my_popen_list(pTHX_ const char *mode, int n, SV **args) I32 did_pipes = 0; int pp[2]; + PERL_ARGS_ASSERT_MY_POPEN_LIST; + PERL_FLUSHALL_FOR_CHILD; This = (*mode == 'w'); that = !This; @@ -2364,6 +2422,8 @@ Perl_my_popen(pTHX_ const char *cmd, const char *mode) I32 did_pipes = 0; int pp[2]; + PERL_ARGS_ASSERT_MY_POPEN; + PERL_FLUSHALL_FOR_CHILD; #ifdef OS2 if (doexec) { @@ -2512,6 +2572,7 @@ FILE *popen(); PerlIO * Perl_my_popen(pTHX_ const char *cmd, const char *mode) { + PERL_ARGS_ASSERT_MY_POPEN; PERL_FLUSHALL_FOR_CHILD; /* Call system's popen() to get a FILE *, then import it. used 0 for 2nd parameter to PerlIO_importFILE; @@ -2602,6 +2663,8 @@ Perl_dump_fds(pTHX_ const char *const s) int fd; Stat_t tmpstatbuf; + PERL_ARGS_ASSERT_DUMP_FDS; + PerlIO_printf(Perl_debug_log,"%s", s); for (fd = 0; fd < 32; fd++) { if (PerlLIO_fstat(fd,&tmpstatbuf) >= 0) @@ -2701,6 +2764,8 @@ Perl_rsignal_save(pTHX_ int signo, Sighandler_t handler, Sigsave_t *save) dVAR; struct sigaction act; + PERL_ARGS_ASSERT_RSIGNAL_SAVE; + #ifdef USE_ITHREADS /* only "parent" interpreter can diddle signals */ if (PL_curinterp != aTHX) @@ -2873,6 +2938,7 @@ Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags) { dVAR; I32 result = 0; + PERL_ARGS_ASSERT_WAIT4PID; if (!pid) return -1; #ifdef PERL_USES_PL_PIDSTATUS @@ -3003,6 +3069,8 @@ Perl_repeatcpy(pTHX_ register char *to, register const char *from, I32 len, regi register const char * const frombase = from; PERL_UNUSED_CONTEXT; + PERL_ARGS_ASSERT_REPEATCPY; + if (len == 1) { register const char c = *from; while (count-- > 0) @@ -3027,6 +3095,8 @@ Perl_same_dirent(pTHX_ const char *a, const char *b) Stat_t tmpstatbuf2; SV * const tmpsv = sv_newmortal(); + PERL_ARGS_ASSERT_SAME_DIRENT; + if (fa) fa++; else @@ -3089,6 +3159,8 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch, # define MAX_EXT_LEN 0 #endif + PERL_ARGS_ASSERT_FIND_SCRIPT; + /* * If dosearch is true and if scriptname does not contain path * delimiters, search the PATH for scriptname. @@ -3317,6 +3389,7 @@ void Perl_set_context(void *t) { dVAR; + PERL_ARGS_ASSERT_SET_CONTEXT; #if defined(USE_ITHREADS) # ifdef I_MACH_CTHREADS cthread_set_data(cthread_self(), t); @@ -3381,6 +3454,7 @@ Perl_getenv_len(pTHX_ const char *env_elem, unsigned long *len) { char * const env_trans = PerlEnv_getenv(env_elem); PERL_UNUSED_CONTEXT; + PERL_ARGS_ASSERT_GETENV_LEN; if (env_trans) *len = strlen(env_trans); return env_trans; @@ -3678,11 +3752,13 @@ Perl_init_tm(pTHX_ struct tm *ptm) /* see mktime, strftime and asctime */ #ifdef HAS_TM_TM_ZONE Time_t now; const struct tm* my_tm; + PERL_ARGS_ASSERT_INIT_TM; (void)time(&now); my_tm = localtime(&now); if (my_tm) Copy(my_tm, ptm, 1, struct tm); #else + PERL_ARGS_ASSERT_INIT_TM; PERL_UNUSED_ARG(ptm); #endif } @@ -3700,6 +3776,8 @@ Perl_mini_mktime(pTHX_ struct tm *ptm) int odd_cent, odd_year; PERL_UNUSED_CONTEXT; + PERL_ARGS_ASSERT_MINI_MKTIME; + #define DAYS_PER_YEAR 365 #define DAYS_PER_QYEAR (4*DAYS_PER_YEAR+1) #define DAYS_PER_CENT (25*DAYS_PER_QYEAR-1) @@ -3894,6 +3972,8 @@ Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour, int mday, in struct tm mytm; int len; + PERL_ARGS_ASSERT_MY_STRFTIME; + init_tm(&mytm); /* XXX workaround - see init_tm() above */ mytm.tm_sec = sec; mytm.tm_min = min; @@ -4001,6 +4081,8 @@ Perl_getcwd_sv(pTHX_ register SV *sv) SvTAINTED_on(sv); #endif + PERL_ARGS_ASSERT_GETCWD_SV; + #ifdef HAS_GETCWD { char buf[MAXPATHLEN]; @@ -4173,6 +4255,9 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv) bool vinf = FALSE; AV * const av = newAV(); SV * const hv = newSVrv(rv, "version"); /* create an SV and upgrade the RV */ + + PERL_ARGS_ASSERT_SCAN_VERSION; + (void)sv_upgrade(hv, SVt_PVHV); /* needs to be an HV type */ while (isSPACE(*s)) /* leading whitespace is OK */ @@ -4373,6 +4458,7 @@ Perl_new_version(pTHX_ SV *ver) { dVAR; SV * const rv = newSV(0); + PERL_ARGS_ASSERT_NEW_VERSION; if ( sv_derived_from(ver,"version") ) /* can just copy directly */ { I32 key; @@ -4458,6 +4544,8 @@ Perl_upg_version(pTHX_ SV *ver, bool qv) const MAGIC *mg; #endif + PERL_ARGS_ASSERT_UPG_VERSION; + if ( SvNOK(ver) && !( SvPOK(ver) && sv_len(ver) == 3 ) ) { /* may get too much accuracy */ @@ -4550,6 +4638,9 @@ bool Perl_vverify(pTHX_ SV *vs) { SV *sv; + + PERL_ARGS_ASSERT_VVERIFY; + if ( SvROK(vs) ) vs = SvRV(vs); @@ -4585,6 +4676,9 @@ Perl_vnumify(pTHX_ SV *vs) bool alpha = FALSE; SV * const sv = newSV(0); AV *av; + + PERL_ARGS_ASSERT_VNUMIFY; + if ( SvROK(vs) ) vs = SvRV(vs); @@ -4663,6 +4757,9 @@ Perl_vnormal(pTHX_ SV *vs) bool alpha = FALSE; SV * const sv = newSV(0); AV *av; + + PERL_ARGS_ASSERT_VNORMAL; + if ( SvROK(vs) ) vs = SvRV(vs); @@ -4718,6 +4815,9 @@ SV * Perl_vstringify(pTHX_ SV *vs) { SV *pv; + + PERL_ARGS_ASSERT_VSTRINGIFY; + if ( SvROK(vs) ) vs = SvRV(vs); @@ -4749,6 +4849,9 @@ Perl_vcmp(pTHX_ SV *lhv, SV *rhv) I32 left = 0; I32 right = 0; AV *lav, *rav; + + PERL_ARGS_ASSERT_VCMP; + if ( SvROK(lhv) ) lhv = SvRV(lhv); if ( SvROK(rhv) ) @@ -5130,6 +5233,8 @@ Perl_parse_unicode_opts(pTHX_ const char **popt) const char *p = *popt; U32 opt = 0; + PERL_ARGS_ASSERT_PARSE_UNICODE_OPTS; + if (*p) { if (isDIGIT(*p)) { opt = (U32) atoi(p); @@ -5309,6 +5414,7 @@ Perl_stashpv_hvname_match(pTHX_ const COP *c, const HV *hv) const char * const stashpv = CopSTASHPV(c); const char * const name = HvNAME_get(hv); PERL_UNUSED_CONTEXT; + PERL_ARGS_ASSERT_STASHPV_HVNAME_MATCH; if (stashpv == name) return TRUE; @@ -5385,6 +5491,7 @@ Perl_init_global_struct(pTHX) void Perl_free_global_struct(pTHX_ struct perl_vars *plvarsp) { + PERL_ARGS_ASSERT_FREE_GLOBAL_STRUCT; # ifdef PERL_GLOBAL_STRUCT # ifdef PERL_UNSET_VARS PERL_UNSET_VARS(plvarsp); @@ -5583,6 +5690,7 @@ int Perl_my_sprintf(char *buffer, const char* pat, ...) { va_list args; + PERL_ARGS_ASSERT_MY_SPRINTF; va_start(args, pat); vsprintf(buffer, pat, args); va_end(args); @@ -5608,6 +5716,7 @@ Perl_my_snprintf(char *buffer, const Size_t len, const char *format, ...) dTHX; int retval; va_list ap; + PERL_ARGS_ASSERT_MY_SNPRINTF; va_start(ap, format); #ifdef HAS_VSNPRINTF retval = vsnprintf(buffer, len, format, ap); @@ -5639,6 +5748,9 @@ Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap int retval; #ifdef NEED_VA_COPY va_list apc; + + PERL_ARGS_ASSERT_MY_VSNPRINTF; + Perl_va_copy(ap, apc); # ifdef HAS_VSNPRINTF retval = vsnprintf(buffer, len, format, apc); @@ -5728,6 +5840,7 @@ Perl_my_cxt_init(pTHX_ int *index, size_t size) { dVAR; void *p; + PERL_ARGS_ASSERT_MY_CXT_INIT; if (*index == -1) { /* this module hasn't been allocated an index yet */ MUTEX_LOCK(&PL_my_ctx_mutex); @@ -5762,6 +5875,8 @@ Perl_my_cxt_index(pTHX_ const char *my_cxt_key) dVAR; int index; + PERL_ARGS_ASSERT_MY_CXT_INDEX; + for (index = 0; index < PL_my_cxt_index; index++) { const char *key = PL_my_cxt_keys[index]; /* try direct pointer compare first - there are chances to success, @@ -5780,6 +5895,8 @@ Perl_my_cxt_init(pTHX_ const char *my_cxt_key, size_t size) void *p; int index; + PERL_ARGS_ASSERT_MY_CXT_INIT; + index = Perl_my_cxt_index(aTHX_ my_cxt_key); if (index == -1) { /* this module hasn't been allocated an index yet */ @@ -5866,6 +5983,8 @@ Perl_get_db_sub(pTHX_ SV **svp, CV *cv) * it's for informational purposes only. */ + PERL_ARGS_ASSERT_GET_DB_SUB; + save_item(dbsv); if (!PERLDB_SUB_NN) { GV * const gv = CvGV(cv); diff --git a/vms/vms.c b/vms/vms.c index e1e8572..b3978b0 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -10257,6 +10257,8 @@ int flags = 0; unsigned long int Perl_do_spawn(pTHX_ const char *cmd) { + PERL_ARGS_ASSERT_DO_SPAWN; + return do_spawn2(aTHX_ cmd, 0); } /*}}}*/ @@ -12999,6 +13001,8 @@ void Perl_sys_intern_dup(pTHX_ struct interp_intern *src, struct interp_intern *dst) { + PERL_ARGS_ASSERT_SYS_INTERN_DUP; + memcpy(dst,src,sizeof(struct interp_intern)); } diff --git a/win32/win32.c b/win32/win32.c index fed623d..f8e98b9 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -625,6 +625,8 @@ Perl_do_aspawn(pTHX_ SV *really, SV **mark, SV **sp) int flag = P_WAIT; int index = 0; + PERL_ARGS_ASSERT_DO_ASPAWN; + if (sp <= mark) return -1; @@ -798,18 +800,24 @@ do_spawn2(pTHX_ const char *cmd, int exectype) int Perl_do_spawn(pTHX_ char *cmd) { + PERL_ARGS_ASSERT_DO_SPAWN; + return do_spawn2(aTHX_ cmd, EXECF_SPAWN); } int Perl_do_spawn_nowait(pTHX_ char *cmd) { + PERL_ARGS_ASSERT_DO_SPAWN_NOWAIT; + return do_spawn2(aTHX_ cmd, EXECF_SPAWN_NOWAIT); } bool Perl_do_exec(pTHX_ const char *cmd) { + PERL_ARGS_ASSERT_DO_EXEC; + do_spawn2(aTHX_ cmd, EXECF_EXEC); return FALSE; } @@ -5081,6 +5089,8 @@ Perl_sys_intern_clear(pTHX) void Perl_sys_intern_dup(pTHX_ struct interp_intern *src, struct interp_intern *dst) { + PERL_ARGS_ASSERT_SYS_INTERN_DUP; + dst->perlshell_tokens = NULL; dst->perlshell_vec = (char**)NULL; dst->perlshell_items = 0; diff --git a/win32/wince.c b/win32/wince.c index 103a665..cc58789 100644 --- a/win32/wince.c +++ b/win32/wince.c @@ -496,6 +496,8 @@ get_shell(void) int Perl_do_aspawn(pTHX_ SV *really, SV **mark, SV **sp) { + PERL_ARGS_ASSERT_DO_ASPAWN; + Perl_croak(aTHX_ PL_no_func, "aspawn"); return -1; } @@ -619,18 +621,24 @@ do_spawn2(pTHX_ char *cmd, int exectype) int Perl_do_spawn(pTHX_ char *cmd) { + PERL_ARGS_ASSERT_DO_SPAWN; + return do_spawn2(aTHX_ cmd, EXECF_SPAWN); } int Perl_do_spawn_nowait(pTHX_ char *cmd) { + PERL_ARGS_ASSERT_DO_SPAWN_NOWAIT; + return do_spawn2(aTHX_ cmd, EXECF_SPAWN_NOWAIT); } bool Perl_do_exec(pTHX_ const char *cmd) { + PERL_ARGS_ASSERT_DO_EXEC; + do_spawn2(aTHX_ cmd, EXECF_EXEC); return FALSE; } -- 2.7.4