diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-08-15 22:27:54 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-08-21 16:51:14 -0700 |
commit | b70d55581aad461af858eb07a2e80ed5fcc653c1 (patch) | |
tree | cd79a718eca54f6504b4f6fe843d4c44a63bdcb6 | |
parent | 6763423431e1ea415b9abe4d7d5d8715e9203fc3 (diff) | |
download | perl-b70d55581aad461af858eb07a2e80ed5fcc653c1.tar.gz |
Use PADLIST in more places
Much code relies on the fact that PADLIST is typedeffed as AV.
PADLIST should be treated as a distinct type.
-rw-r--r-- | cop.h | 4 | ||||
-rw-r--r-- | dump.c | 2 | ||||
-rw-r--r-- | embed.fnc | 3 | ||||
-rw-r--r-- | op.c | 2 | ||||
-rw-r--r-- | pad.c | 18 | ||||
-rw-r--r-- | pp_ctl.c | 2 | ||||
-rw-r--r-- | pp_hot.c | 2 | ||||
-rw-r--r-- | pp_sort.c | 2 | ||||
-rw-r--r-- | proto.h | 2 | ||||
-rw-r--r-- | sv.h | 2 |
10 files changed, 21 insertions, 18 deletions
@@ -1189,7 +1189,7 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>. STMT_START { \ CV * const _nOnclAshIngNamE_ = the_cv; \ CV * const cv = _nOnclAshIngNamE_; \ - AV * const padlist = CvPADLIST(cv); \ + PADLIST * const padlist = CvPADLIST(cv); \ ENTER; \ multicall_oldcatch = CATCH_GET; \ SAVETMPS; SAVEVPTR(PL_op); \ @@ -1233,7 +1233,7 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>. STMT_START { \ CV * const _nOnclAshIngNamE_ = the_cv; \ CV * const cv = _nOnclAshIngNamE_; \ - AV * const padlist = CvPADLIST(cv); \ + PADLIST * const padlist = CvPADLIST(cv); \ cx = &cxstack[cxstack_ix]; \ assert(cx->cx_type & CXp_MULTICALL); \ if (! ((CvDEPTH(multicall_cv) = cx->blk_sub.olddepth)) ) { \ @@ -2177,7 +2177,7 @@ Perl_debop(pTHX_ const OP *o) CV * const cv = deb_curcv(cxstack_ix); SV *sv; if (cv) { - AV * const padlist = CvPADLIST(cv); + PADLIST * const padlist = CvPADLIST(cv); AV * const comppad = MUTABLE_AV(*av_fetch(padlist, 0, FALSE)); sv = *av_fetch(comppad, o->op_targ, FALSE); } else @@ -2337,7 +2337,8 @@ pd |void |pad_fixup_inner_anons|NN PADLIST *padlist|NN CV *old_cv|NN CV *new_cv pdX |void |pad_push |NN PADLIST *padlist|int depth ApdR |HV* |pad_compname_type|const PADOFFSET po #if defined(USE_ITHREADS) -pdR |AV* |padlist_dup |NULLOK AV *srcpad|NN CLONE_PARAMS *param +pdR |PADLIST *|padlist_dup |NULLOK PADLIST *srcpad \ + |NN CLONE_PARAMS *param #endif ApdR |CV* |find_runcv |NULLOK U32 *db_seqp @@ -7066,7 +7066,7 @@ Perl_newATTRSUB_flags(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, #endif ) { cv_flags_t existing_builtin_attrs = CvFLAGS(cv) & CVf_BUILTIN_ATTRS; - AV *const temp_av = CvPADLIST(cv); + PADLIST *const temp_av = CvPADLIST(cv); CV *const temp_cv = CvOUTSIDE(cv); const cv_flags_t other_flags = CvFLAGS(cv) & (CVf_SLABBED|CVf_WEAKOUTSIDE); @@ -1124,7 +1124,7 @@ S_pad_findlex(pTHX_ const char *namepv, STRLEN namelen, U32 flags, const CV* cv, I32 offset, new_offset; SV *new_capture; SV **new_capturep; - const AV * const padlist = CvPADLIST(cv); + const PADLIST * const padlist = CvPADLIST(cv); const bool staleok = !!(flags & padadd_STALEOK); PERL_ARGS_ASSERT_PAD_FINDLEX; @@ -1896,7 +1896,7 @@ S_cv_dump(pTHX_ const CV *cv, const char *title) { dVAR; const CV * const outside = CvOUTSIDE(cv); - AV* const padlist = CvPADLIST(cv); + PADLIST* const padlist = CvPADLIST(cv); PERL_ARGS_ASSERT_CV_DUMP; @@ -1940,9 +1940,11 @@ Perl_cv_clone(pTHX_ CV *proto) { dVAR; I32 ix; - AV* const protopadlist = CvPADLIST(proto); - const AV *const protopad_name = (const AV *)*av_fetch(protopadlist, 0, FALSE); - const AV *const protopad = (const AV *)*av_fetch(protopadlist, 1, FALSE); + PADLIST* const protopadlist = CvPADLIST(proto); + const AV *const protopad_name = + (const AV *)*av_fetch(protopadlist, 0, FALSE); + const AV *const protopad = + (const AV *)*av_fetch(protopadlist, 1, FALSE); SV** const pname = AvARRAY(protopad_name); SV** const ppad = AvARRAY(protopad); const I32 fname = AvFILLp(protopad_name); @@ -2236,15 +2238,15 @@ Perl_pad_compname_type(pTHX_ const PADOFFSET po) # define av_dup_inc(s,t) MUTABLE_AV(sv_dup_inc((const SV *)s,t)) /* -=for apidoc m|AV *|padlist_dup|AV *srcpad|CLONE_PARAMS *param +=for apidoc padlist_dup Duplicates a pad. =cut */ -AV * -Perl_padlist_dup(pTHX_ AV *srcpad, CLONE_PARAMS *param) +PADLIST * +Perl_padlist_dup(pTHX_ PADLIST *srcpad, CLONE_PARAMS *param) { AV *dstpad; PERL_ARGS_ASSERT_PADLIST_DUP; @@ -2871,7 +2871,7 @@ PP(pp_goto) return retop; } else { - AV* const padlist = CvPADLIST(cv); + PADLIST * const padlist = CvPADLIST(cv); if (CxTYPE(cx) == CXt_EVAL) { PL_in_eval = CxOLD_IN_EVAL(cx); PL_eval_root = cx->blk_eval.old_eval_root; @@ -2683,7 +2683,7 @@ try_autoload: /* This path taken at least 75% of the time */ dMARK; I32 items = SP - MARK; - AV* const padlist = CvPADLIST(cv); + PADLIST * const padlist = CvPADLIST(cv); PUSHBLOCK(cx, CXt_SUB, MARK); PUSHSUB(cx); cx->blk_sub.retop = PL_op->op_next; @@ -1667,7 +1667,7 @@ PP(pp_sort) if (CvDEPTH(cv)) SvREFCNT_inc_simple_void_NN(cv); PUSHSUB(cx); if (!is_xsub) { - AV* const padlist = CvPADLIST(cv); + PADLIST * const padlist = CvPADLIST(cv); if (++CvDEPTH(cv) >= 2) { PERL_STACK_OVERFLOW_CHECK(); @@ -7619,7 +7619,7 @@ PERL_CALLCONV OP* Perl_newPADOP(pTHX_ I32 type, I32 flags, SV* sv) #define PERL_ARGS_ASSERT_NEWPADOP \ assert(sv) -PERL_CALLCONV AV* Perl_padlist_dup(pTHX_ AV *srcpad, CLONE_PARAMS *param) +PERL_CALLCONV PADLIST * Perl_padlist_dup(pTHX_ PADLIST *srcpad, CLONE_PARAMS *param) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_PADLIST_DUP \ @@ -477,7 +477,7 @@ typedef U16 cv_flags_t; } xcv_root_u; \ GV * xcv_gv; \ char * xcv_file; \ - AV * xcv_padlist; \ + PADLIST * xcv_padlist; \ CV * xcv_outside; \ U32 xcv_outside_seq; /* the COP sequence (at the point of our \ * compilation) in the lexically enclosing \ |