From: Malcolm Beattie Date: Mon, 26 May 1997 20:10:42 +0000 (+0000) Subject: Integrate thrperl 5.003->5.004. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5dc0d6134ebb76636f69238201dde15cec972fd0;p=p5sagit%2Fp5-mst-13.2.git Integrate thrperl 5.003->5.004. p4raw-id: //depot/perl@24 --- 5dc0d6134ebb76636f69238201dde15cec972fd0 diff --cc av.c index af3e94e,5c240c7..b9382a8 --- a/av.c +++ b/av.c @@@ -30,12 -30,11 +30,14 @@@ AV* av while (key) { sv = AvARRAY(av)[--key]; assert(sv); - if (sv != &sv_undef) + if (sv != &sv_undef) { + dTHR; (void)SvREFCNT_inc(sv); + } } + key = AvARRAY(av) - AvALLOC(av); + while (key) + AvALLOC(av)[--key] = &sv_undef; AvREAL_on(av); } @@@ -207,7 -197,11 +211,8 @@@ SV *val ary = AvARRAY(av); if (AvFILL(av) < key) { if (!AvREAL(av)) { + dTHR; - if (av == stack && key > stack_sp - stack_base) + if (av == curstack && key > stack_sp - stack_base) stack_sp = stack_base + key; /* XPUSH in disguise */ do ary[++AvFILL(av)] = &sv_undef; diff --cc deb.c index 8058d1a,729c47e..01463c9 --- a/deb.c +++ b/deb.c @@@ -30,12 -31,19 +31,19 @@@ deb(pat,a1,a2,a3,a4,a5,a6,a7,a8 register I32 i; GV* gv = curcop->cop_filegv; + #ifdef USE_THREADS - fprintf(stderr,"0x%lx (%s:%ld)\t", - (unsigned long) thr, - SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "", - (long)curcop->cop_line); ++ PerlIO_printf(Perl_debug_log,"0x%lx (%s:%ld)\t", ++ (unsigned long) thr, ++ SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "", ++ (long)curcop->cop_line); + #else - fprintf(stderr,"(%s:%ld)\t", + PerlIO_printf(Perl_debug_log, "(%s:%ld)\t", SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "", (long)curcop->cop_line); + #endif /* USE_THREADS */ for (i=0; icop_filegv; + #ifdef USE_THREADS - fprintf(stderr,"0x%lx (%s:%ld)\t", - (unsigned long) thr, - SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "", - (long)curcop->cop_line); ++ PerlIO_printf(Perl_debug_log, "0x%lx (%s:%ld)\t", ++ (unsigned long) thr, ++ SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "", ++ (long)curcop->cop_line); + #else - fprintf(stderr,"(%s:%ld)\t", + PerlIO_printf(Perl_debug_log, "(%s:%ld)\t", SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "", (long)curcop->cop_line); + #endif /* USE_THREADS */ for (i=0; i= i) break; + #ifdef USE_THREADS - fprintf(stderr, i ? "0x%lx => ... " : "0x%lx => ", - (unsigned long) thr); ++ PerlIO_printf(Perl_debug_log, i ? "0x%lx => ... " : "0x%lx => ", ++ (unsigned long) thr); + #else - fprintf(stderr, i ? " => ... " : " => "); + PerlIO_printf(Perl_debug_log, i ? " => ... " : " => "); + #endif /* USE_THREADS */ if (stack_base[0] != &sv_undef || stack_sp < stack_base) - fprintf(stderr, " [STACK UNDERFLOW!!!]\n"); + PerlIO_printf(Perl_debug_log, " [STACK UNDERFLOW!!!]\n"); do { ++i; if (markscan <= markstack_ptr && *markscan < i) { diff --cc dump.c index 9bd51ac,df3de9b..cf9cf5d --- a/dump.c +++ b/dump.c @@@ -31,7 -27,12 +31,8 @@@ static void dump() void dump_all() { + dTHR; -#ifdef HAS_SETLINEBUF - setlinebuf(stderr); -#else - setvbuf(stderr, Nullch, _IOLBF, 0); -#endif + PerlIO_setlinebuf(Perl_debug_log); if (main_root) dump_op(main_root); dump_packsubs(defstash); @@@ -100,147 -102,130 +102,147 @@@ dump_eval( } void - dump_op(op) - register OP *op; + dump_op(o) + register OP *o; { - SV *tmpsv; - dump("{\n"); - if (op->op_seq) - PerlIO_printf(Perl_debug_log, "%-4d", op->op_seq); + if (o->op_seq) - fprintf(stderr, "%-4d", o->op_seq); ++ PerlIO_printf(Perl_debug_log, "%-4d", o->op_seq); else - fprintf(stderr, " "); + PerlIO_printf(Perl_debug_log, " "); - dump("TYPE = %s ===> ", op_name[op->op_type]); - if (op->op_next) { - if (op->op_seq) - PerlIO_printf(Perl_debug_log, "%d\n", op->op_next->op_seq); + dump("TYPE = %s ===> ", op_name[o->op_type]); + if (o->op_next) { + if (o->op_seq) - fprintf(stderr, "%d\n", o->op_next->op_seq); ++ PerlIO_printf(Perl_debug_log, "%d\n", o->op_next->op_seq); else - PerlIO_printf(Perl_debug_log, "(%d)\n", op->op_next->op_seq); - fprintf(stderr, "(%d)\n", o->op_next->op_seq); ++ PerlIO_printf(Perl_debug_log, "(%d)\n", o->op_next->op_seq); } else - fprintf(stderr, "DONE\n"); + PerlIO_printf(Perl_debug_log, "DONE\n"); dumplvl++; - if (op->op_targ) { - if (op->op_type == OP_NULL) - dump(" (was %s)\n", op_name[op->op_targ]); + if (o->op_targ) { + if (o->op_type == OP_NULL) + dump(" (was %s)\n", op_name[o->op_targ]); else - dump("TARG = %d\n", op->op_targ); + dump("TARG = %d\n", o->op_targ); } #ifdef DUMPADDR - dump("ADDR = 0x%lx => 0x%lx\n",op, op->op_next); + dump("ADDR = 0x%lx => 0x%lx\n",o, o->op_next); #endif - if (op->op_flags) { + if (o->op_flags) { - *buf = '\0'; - if (o->op_flags & OPf_KNOW) { - if (o->op_flags & OPf_LIST) - (void)strcat(buf,"LIST,"); - else - (void)strcat(buf,"SCALAR,"); + SV *tmpsv = newSVpv("", 0); - switch (op->op_flags & OPf_WANT) { ++ switch (o->op_flags & OPf_WANT) { + case OPf_WANT_VOID: + sv_catpv(tmpsv, ",VOID"); + break; + case OPf_WANT_SCALAR: + sv_catpv(tmpsv, ",SCALAR"); + break; + case OPf_WANT_LIST: + sv_catpv(tmpsv, ",LIST"); + break; + default: + sv_catpv(tmpsv, ",UNKNOWN"); + break; } - if (op->op_flags & OPf_KIDS) - else - (void)strcat(buf,"UNKNOWN,"); + if (o->op_flags & OPf_KIDS) - (void)strcat(buf,"KIDS,"); + sv_catpv(tmpsv, ",KIDS"); - if (op->op_flags & OPf_PARENS) + if (o->op_flags & OPf_PARENS) - (void)strcat(buf,"PARENS,"); + sv_catpv(tmpsv, ",PARENS"); - if (op->op_flags & OPf_STACKED) + if (o->op_flags & OPf_STACKED) - (void)strcat(buf,"STACKED,"); + sv_catpv(tmpsv, ",STACKED"); - if (op->op_flags & OPf_REF) + if (o->op_flags & OPf_REF) - (void)strcat(buf,"REF,"); + sv_catpv(tmpsv, ",REF"); - if (op->op_flags & OPf_MOD) + if (o->op_flags & OPf_MOD) - (void)strcat(buf,"MOD,"); + sv_catpv(tmpsv, ",MOD"); - if (op->op_flags & OPf_SPECIAL) + if (o->op_flags & OPf_SPECIAL) - (void)strcat(buf,"SPECIAL,"); - if (*buf) - buf[strlen(buf)-1] = '\0'; - dump("FLAGS = (%s)\n",buf); + sv_catpv(tmpsv, ",SPECIAL"); + dump("FLAGS = (%s)\n", SvCUR(tmpsv) ? SvPVX(tmpsv) + 1 : ""); + SvREFCNT_dec(tmpsv); } - if (op->op_private) { + if (o->op_private) { - *buf = '\0'; + SV *tmpsv = newSVpv("", 0); - if (op->op_type == OP_AASSIGN) { - if (op->op_private & OPpASSIGN_COMMON) + if (o->op_type == OP_AASSIGN) { + if (o->op_private & OPpASSIGN_COMMON) - (void)strcat(buf,"COMMON,"); + sv_catpv(tmpsv, ",COMMON"); } - else if (op->op_type == OP_SASSIGN) { - if (op->op_private & OPpASSIGN_BACKWARDS) + else if (o->op_type == OP_SASSIGN) { + if (o->op_private & OPpASSIGN_BACKWARDS) - (void)strcat(buf,"BACKWARDS,"); + sv_catpv(tmpsv, ",BACKWARDS"); } - else if (op->op_type == OP_TRANS) { - if (op->op_private & OPpTRANS_SQUASH) + else if (o->op_type == OP_TRANS) { + if (o->op_private & OPpTRANS_SQUASH) - (void)strcat(buf,"SQUASH,"); + sv_catpv(tmpsv, ",SQUASH"); - if (op->op_private & OPpTRANS_DELETE) + if (o->op_private & OPpTRANS_DELETE) - (void)strcat(buf,"DELETE,"); + sv_catpv(tmpsv, ",DELETE"); - if (op->op_private & OPpTRANS_COMPLEMENT) + if (o->op_private & OPpTRANS_COMPLEMENT) - (void)strcat(buf,"COMPLEMENT,"); + sv_catpv(tmpsv, ",COMPLEMENT"); } - else if (op->op_type == OP_REPEAT) { - if (op->op_private & OPpREPEAT_DOLIST) + else if (o->op_type == OP_REPEAT) { + if (o->op_private & OPpREPEAT_DOLIST) - (void)strcat(buf,"DOLIST,"); + sv_catpv(tmpsv, ",DOLIST"); } - else if (op->op_type == OP_ENTERSUB || - op->op_type == OP_RV2SV || - op->op_type == OP_RV2AV || - op->op_type == OP_RV2HV || - op->op_type == OP_RV2GV || - op->op_type == OP_AELEM || - op->op_type == OP_HELEM ) + else if (o->op_type == OP_ENTERSUB || + o->op_type == OP_RV2SV || + o->op_type == OP_RV2AV || + o->op_type == OP_RV2HV || + o->op_type == OP_RV2GV || + o->op_type == OP_AELEM || + o->op_type == OP_HELEM ) { - if (op->op_type == OP_ENTERSUB) { - if (op->op_private & OPpENTERSUB_AMPER) - if (o->op_private & OPpENTERSUB_AMPER) - (void)strcat(buf,"AMPER,"); - if (o->op_private & OPpENTERSUB_DB) - (void)strcat(buf,"DB,"); - if (o->op_private & OPpDEREF_AV) - (void)strcat(buf,"AV,"); - if (o->op_private & OPpDEREF_HV) - (void)strcat(buf,"HV,"); - if (o->op_private & HINT_STRICT_REFS) - (void)strcat(buf,"STRICT_REFS,"); ++ if (o->op_type == OP_ENTERSUB) { ++ if (o->op_private & OPpENTERSUB_AMPER) + sv_catpv(tmpsv, ",AMPER"); - if (op->op_private & OPpENTERSUB_DB) ++ if (o->op_private & OPpENTERSUB_DB) + sv_catpv(tmpsv, ",DB"); + } - switch (op->op_private & OPpDEREF) { ++ switch (o->op_private & OPpDEREF) { + case OPpDEREF_SV: + sv_catpv(tmpsv, ",SV"); + break; + case OPpDEREF_AV: + sv_catpv(tmpsv, ",AV"); + break; + case OPpDEREF_HV: + sv_catpv(tmpsv, ",HV"); + break; + } - if (op->op_type == OP_AELEM || op->op_type == OP_HELEM) { - if (op->op_private & OPpLVAL_DEFER) ++ if (o->op_type == OP_AELEM || o->op_type == OP_HELEM) { ++ if (o->op_private & OPpLVAL_DEFER) + sv_catpv(tmpsv, ",LVAL_DEFER"); + } + else { - if (op->op_private & HINT_STRICT_REFS) ++ if (o->op_private & HINT_STRICT_REFS) + sv_catpv(tmpsv, ",STRICT_REFS"); + } } - else if (op->op_type == OP_CONST) { - if (op->op_private & OPpCONST_BARE) + else if (o->op_type == OP_CONST) { + if (o->op_private & OPpCONST_BARE) - (void)strcat(buf,"BARE,"); + sv_catpv(tmpsv, ",BARE"); } - else if (op->op_type == OP_FLIP) { - if (op->op_private & OPpFLIP_LINENUM) + else if (o->op_type == OP_FLIP) { + if (o->op_private & OPpFLIP_LINENUM) - (void)strcat(buf,"LINENUM,"); + sv_catpv(tmpsv, ",LINENUM"); } - else if (op->op_type == OP_FLOP) { - if (op->op_private & OPpFLIP_LINENUM) + else if (o->op_type == OP_FLOP) { + if (o->op_private & OPpFLIP_LINENUM) - (void)strcat(buf,"LINENUM,"); + sv_catpv(tmpsv, ",LINENUM"); } - if (op->op_flags & OPf_MOD && op->op_private & OPpLVAL_INTRO) + if (o->op_flags & OPf_MOD && o->op_private & OPpLVAL_INTRO) - (void)strcat(buf,"INTRO,"); - if (*buf) { - buf[strlen(buf)-1] = '\0'; - dump("PRIVATE = (%s)\n",buf); - } + sv_catpv(tmpsv, ",INTRO"); + if (SvCUR(tmpsv)) + dump("PRIVATE = (%s)\n", SvPVX(tmpsv) + 1); + SvREFCNT_dec(tmpsv); } - switch (op->op_type) { + switch (o->op_type) { case OP_GVSV: case OP_GV: - if (cGVOP->op_gv) { + if (cGVOPo->op_gv) { + SV *tmpsv = NEWSV(0,0); ENTER; - tmpsv = NEWSV(0,0); SAVEFREESV(tmpsv); - gv_fullname3(tmpsv, cGVOP->op_gv, Nullch); - gv_fullname(tmpsv,cGVOPo->op_gv); ++ gv_fullname3(tmpsv, cGVOPo->op_gv, Nullch); dump("GV = %s\n", SvPV(tmpsv, na)); LEAVE; } @@@ -259,42 -244,42 +261,42 @@@ break; case OP_ENTERLOOP: dump("REDO ===> "); - if (cLOOP->op_redoop) - PerlIO_printf(Perl_debug_log, "%d\n", cLOOP->op_redoop->op_seq); + if (cLOOPo->op_redoop) - fprintf(stderr, "%d\n", cLOOPo->op_redoop->op_seq); ++ PerlIO_printf(Perl_debug_log, "%d\n", cLOOPo->op_redoop->op_seq); else - fprintf(stderr, "DONE\n"); + PerlIO_printf(Perl_debug_log, "DONE\n"); dump("NEXT ===> "); - if (cLOOP->op_nextop) - PerlIO_printf(Perl_debug_log, "%d\n", cLOOP->op_nextop->op_seq); + if (cLOOPo->op_nextop) - fprintf(stderr, "%d\n", cLOOPo->op_nextop->op_seq); ++ PerlIO_printf(Perl_debug_log, "%d\n", cLOOPo->op_nextop->op_seq); else - fprintf(stderr, "DONE\n"); + PerlIO_printf(Perl_debug_log, "DONE\n"); dump("LAST ===> "); - if (cLOOP->op_lastop) - PerlIO_printf(Perl_debug_log, "%d\n", cLOOP->op_lastop->op_seq); + if (cLOOPo->op_lastop) - fprintf(stderr, "%d\n", cLOOPo->op_lastop->op_seq); ++ PerlIO_printf(Perl_debug_log, "%d\n", cLOOPo->op_lastop->op_seq); else - fprintf(stderr, "DONE\n"); + PerlIO_printf(Perl_debug_log, "DONE\n"); break; case OP_COND_EXPR: dump("TRUE ===> "); - if (cCONDOP->op_true) - PerlIO_printf(Perl_debug_log, "%d\n", cCONDOP->op_true->op_seq); + if (cCONDOPo->op_true) - fprintf(stderr, "%d\n", cCONDOPo->op_true->op_seq); ++ PerlIO_printf(Perl_debug_log, "%d\n", cCONDOPo->op_true->op_seq); else - fprintf(stderr, "DONE\n"); + PerlIO_printf(Perl_debug_log, "DONE\n"); dump("FALSE ===> "); - if (cCONDOP->op_false) - PerlIO_printf(Perl_debug_log, "%d\n", cCONDOP->op_false->op_seq); + if (cCONDOPo->op_false) - fprintf(stderr, "%d\n", cCONDOPo->op_false->op_seq); ++ PerlIO_printf(Perl_debug_log, "%d\n", cCONDOPo->op_false->op_seq); else - fprintf(stderr, "DONE\n"); + PerlIO_printf(Perl_debug_log, "DONE\n"); break; case OP_MAPWHILE: case OP_GREPWHILE: case OP_OR: case OP_AND: dump("OTHER ===> "); - if (cLOGOP->op_other) - PerlIO_printf(Perl_debug_log, "%d\n", cLOGOP->op_other->op_seq); + if (cLOGOPo->op_other) - fprintf(stderr, "%d\n", cLOGOPo->op_other->op_seq); ++ PerlIO_printf(Perl_debug_log, "%d\n", cLOGOPo->op_other->op_seq); else - fprintf(stderr, "DONE\n"); + PerlIO_printf(Perl_debug_log, "DONE\n"); break; case OP_PUSHRE: case OP_MATCH: diff --cc embed.h index 0ad53a7,61dddbf..dcaca38 --- a/embed.h +++ b/embed.h @@@ -15,1167 -12,1071 +15,1180 @@@ # define EMBED 1 #endif +/* Hide global symbols? */ + #ifdef EMBED -/* globals we need to hide from the world */ -#define AMG_names Perl_AMG_names -#define No Perl_No -#define Sv Perl_Sv -#define Xpv Perl_Xpv -#define Yes Perl_Yes -#define abs_amg Perl_abs_amg -#define add_amg Perl_add_amg -#define add_ass_amg Perl_add_ass_amg -#define additem Perl_additem +#define AMG_names Perl_AMG_names +#define Gv_AMupdate Perl_Gv_AMupdate +#define No Perl_No +#define Sv Perl_Sv +#define Xpv Perl_Xpv +#define Yes Perl_Yes +#define abs_amg Perl_abs_amg +#define add_amg Perl_add_amg +#define add_ass_amg Perl_add_ass_amg +#define additem Perl_additem +#define amagic_call Perl_amagic_call #define amagic_generation Perl_amagic_generation -#define an Perl_an -#define atan2_amg Perl_atan2_amg -#define band_amg Perl_band_amg -#define bool__amg Perl_bool__amg -#define bor_amg Perl_bor_amg -#define buf Perl_buf -#define bufend Perl_bufend -#define bufptr Perl_bufptr -#define bxor_amg Perl_bxor_amg -#define check Perl_check -#define compiling Perl_compiling -#define compl_amg Perl_compl_amg -#define compcv Perl_compcv -#define comppad Perl_comppad -#define comppad_name Perl_comppad_name +#define an Perl_an +#define append_elem Perl_append_elem +#define append_list Perl_append_list +#define apply Perl_apply +#define assertref Perl_assertref +#define atan2_amg Perl_atan2_amg +#define av_clear Perl_av_clear +#define av_extend Perl_av_extend +#define av_fake Perl_av_fake +#define av_fetch Perl_av_fetch +#define av_fill Perl_av_fill +#define av_len Perl_av_len +#define av_make Perl_av_make +#define av_pop Perl_av_pop +#define av_push Perl_av_push +#define av_shift Perl_av_shift +#define av_store Perl_av_store +#define av_undef Perl_av_undef +#define av_unshift Perl_av_unshift ++#define avhv_delete Perl_avhv_delete ++#define avhv_delete_ent Perl_avhv_delete_ent ++#define avhv_exists Perl_avhv_exists ++#define avhv_exists_ent Perl_avhv_exists_ent ++#define avhv_fetch Perl_avhv_fetch ++#define avhv_fetch_ent Perl_avhv_fetch_ent ++#define avhv_iterinit Perl_avhv_iterinit ++#define avhv_iternext Perl_avhv_iternext ++#define avhv_iternextsv Perl_avhv_iternextsv ++#define avhv_iterval Perl_avhv_iterval ++#define avhv_store Perl_avhv_store ++#define avhv_store_ent Perl_avhv_store_ent +#define band_amg Perl_band_amg +#define bind_match Perl_bind_match +#define block_end Perl_block_end +#define block_gimme Perl_block_gimme +#define block_start Perl_block_start +#define bool__amg Perl_bool__amg +#define bor_amg Perl_bor_amg +#define bufend Perl_bufend +#define bufptr Perl_bufptr +#define bxor_amg Perl_bxor_amg +#define call_list Perl_call_list +#define cando Perl_cando +#define cast_ulong Perl_cast_ulong +#define check Perl_check +#define check_uni Perl_check_uni +#define checkcomma Perl_checkcomma +#define ck_aelem Perl_ck_aelem +#define ck_anoncode Perl_ck_anoncode +#define ck_bitop Perl_ck_bitop +#define ck_concat Perl_ck_concat +#define ck_delete Perl_ck_delete +#define ck_eof Perl_ck_eof +#define ck_eval Perl_ck_eval +#define ck_exec Perl_ck_exec +#define ck_exists Perl_ck_exists +#define ck_ftst Perl_ck_ftst +#define ck_fun Perl_ck_fun +#define ck_fun_locale Perl_ck_fun_locale +#define ck_glob Perl_ck_glob +#define ck_grep Perl_ck_grep +#define ck_gvconst Perl_ck_gvconst +#define ck_index Perl_ck_index +#define ck_lengthconst Perl_ck_lengthconst +#define ck_lfun Perl_ck_lfun +#define ck_listiob Perl_ck_listiob +#define ck_match Perl_ck_match +#define ck_null Perl_ck_null +#define ck_repeat Perl_ck_repeat +#define ck_require Perl_ck_require +#define ck_retarget Perl_ck_retarget +#define ck_rfun Perl_ck_rfun +#define ck_rvconst Perl_ck_rvconst +#define ck_scmp Perl_ck_scmp +#define ck_select Perl_ck_select +#define ck_shift Perl_ck_shift +#define ck_sort Perl_ck_sort +#define ck_spair Perl_ck_spair +#define ck_split Perl_ck_split +#define ck_subr Perl_ck_subr +#define ck_svconst Perl_ck_svconst +#define ck_trunc Perl_ck_trunc +#define collation_ix Perl_collation_ix +#define collation_name Perl_collation_name +#define collation_standard Perl_collation_standard +#define collxfrm_base Perl_collxfrm_base +#define collxfrm_mult Perl_collxfrm_mult +#define compcv Perl_compcv +#define compiling Perl_compiling +#define compl_amg Perl_compl_amg +#define comppad Perl_comppad +#define comppad_name Perl_comppad_name #define comppad_name_fill Perl_comppad_name_fill -#define concat_amg Perl_concat_amg -#define concat_ass_amg Perl_concat_ass_amg -#define cop_seqmax Perl_cop_seqmax -#define cos_amg Perl_cos_amg -#define cryptseen Perl_cryptseen -#define cshlen Perl_cshlen -#define cshname Perl_cshname -#define curcop Perl_curcop -#define curinterp Perl_curinterp -#define curpad Perl_curpad -#define dc Perl_dc -#define dec_amg Perl_dec_amg -#define di Perl_di -#define div_amg Perl_div_amg -#define div_ass_amg Perl_div_ass_amg -#define ds Perl_ds -#define egid Perl_egid -#define envgv Perl_envgv -#define eq_amg Perl_eq_amg -#define error_count Perl_error_count -#define euid Perl_euid -#define evalseq Perl_evalseq -#define exp_amg Perl_exp_amg -#define expect Perl_expect -#define expectterm Perl_expectterm -#define fallback_amg Perl_fallback_amg -#define filter_add Perl_filter_add -#define filter_del Perl_filter_del -#define filter_read Perl_filter_read -#define fold Perl_fold -#define freq Perl_freq -#define ge_amg Perl_ge_amg -#define gid Perl_gid -#define gt_amg Perl_gt_amg -#define hexdigit Perl_hexdigit -#define hints Perl_hints -#define in_my Perl_in_my -#define inc_amg Perl_inc_amg -#define io_close Perl_io_close -#define know_next Perl_know_next -#define last_lop Perl_last_lop -#define last_lop_op Perl_last_lop_op -#define last_uni Perl_last_uni -#define le_amg Perl_le_amg -#define lex_state Perl_lex_state -#define lex_defer Perl_lex_defer -#define lex_expect Perl_lex_expect -#define lex_brackets Perl_lex_brackets -#define lex_formbrack Perl_lex_formbrack -#define lex_fakebrack Perl_lex_fakebrack -#define lex_casemods Perl_lex_casemods -#define lex_dojoin Perl_lex_dojoin -#define lex_starts Perl_lex_starts -#define lex_stuff Perl_lex_stuff -#define lex_repl Perl_lex_repl -#define lex_op Perl_lex_op -#define lex_inpat Perl_lex_inpat -#define lex_inwhat Perl_lex_inwhat -#define lex_brackstack Perl_lex_brackstack -#define lex_casestack Perl_lex_casestack -#define linestr Perl_linestr -#define log_amg Perl_log_amg -#define lshift_amg Perl_lshift_amg -#define lshift_ass_amg Perl_lshift_ass_amg -#define lt_amg Perl_lt_amg -#define markstack Perl_markstack -#define markstack_max Perl_markstack_max -#define markstack_ptr Perl_markstack_ptr -#define maxo Perl_maxo -#define max_intro_pending Perl_max_intro_pending -#define min_intro_pending Perl_min_intro_pending -#define mod_amg Perl_mod_amg -#define mod_ass_amg Perl_mod_ass_amg -#define mult_amg Perl_mult_amg -#define mult_ass_amg Perl_mult_ass_amg -#define multi_close Perl_multi_close -#define multi_end Perl_multi_end -#define multi_open Perl_multi_open -#define multi_start Perl_multi_start -#define na Perl_na -#define ncmp_amg Perl_ncmp_amg -#define nextval Perl_nextval -#define nexttype Perl_nexttype -#define nexttoke Perl_nexttoke -#define ne_amg Perl_ne_amg -#define neg_amg Perl_neg_amg -#define nexttype Perl_nexttype -#define nextval Perl_nextval -#define no_aelem Perl_no_aelem -#define no_dir_func Perl_no_dir_func -#define no_func Perl_no_func -#define no_helem Perl_no_helem -#define no_mem Perl_no_mem -#define no_modify Perl_no_modify -#define no_security Perl_no_security -#define no_sock_func Perl_no_sock_func -#define no_usym Perl_no_usym -#define nointrp Perl_nointrp -#define nomem Perl_nomem -#define nomemok Perl_nomemok -#define nomethod_amg Perl_nomethod_amg -#define not_amg Perl_not_amg -#define numer_amg Perl_numer_amg -#define oldbufptr Perl_oldbufptr -#define oldoldbufptr Perl_oldoldbufptr -#define op Perl_op -#define op_desc Perl_op_desc -#define op_name Perl_op_name -#define op_seqmax Perl_op_seqmax -#define opargs Perl_opargs -#define origalen Perl_origalen -#define origenviron Perl_origenviron -#define osname Perl_osname -#define padix Perl_padix -#define patleave Perl_patleave -#define pow_amg Perl_pow_amg -#define pow_ass_amg Perl_pow_ass_amg -#define ppaddr Perl_ppaddr -#define profiledata Perl_profiledata -#define provide_ref Perl_provide_ref -#define qrt_amg Perl_qrt_amg -#define rcsid Perl_rcsid -#define reall_srchlen Perl_reall_srchlen -#define regarglen Perl_regarglen -#define regbol Perl_regbol -#define regcode Perl_regcode -#define regdummy Perl_regdummy -#define regendp Perl_regendp -#define regeol Perl_regeol -#define regfold Perl_regfold -#define reginput Perl_reginput -#define regkind Perl_regkind -#define reglastparen Perl_reglastparen -#define regmyendp Perl_regmyendp -#define regmyp_size Perl_regmyp_size -#define regmystartp Perl_regmystartp -#define regnarrate Perl_regnarrate -#define regnaughty Perl_regnaughty -#define regnpar Perl_regnpar -#define regparse Perl_regparse -#define regprecomp Perl_regprecomp -#define regprev Perl_regprev -#define regsawback Perl_regsawback -#define regsize Perl_regsize -#define regstartp Perl_regstartp -#define regtill Perl_regtill -#define regxend Perl_regxend -#define repeat_amg Perl_repeat_amg -#define repeat_ass_amg Perl_repeat_ass_amg -#define retstack Perl_retstack -#define retstack_ix Perl_retstack_ix -#define retstack_max Perl_retstack_max -#define rsfp Perl_rsfp -#define rsfp_filters Perl_rsfp_filters -#define rshift_amg Perl_rshift_amg -#define rshift_ass_amg Perl_rshift_ass_amg -#define save_pptr Perl_save_pptr -#define savestack Perl_savestack -#define savestack_ix Perl_savestack_ix -#define savestack_max Perl_savestack_max -#define saw_return Perl_saw_return -#define scmp_amg Perl_scmp_amg -#define scopestack Perl_scopestack -#define scopestack_ix Perl_scopestack_ix -#define scopestack_max Perl_scopestack_max -#define scrgv Perl_scrgv -#define seq_amg Perl_seq_amg -#define sge_amg Perl_sge_amg -#define sgt_amg Perl_sgt_amg -#define sig_name Perl_sig_name -#define sig_num Perl_sig_num -#define siggv Perl_siggv -#define sighandler Perl_sighandler -#define simple Perl_simple -#define sin_amg Perl_sin_amg -#define sle_amg Perl_sle_amg -#define slt_amg Perl_slt_amg -#define sne_amg Perl_sne_amg -#define stack Perl_stack -#define stack_base Perl_stack_base -#define stack_max Perl_stack_max -#define stack_sp Perl_stack_sp -#define statbuf Perl_statbuf -#define string_amg Perl_string_amg -#define sub_generation Perl_sub_generation -#define subline Perl_subline -#define subname Perl_subname -#define subtr_amg Perl_subtr_amg -#define subtr_ass_amg Perl_subtr_ass_amg -#define sv_no Perl_sv_no -#define sv_undef Perl_sv_undef -#define sv_yes Perl_sv_yes -#define tainting Perl_tainting -#define thisexpr Perl_thisexpr -#define timesbuf Perl_timesbuf -#define tokenbuf Perl_tokenbuf -#define uid Perl_uid -#define varies Perl_varies -#define vert Perl_vert -#define vtbl_amagic Perl_vtbl_amagic -#define vtbl_amagicelem Perl_vtbl_amagicelem -#define vtbl_arylen Perl_vtbl_arylen -#define vtbl_bm Perl_vtbl_bm -#define vtbl_dbline Perl_vtbl_dbline -#define vtbl_env Perl_vtbl_env -#define vtbl_envelem Perl_vtbl_envelem -#define vtbl_glob Perl_vtbl_glob -#define vtbl_isa Perl_vtbl_isa -#define vtbl_isaelem Perl_vtbl_isaelem -#define vtbl_mglob Perl_vtbl_mglob -#define vtbl_mutex Perl_vtbl_mutex -#define vtbl_pack Perl_vtbl_pack -#define vtbl_packelem Perl_vtbl_packelem -#define vtbl_pos Perl_vtbl_pos -#define vtbl_sig Perl_vtbl_sig -#define vtbl_sigelem Perl_vtbl_sigelem -#define vtbl_substr Perl_vtbl_substr -#define vtbl_sv Perl_vtbl_sv -#define vtbl_taint Perl_vtbl_taint -#define vtbl_uvar Perl_vtbl_uvar -#define vtbl_vec Perl_vtbl_vec -#define warn_nl Perl_warn_nl -#define warn_nosemi Perl_warn_nosemi -#define warn_reserved Perl_warn_reserved -#define watchaddr Perl_watchaddr -#define watchok Perl_watchok -#define yychar Perl_yychar -#define yycheck Perl_yycheck -#define yydebug Perl_yydebug -#define yydefred Perl_yydefred -#define yydgoto Perl_yydgoto -#define yyerrflag Perl_yyerrflag -#define yygindex Perl_yygindex -#define yylen Perl_yylen -#define yylhs Perl_yylhs -#define yylval Perl_yylval -#define yyname Perl_yyname -#define yynerrs Perl_yynerrs -#define yyrindex Perl_yyrindex -#define yyrule Perl_yyrule -#define yysindex Perl_yysindex -#define yytable Perl_yytable -#define yyval Perl_yyval -#define Gv_AMupdate Perl_Gv_AMupdate -#define amagic_call Perl_amagic_call -#define append_elem Perl_append_elem -#define append_list Perl_append_list -#define apply Perl_apply -#define assertref Perl_assertref -#define av_clear Perl_av_clear -#define av_extend Perl_av_extend -#define av_fake Perl_av_fake -#define av_fetch Perl_av_fetch -#define av_fill Perl_av_fill -#define av_len Perl_av_len -#define av_make Perl_av_make -#define av_pop Perl_av_pop -#define av_push Perl_av_push -#define av_shift Perl_av_shift -#define av_store Perl_av_store -#define av_undef Perl_av_undef -#define av_unshift Perl_av_unshift -#define bind_match Perl_bind_match -#define block_end Perl_block_end -#define block_start Perl_block_start -#define calllist Perl_calllist -#define cando Perl_cando -#define cast_ulong Perl_cast_ulong -#define check_uni Perl_check_uni -#define checkcomma Perl_checkcomma -#define chsize Perl_chsize -#define ck_aelem Perl_ck_aelem -#define ck_concat Perl_ck_concat -#define ck_delete Perl_ck_delete -#define ck_eof Perl_ck_eof -#define ck_eval Perl_ck_eval -#define ck_exec Perl_ck_exec -#define ck_formline Perl_ck_formline -#define ck_ftst Perl_ck_ftst -#define ck_fun Perl_ck_fun -#define ck_glob Perl_ck_glob -#define ck_grep Perl_ck_grep -#define ck_gvconst Perl_ck_gvconst -#define ck_index Perl_ck_index -#define ck_lengthconst Perl_ck_lengthconst -#define ck_lfun Perl_ck_lfun -#define ck_listiob Perl_ck_listiob -#define ck_match Perl_ck_match -#define ck_null Perl_ck_null -#define ck_repeat Perl_ck_repeat -#define ck_require Perl_ck_require -#define ck_retarget Perl_ck_retarget -#define ck_rfun Perl_ck_rfun -#define ck_rvconst Perl_ck_rvconst -#define ck_select Perl_ck_select -#define ck_shift Perl_ck_shift -#define ck_sort Perl_ck_sort -#define ck_spair Perl_ck_spair -#define ck_split Perl_ck_split -#define ck_subr Perl_ck_subr -#define ck_svconst Perl_ck_svconst -#define ck_trunc Perl_ck_trunc -#define condpair_magic Perl_condpair_magic -#define convert Perl_convert -#define cpytill Perl_cpytill -#define croak Perl_croak -#define cv_clone Perl_cv_clone -#define cv_undef Perl_cv_undef -#define cx_dump Perl_cx_dump -#define cxinc Perl_cxinc -#define deb Perl_deb -#define deb_growlevel Perl_deb_growlevel -#define debop Perl_debop -#define debprofdump Perl_debprofdump -#define debstack Perl_debstack -#define debstackptrs Perl_debstackptrs -#define deprecate Perl_deprecate -#define die Perl_die -#define die_where Perl_die_where -#define do_aexec Perl_do_aexec -#define do_chomp Perl_do_chomp -#define do_chop Perl_do_chop -#define do_close Perl_do_close -#define do_eof Perl_do_eof -#define do_exec Perl_do_exec -#define do_execfree Perl_do_execfree -#define do_ipcctl Perl_do_ipcctl -#define do_ipcget Perl_do_ipcget -#define do_join Perl_do_join -#define do_kv Perl_do_kv -#define do_msgrcv Perl_do_msgrcv -#define do_msgsnd Perl_do_msgsnd -#define do_open Perl_do_open -#define do_pipe Perl_do_pipe -#define do_print Perl_do_print -#define do_readline Perl_do_readline -#define do_seek Perl_do_seek -#define do_semop Perl_do_semop -#define do_shmio Perl_do_shmio -#define do_sprintf Perl_do_sprintf -#define do_tell Perl_do_tell -#define do_trans Perl_do_trans -#define do_vecset Perl_do_vecset -#define do_vop Perl_do_vop -#define doeval Perl_doeval -#define dofindlabel Perl_dofindlabel -#define dopoptoeval Perl_dopoptoeval -#define dounwind Perl_dounwind -#define dowantarray Perl_dowantarray -#define dump_all Perl_dump_all -#define dump_eval Perl_dump_eval -#define dump_fds Perl_dump_fds -#define dump_form Perl_dump_form -#define dump_gv Perl_dump_gv -#define dump_mstats Perl_dump_mstats -#define dump_op Perl_dump_op -#define dump_packsubs Perl_dump_packsubs -#define dump_pm Perl_dump_pm -#define dump_sub Perl_dump_sub -#define fbm_compile Perl_fbm_compile -#define fbm_instr Perl_fbm_instr -#define fetch_gv Perl_fetch_gv -#define fetch_io Perl_fetch_io -#define filter_add Perl_filter_add -#define filter_del Perl_filter_del -#define filter_read Perl_filter_read -#define fold_constants Perl_fold_constants -#define force_ident Perl_force_ident -#define force_list Perl_force_list -#define force_next Perl_force_next -#define force_word Perl_force_word -#define free_tmps Perl_free_tmps +#define concat_amg Perl_concat_amg +#define concat_ass_amg Perl_concat_ass_amg +#define convert Perl_convert +#define cop_seqmax Perl_cop_seqmax +#define cos_amg Perl_cos_amg +#define croak Perl_croak +#define cryptseen Perl_cryptseen +#define cshlen Perl_cshlen +#define cshname Perl_cshname +#define curinterp Perl_curinterp +#define curpad Perl_curpad +#define cv_ckproto Perl_cv_ckproto +#define cv_clone Perl_cv_clone +#define cv_const_sv Perl_cv_const_sv +#define cv_undef Perl_cv_undef +#define cx_dump Perl_cx_dump +#define cxinc Perl_cxinc +#define dc Perl_dc +#define deb Perl_deb +#define deb_growlevel Perl_deb_growlevel +#define debop Perl_debop +#define debprofdump Perl_debprofdump +#define debstack Perl_debstack +#define debstackptrs Perl_debstackptrs +#define dec_amg Perl_dec_amg +#define delimcpy Perl_delimcpy +#define deprecate Perl_deprecate +#define di Perl_di +#define die Perl_die +#define die_where Perl_die_where +#define div_amg Perl_div_amg +#define div_ass_amg Perl_div_ass_amg +#define do_aexec Perl_do_aexec +#define do_chomp Perl_do_chomp +#define do_chop Perl_do_chop +#define do_close Perl_do_close +#define do_eof Perl_do_eof +#define do_exec Perl_do_exec +#define do_execfree Perl_do_execfree +#define do_ipcctl Perl_do_ipcctl +#define do_ipcget Perl_do_ipcget +#define do_join Perl_do_join +#define do_kv Perl_do_kv +#define do_msgrcv Perl_do_msgrcv +#define do_msgsnd Perl_do_msgsnd +#define do_open Perl_do_open +#define do_pipe Perl_do_pipe +#define do_print Perl_do_print +#define do_readline Perl_do_readline +#define do_seek Perl_do_seek +#define do_semop Perl_do_semop +#define do_shmio Perl_do_shmio +#define do_sprintf Perl_do_sprintf +#define do_sysseek Perl_do_sysseek +#define do_tell Perl_do_tell +#define do_trans Perl_do_trans +#define do_vecset Perl_do_vecset +#define do_vop Perl_do_vop +#define doeval Perl_doeval +#define dofindlabel Perl_dofindlabel +#define dopoptoeval Perl_dopoptoeval +#define dounwind Perl_dounwind +#define dowantarray Perl_dowantarray +#define ds Perl_ds +#define dump_all Perl_dump_all +#define dump_eval Perl_dump_eval +#define dump_fds Perl_dump_fds +#define dump_form Perl_dump_form +#define dump_gv Perl_dump_gv +#define dump_mstats Perl_dump_mstats +#define dump_op Perl_dump_op +#define dump_packsubs Perl_dump_packsubs +#define dump_pm Perl_dump_pm +#define dump_sub Perl_dump_sub +#define egid Perl_egid +#define eq_amg Perl_eq_amg +#define error_count Perl_error_count +#define euid Perl_euid +#define evalseq Perl_evalseq +#define exp_amg Perl_exp_amg +#define expect Perl_expect +#define expectterm Perl_expectterm +#define fallback_amg Perl_fallback_amg +#define fbm_compile Perl_fbm_compile +#define fbm_instr Perl_fbm_instr +#define fetch_gv Perl_fetch_gv +#define fetch_io Perl_fetch_io +#define filter_add Perl_filter_add +#define filter_del Perl_filter_del +#define filter_read Perl_filter_read +#define fold Perl_fold +#define fold_constants Perl_fold_constants +#define fold_locale Perl_fold_locale +#define force_ident Perl_force_ident +#define force_list Perl_force_list +#define force_next Perl_force_next +#define force_word Perl_force_word +#define form Perl_form +#define free_tmps Perl_free_tmps +#define freq Perl_freq +#define ge_amg Perl_ge_amg #define gen_constant_list Perl_gen_constant_list -#define gp_free Perl_gp_free -#define gp_ref Perl_gp_ref -#define gv_AVadd Perl_gv_AVadd -#define gv_HVadd Perl_gv_HVadd -#define gv_IOadd Perl_gv_IOadd -#define gv_check Perl_gv_check -#define gv_efullname Perl_gv_efullname -#define gv_fetchfile Perl_gv_fetchfile -#define gv_fetchmeth Perl_gv_fetchmeth -#define gv_fetchmethod Perl_gv_fetchmethod -#define gv_fetchpv Perl_gv_fetchpv -#define gv_fullname Perl_gv_fullname -#define gv_init Perl_gv_init -#define gv_stashpv Perl_gv_stashpv -#define gv_stashsv Perl_gv_stashsv -#define he_delayfree Perl_he_delayfree -#define he_free Perl_he_free -#define he_root Perl_he_root -#define hoistmust Perl_hoistmust -#define hv_clear Perl_hv_clear -#define hv_delete Perl_hv_delete -#define hv_exists Perl_hv_exists -#define hv_fetch Perl_hv_fetch -#define hv_iterinit Perl_hv_iterinit -#define hv_iterkey Perl_hv_iterkey -#define hv_iternext Perl_hv_iternext -#define hv_iternextsv Perl_hv_iternextsv -#define hv_iterval Perl_hv_iterval -#define hv_magic Perl_hv_magic -#define hv_stashpv Perl_hv_stashpv -#define hv_store Perl_hv_store -#define hv_undef Perl_hv_undef -#define ibcmp Perl_ibcmp -#define ingroup Perl_ingroup -#define init_stacks Perl_init_stacks -#define instr Perl_instr -#define intuit_more Perl_intuit_more -#define invert Perl_invert -#define jmaybe Perl_jmaybe -#define keyword Perl_keyword -#define leave_scope Perl_leave_scope -#define lex_end Perl_lex_end -#define lex_start Perl_lex_start -#define linklist Perl_linklist -#define list Perl_list -#define listkids Perl_listkids -#define localize Perl_localize +#define gid Perl_gid +#define gp_free Perl_gp_free +#define gp_ref Perl_gp_ref +#define gt_amg Perl_gt_amg +#define gv_AVadd Perl_gv_AVadd +#define gv_HVadd Perl_gv_HVadd +#define gv_IOadd Perl_gv_IOadd +#define gv_autoload4 Perl_gv_autoload4 +#define gv_check Perl_gv_check +#define gv_efullname Perl_gv_efullname +#define gv_efullname3 Perl_gv_efullname3 +#define gv_fetchfile Perl_gv_fetchfile +#define gv_fetchmeth Perl_gv_fetchmeth +#define gv_fetchmethod Perl_gv_fetchmethod +#define gv_fetchmethod_autoload Perl_gv_fetchmethod_autoload +#define gv_fetchpv Perl_gv_fetchpv +#define gv_fullname Perl_gv_fullname +#define gv_fullname3 Perl_gv_fullname3 +#define gv_init Perl_gv_init +#define gv_stashpv Perl_gv_stashpv +#define gv_stashpvn Perl_gv_stashpvn +#define gv_stashsv Perl_gv_stashsv +#define he_root Perl_he_root +#define hexdigit Perl_hexdigit +#define hints Perl_hints +#define hoistmust Perl_hoistmust +#define hv_clear Perl_hv_clear +#define hv_delayfree_ent Perl_hv_delayfree_ent +#define hv_delete Perl_hv_delete +#define hv_delete_ent Perl_hv_delete_ent +#define hv_exists Perl_hv_exists +#define hv_exists_ent Perl_hv_exists_ent +#define hv_fetch Perl_hv_fetch +#define hv_fetch_ent Perl_hv_fetch_ent +#define hv_free_ent Perl_hv_free_ent +#define hv_iterinit Perl_hv_iterinit +#define hv_iterkey Perl_hv_iterkey +#define hv_iterkeysv Perl_hv_iterkeysv +#define hv_iternext Perl_hv_iternext +#define hv_iternextsv Perl_hv_iternextsv +#define hv_iterval Perl_hv_iterval +#define hv_ksplit Perl_hv_ksplit +#define hv_magic Perl_hv_magic +#define hv_stashpv Perl_hv_stashpv +#define hv_store Perl_hv_store +#define hv_store_ent Perl_hv_store_ent +#define hv_undef Perl_hv_undef +#define ibcmp Perl_ibcmp +#define ibcmp_locale Perl_ibcmp_locale +#define in_my Perl_in_my ++#define in_my_stash Perl_in_my_stash +#define inc_amg Perl_inc_amg +#define ingroup Perl_ingroup +#define instr Perl_instr +#define intro_my Perl_intro_my +#define intuit_more Perl_intuit_more +#define invert Perl_invert +#define io_close Perl_io_close +#define jmaybe Perl_jmaybe +#define keyword Perl_keyword +#define know_next Perl_know_next +#define last_lop Perl_last_lop +#define last_lop_op Perl_last_lop_op +#define last_uni Perl_last_uni +#define le_amg Perl_le_amg +#define leave_scope Perl_leave_scope +#define lex_brackets Perl_lex_brackets +#define lex_brackstack Perl_lex_brackstack +#define lex_casemods Perl_lex_casemods +#define lex_casestack Perl_lex_casestack +#define lex_defer Perl_lex_defer +#define lex_dojoin Perl_lex_dojoin +#define lex_end Perl_lex_end +#define lex_expect Perl_lex_expect +#define lex_fakebrack Perl_lex_fakebrack +#define lex_formbrack Perl_lex_formbrack +#define lex_inpat Perl_lex_inpat +#define lex_inwhat Perl_lex_inwhat +#define lex_op Perl_lex_op +#define lex_repl Perl_lex_repl +#define lex_start Perl_lex_start +#define lex_starts Perl_lex_starts +#define lex_state Perl_lex_state +#define lex_stuff Perl_lex_stuff +#define linestr Perl_linestr +#define linklist Perl_linklist +#define list Perl_list +#define listkids Perl_listkids +#define localize Perl_localize +#define log_amg Perl_log_amg #define looks_like_number Perl_looks_like_number -#define magic_clearenv Perl_magic_clearenv -#define magic_clearpack Perl_magic_clearpack +#define lshift_amg Perl_lshift_amg +#define lshift_ass_amg Perl_lshift_ass_amg +#define lt_amg Perl_lt_amg +#define magic_clearenv Perl_magic_clearenv +#define magic_clearpack Perl_magic_clearpack +#define magic_clearsig Perl_magic_clearsig #define magic_existspack Perl_magic_existspack -#define magic_get Perl_magic_get -#define magic_getarylen Perl_magic_getarylen -#define magic_getglob Perl_magic_getglob -#define magic_getpack Perl_magic_getpack -#define magic_getpos Perl_magic_getpos -#define magic_gettaint Perl_magic_gettaint -#define magic_getuvar Perl_magic_getuvar -#define magic_len Perl_magic_len -#define magic_mutexfree Perl_magic_mutexfree -#define magic_nextpack Perl_magic_nextpack -#define magic_set Perl_magic_set -#define magic_setamagic Perl_magic_setamagic -#define magic_setarylen Perl_magic_setarylen -#define magic_setbm Perl_magic_setbm -#define magic_setdbline Perl_magic_setdbline -#define magic_setenv Perl_magic_setenv -#define magic_setglob Perl_magic_setglob -#define magic_setisa Perl_magic_setisa -#define magic_setmglob Perl_magic_setmglob -#define magic_setpack Perl_magic_setpack -#define magic_setpos Perl_magic_setpos -#define magic_setsig Perl_magic_setsig -#define magic_setsubstr Perl_magic_setsubstr -#define magic_settaint Perl_magic_settaint -#define magic_setuvar Perl_magic_setuvar -#define magic_setvec Perl_magic_setvec -#define magic_wipepack Perl_magic_wipepack -#define magicname Perl_magicname -#define markstack_grow Perl_markstack_grow -#define mess Perl_mess -#define mg_clear Perl_mg_clear -#define mg_copy Perl_mg_copy -#define mg_find Perl_mg_find -#define mg_free Perl_mg_free -#define mg_get Perl_mg_get -#define mg_len Perl_mg_len -#define mg_magical Perl_mg_magical -#define mg_set Perl_mg_set -#define mod Perl_mod -#define modkids Perl_modkids -#define moreswitches Perl_moreswitches -#define mstats Perl_mstats -#define my Perl_my -#define my_bcopy Perl_my_bcopy -#define my_bzero Perl_my_bzero -#define my_exit Perl_my_exit -#define my_htonl Perl_my_htonl -#define my_lstat Perl_my_lstat -#define my_memcmp Perl_my_memcmp -#define my_ntohl Perl_my_ntohl -#define my_pclose Perl_my_pclose -#define my_popen Perl_my_popen -#define my_setenv Perl_my_setenv -#define my_stat Perl_my_stat -#define my_swap Perl_my_swap -#define my_unexec Perl_my_unexec -#define newANONHASH Perl_newANONHASH -#define newANONLIST Perl_newANONLIST -#define newANONSUB Perl_newANONSUB -#define newASSIGNOP Perl_newASSIGNOP -#define newAV Perl_newAV -#define newAVREF Perl_newAVREF -#define newBINOP Perl_newBINOP -#define newCONDOP Perl_newCONDOP -#define newCVREF Perl_newCVREF -#define newFORM Perl_newFORM -#define newFOROP Perl_newFOROP -#define newGVOP Perl_newGVOP -#define newGVREF Perl_newGVREF -#define newGVgen Perl_newGVgen -#define newHV Perl_newHV -#define newHVREF Perl_newHVREF -#define newIO Perl_newIO -#define newLISTOP Perl_newLISTOP -#define newLOGOP Perl_newLOGOP -#define newLOOPEX Perl_newLOOPEX -#define newLOOPOP Perl_newLOOPOP -#define newNULLLIST Perl_newNULLLIST -#define newOP Perl_newOP -#define newPMOP Perl_newPMOP -#define newPROG Perl_newPROG -#define newPVOP Perl_newPVOP -#define newRANGE Perl_newRANGE -#define newRV Perl_newRV -#define newSLICEOP Perl_newSLICEOP -#define newSTATEOP Perl_newSTATEOP -#define newSUB Perl_newSUB -#define newSV Perl_newSV -#define newSVOP Perl_newSVOP -#define newSVREF Perl_newSVREF -#define newSViv Perl_newSViv -#define newSVnv Perl_newSVnv -#define newSVpv Perl_newSVpv -#define newSVrv Perl_newSVrv -#define newSVsv Perl_newSVsv -#define newUNOP Perl_newUNOP -#define newWHILEOP Perl_newWHILEOP -#define newXS Perl_newXS -#define newXSUB Perl_newXSUB -#define nextargv Perl_nextargv -#define ninstr Perl_ninstr -#define no_fh_allowed Perl_no_fh_allowed -#define no_op Perl_no_op -#define oopsAV Perl_oopsAV -#define oopsCV Perl_oopsCV -#define oopsHV Perl_oopsHV -#define op_free Perl_op_free -#define package Perl_package -#define pad_alloc Perl_pad_alloc -#define pad_allocmy Perl_pad_allocmy -#define pad_findmy Perl_pad_findmy -#define pad_free Perl_pad_free -#define pad_leavemy Perl_pad_leavemy -#define pad_reset Perl_pad_reset -#define pad_sv Perl_pad_sv -#define pad_swipe Perl_pad_swipe -#define peep Perl_peep -#define pidgone Perl_pidgone -#define pmflag Perl_pmflag -#define pmruntime Perl_pmruntime -#define pmtrans Perl_pmtrans -#define pop_return Perl_pop_return -#define pop_scope Perl_pop_scope -#define pp_aassign Perl_pp_aassign -#define pp_abs Perl_pp_abs -#define pp_accept Perl_pp_accept -#define pp_add Perl_pp_add -#define pp_aelem Perl_pp_aelem -#define pp_aelemfast Perl_pp_aelemfast -#define pp_alarm Perl_pp_alarm -#define pp_and Perl_pp_and -#define pp_andassign Perl_pp_andassign -#define pp_anoncode Perl_pp_anoncode -#define pp_anonhash Perl_pp_anonhash -#define pp_anonlist Perl_pp_anonlist -#define pp_aslice Perl_pp_aslice -#define pp_atan2 Perl_pp_atan2 -#define pp_av2arylen Perl_pp_av2arylen -#define pp_backtick Perl_pp_backtick -#define pp_bind Perl_pp_bind -#define pp_binmode Perl_pp_binmode -#define pp_bit_and Perl_pp_bit_and -#define pp_bit_or Perl_pp_bit_or -#define pp_bit_xor Perl_pp_bit_xor -#define pp_bless Perl_pp_bless -#define pp_caller Perl_pp_caller -#define pp_chdir Perl_pp_chdir -#define pp_chmod Perl_pp_chmod -#define pp_chomp Perl_pp_chomp -#define pp_chop Perl_pp_chop -#define pp_chown Perl_pp_chown -#define pp_chr Perl_pp_chr -#define pp_chroot Perl_pp_chroot -#define pp_close Perl_pp_close -#define pp_closedir Perl_pp_closedir -#define pp_complement Perl_pp_complement -#define pp_concat Perl_pp_concat -#define pp_cond_expr Perl_pp_cond_expr -#define pp_connect Perl_pp_connect -#define pp_const Perl_pp_const -#define pp_cos Perl_pp_cos -#define pp_crypt Perl_pp_crypt -#define pp_cswitch Perl_pp_cswitch -#define pp_dbmclose Perl_pp_dbmclose -#define pp_dbmopen Perl_pp_dbmopen -#define pp_dbstate Perl_pp_dbstate -#define pp_defined Perl_pp_defined -#define pp_delete Perl_pp_delete -#define pp_die Perl_pp_die -#define pp_divide Perl_pp_divide -#define pp_dofile Perl_pp_dofile -#define pp_dump Perl_pp_dump -#define pp_each Perl_pp_each -#define pp_egrent Perl_pp_egrent -#define pp_ehostent Perl_pp_ehostent -#define pp_enetent Perl_pp_enetent -#define pp_enter Perl_pp_enter -#define pp_entereval Perl_pp_entereval -#define pp_enteriter Perl_pp_enteriter -#define pp_enterloop Perl_pp_enterloop -#define pp_entersub Perl_pp_entersub -#define pp_entersubr Perl_pp_entersubr -#define pp_entertry Perl_pp_entertry -#define pp_enterwrite Perl_pp_enterwrite -#define pp_eof Perl_pp_eof -#define pp_eprotoent Perl_pp_eprotoent -#define pp_epwent Perl_pp_epwent -#define pp_eq Perl_pp_eq -#define pp_eservent Perl_pp_eservent -#define pp_evalonce Perl_pp_evalonce -#define pp_exec Perl_pp_exec -#define pp_exists Perl_pp_exists -#define pp_exit Perl_pp_exit -#define pp_exp Perl_pp_exp -#define pp_fcntl Perl_pp_fcntl -#define pp_fileno Perl_pp_fileno -#define pp_flip Perl_pp_flip -#define pp_flock Perl_pp_flock -#define pp_flop Perl_pp_flop -#define pp_fork Perl_pp_fork -#define pp_formline Perl_pp_formline -#define pp_ftatime Perl_pp_ftatime -#define pp_ftbinary Perl_pp_ftbinary -#define pp_ftblk Perl_pp_ftblk -#define pp_ftchr Perl_pp_ftchr -#define pp_ftctime Perl_pp_ftctime -#define pp_ftdir Perl_pp_ftdir -#define pp_fteexec Perl_pp_fteexec -#define pp_fteowned Perl_pp_fteowned -#define pp_fteread Perl_pp_fteread -#define pp_ftewrite Perl_pp_ftewrite -#define pp_ftfile Perl_pp_ftfile -#define pp_ftis Perl_pp_ftis -#define pp_ftlink Perl_pp_ftlink -#define pp_ftmtime Perl_pp_ftmtime -#define pp_ftpipe Perl_pp_ftpipe -#define pp_ftrexec Perl_pp_ftrexec -#define pp_ftrowned Perl_pp_ftrowned -#define pp_ftrread Perl_pp_ftrread -#define pp_ftrwrite Perl_pp_ftrwrite -#define pp_ftsgid Perl_pp_ftsgid -#define pp_ftsize Perl_pp_ftsize -#define pp_ftsock Perl_pp_ftsock -#define pp_ftsuid Perl_pp_ftsuid -#define pp_ftsvtx Perl_pp_ftsvtx -#define pp_fttext Perl_pp_fttext -#define pp_fttty Perl_pp_fttty -#define pp_ftzero Perl_pp_ftzero -#define pp_ge Perl_pp_ge -#define pp_gelem Perl_pp_gelem -#define pp_getc Perl_pp_getc -#define pp_getlogin Perl_pp_getlogin -#define pp_getpeername Perl_pp_getpeername -#define pp_getpgrp Perl_pp_getpgrp -#define pp_getppid Perl_pp_getppid -#define pp_getpriority Perl_pp_getpriority -#define pp_getsockname Perl_pp_getsockname -#define pp_ggrent Perl_pp_ggrent -#define pp_ggrgid Perl_pp_ggrgid -#define pp_ggrnam Perl_pp_ggrnam -#define pp_ghbyaddr Perl_pp_ghbyaddr -#define pp_ghbyname Perl_pp_ghbyname -#define pp_ghostent Perl_pp_ghostent -#define pp_glob Perl_pp_glob -#define pp_gmtime Perl_pp_gmtime -#define pp_gnbyaddr Perl_pp_gnbyaddr -#define pp_gnbyname Perl_pp_gnbyname -#define pp_gnetent Perl_pp_gnetent -#define pp_goto Perl_pp_goto -#define pp_gpbyname Perl_pp_gpbyname -#define pp_gpbynumber Perl_pp_gpbynumber -#define pp_gprotoent Perl_pp_gprotoent -#define pp_gpwent Perl_pp_gpwent -#define pp_gpwnam Perl_pp_gpwnam -#define pp_gpwuid Perl_pp_gpwuid -#define pp_grepstart Perl_pp_grepstart -#define pp_grepwhile Perl_pp_grepwhile -#define pp_gsbyname Perl_pp_gsbyname -#define pp_gsbyport Perl_pp_gsbyport -#define pp_gservent Perl_pp_gservent -#define pp_gsockopt Perl_pp_gsockopt -#define pp_gt Perl_pp_gt -#define pp_gv Perl_pp_gv -#define pp_gvsv Perl_pp_gvsv -#define pp_helem Perl_pp_helem -#define pp_hex Perl_pp_hex -#define pp_hslice Perl_pp_hslice -#define pp_i_add Perl_pp_i_add -#define pp_i_divide Perl_pp_i_divide -#define pp_i_eq Perl_pp_i_eq -#define pp_i_ge Perl_pp_i_ge -#define pp_i_gt Perl_pp_i_gt -#define pp_i_le Perl_pp_i_le -#define pp_i_lt Perl_pp_i_lt -#define pp_i_modulo Perl_pp_i_modulo -#define pp_i_multiply Perl_pp_i_multiply -#define pp_i_ncmp Perl_pp_i_ncmp -#define pp_i_ne Perl_pp_i_ne -#define pp_i_negate Perl_pp_i_negate -#define pp_i_subtract Perl_pp_i_subtract -#define pp_index Perl_pp_index -#define pp_indread Perl_pp_indread -#define pp_int Perl_pp_int -#define pp_interp Perl_pp_interp -#define pp_ioctl Perl_pp_ioctl -#define pp_iter Perl_pp_iter -#define pp_join Perl_pp_join -#define pp_keys Perl_pp_keys -#define pp_kill Perl_pp_kill -#define pp_last Perl_pp_last -#define pp_lc Perl_pp_lc -#define pp_lcfirst Perl_pp_lcfirst -#define pp_le Perl_pp_le -#define pp_leave Perl_pp_leave -#define pp_leaveeval Perl_pp_leaveeval -#define pp_leaveloop Perl_pp_leaveloop -#define pp_leavesub Perl_pp_leavesub -#define pp_leavetry Perl_pp_leavetry -#define pp_leavewrite Perl_pp_leavewrite -#define pp_left_shift Perl_pp_left_shift -#define pp_length Perl_pp_length -#define pp_lineseq Perl_pp_lineseq -#define pp_link Perl_pp_link -#define pp_list Perl_pp_list -#define pp_listen Perl_pp_listen -#define pp_localtime Perl_pp_localtime -#define pp_log Perl_pp_log -#define pp_lslice Perl_pp_lslice -#define pp_lstat Perl_pp_lstat -#define pp_lt Perl_pp_lt -#define pp_map Perl_pp_map -#define pp_mapstart Perl_pp_mapstart -#define pp_mapwhile Perl_pp_mapwhile -#define pp_match Perl_pp_match -#define pp_method Perl_pp_method -#define pp_mkdir Perl_pp_mkdir -#define pp_modulo Perl_pp_modulo -#define pp_msgctl Perl_pp_msgctl -#define pp_msgget Perl_pp_msgget -#define pp_msgrcv Perl_pp_msgrcv -#define pp_msgsnd Perl_pp_msgsnd -#define pp_multiply Perl_pp_multiply -#define pp_ncmp Perl_pp_ncmp -#define pp_ne Perl_pp_ne -#define pp_negate Perl_pp_negate -#define pp_next Perl_pp_next -#define pp_nextstate Perl_pp_nextstate -#define pp_not Perl_pp_not -#define pp_nswitch Perl_pp_nswitch -#define pp_null Perl_pp_null -#define pp_oct Perl_pp_oct -#define pp_open Perl_pp_open -#define pp_open_dir Perl_pp_open_dir -#define pp_or Perl_pp_or -#define pp_orassign Perl_pp_orassign -#define pp_ord Perl_pp_ord -#define pp_pack Perl_pp_pack -#define pp_padany Perl_pp_padany -#define pp_padav Perl_pp_padav -#define pp_padhv Perl_pp_padhv -#define pp_padsv Perl_pp_padsv -#define pp_pipe_op Perl_pp_pipe_op -#define pp_pop Perl_pp_pop -#define pp_pos Perl_pp_pos -#define pp_postdec Perl_pp_postdec -#define pp_postinc Perl_pp_postinc -#define pp_pow Perl_pp_pow -#define pp_predec Perl_pp_predec -#define pp_preinc Perl_pp_preinc -#define pp_print Perl_pp_print -#define pp_prototype Perl_pp_prototype -#define pp_prtf Perl_pp_prtf -#define pp_push Perl_pp_push -#define pp_pushmark Perl_pp_pushmark -#define pp_pushre Perl_pp_pushre -#define pp_quotemeta Perl_pp_quotemeta -#define pp_rand Perl_pp_rand -#define pp_range Perl_pp_range -#define pp_rcatline Perl_pp_rcatline -#define pp_read Perl_pp_read -#define pp_readdir Perl_pp_readdir -#define pp_readline Perl_pp_readline -#define pp_readlink Perl_pp_readlink -#define pp_recv Perl_pp_recv -#define pp_redo Perl_pp_redo -#define pp_ref Perl_pp_ref -#define pp_refgen Perl_pp_refgen -#define pp_regcmaybe Perl_pp_regcmaybe -#define pp_regcomp Perl_pp_regcomp -#define pp_rename Perl_pp_rename -#define pp_repeat Perl_pp_repeat -#define pp_require Perl_pp_require -#define pp_reset Perl_pp_reset -#define pp_return Perl_pp_return -#define pp_reverse Perl_pp_reverse -#define pp_rewinddir Perl_pp_rewinddir -#define pp_right_shift Perl_pp_right_shift -#define pp_rindex Perl_pp_rindex -#define pp_rmdir Perl_pp_rmdir -#define pp_rv2av Perl_pp_rv2av -#define pp_rv2cv Perl_pp_rv2cv -#define pp_rv2gv Perl_pp_rv2gv -#define pp_rv2hv Perl_pp_rv2hv -#define pp_rv2sv Perl_pp_rv2sv -#define pp_sassign Perl_pp_sassign -#define pp_scalar Perl_pp_scalar -#define pp_schomp Perl_pp_schomp -#define pp_schop Perl_pp_schop -#define pp_scmp Perl_pp_scmp -#define pp_scope Perl_pp_scope -#define pp_seek Perl_pp_seek -#define pp_seekdir Perl_pp_seekdir -#define pp_select Perl_pp_select -#define pp_semctl Perl_pp_semctl -#define pp_semget Perl_pp_semget -#define pp_semop Perl_pp_semop -#define pp_send Perl_pp_send -#define pp_seq Perl_pp_seq -#define pp_setpgrp Perl_pp_setpgrp -#define pp_setpriority Perl_pp_setpriority -#define pp_sge Perl_pp_sge -#define pp_sgrent Perl_pp_sgrent -#define pp_sgt Perl_pp_sgt -#define pp_shift Perl_pp_shift -#define pp_shmctl Perl_pp_shmctl -#define pp_shmget Perl_pp_shmget -#define pp_shmread Perl_pp_shmread -#define pp_shmwrite Perl_pp_shmwrite -#define pp_shostent Perl_pp_shostent -#define pp_shutdown Perl_pp_shutdown -#define pp_sin Perl_pp_sin -#define pp_sle Perl_pp_sle -#define pp_sleep Perl_pp_sleep -#define pp_slt Perl_pp_slt -#define pp_sne Perl_pp_sne -#define pp_snetent Perl_pp_snetent -#define pp_socket Perl_pp_socket -#define pp_sockpair Perl_pp_sockpair -#define pp_sort Perl_pp_sort -#define pp_splice Perl_pp_splice -#define pp_split Perl_pp_split -#define pp_sprintf Perl_pp_sprintf -#define pp_sprotoent Perl_pp_sprotoent -#define pp_spwent Perl_pp_spwent -#define pp_sqrt Perl_pp_sqrt -#define pp_srand Perl_pp_srand -#define pp_srefgen Perl_pp_srefgen -#define pp_sselect Perl_pp_sselect -#define pp_sservent Perl_pp_sservent -#define pp_ssockopt Perl_pp_ssockopt -#define pp_stat Perl_pp_stat -#define pp_stringify Perl_pp_stringify -#define pp_stub Perl_pp_stub -#define pp_study Perl_pp_study -#define pp_subst Perl_pp_subst -#define pp_substcont Perl_pp_substcont -#define pp_substr Perl_pp_substr -#define pp_subtract Perl_pp_subtract -#define pp_symlink Perl_pp_symlink -#define pp_syscall Perl_pp_syscall -#define pp_sysopen Perl_pp_sysopen -#define pp_sysread Perl_pp_sysread -#define pp_system Perl_pp_system -#define pp_syswrite Perl_pp_syswrite -#define pp_tell Perl_pp_tell -#define pp_telldir Perl_pp_telldir -#define pp_tie Perl_pp_tie -#define pp_tied Perl_pp_tied -#define pp_time Perl_pp_time -#define pp_tms Perl_pp_tms -#define pp_trans Perl_pp_trans -#define pp_truncate Perl_pp_truncate -#define pp_uc Perl_pp_uc -#define pp_ucfirst Perl_pp_ucfirst -#define pp_umask Perl_pp_umask -#define pp_undef Perl_pp_undef -#define pp_unlink Perl_pp_unlink -#define pp_unpack Perl_pp_unpack -#define pp_unshift Perl_pp_unshift -#define pp_unstack Perl_pp_unstack -#define pp_untie Perl_pp_untie -#define pp_utime Perl_pp_utime -#define pp_values Perl_pp_values -#define pp_vec Perl_pp_vec -#define pp_wait Perl_pp_wait -#define pp_waitpid Perl_pp_waitpid -#define pp_wantarray Perl_pp_wantarray -#define pp_warn Perl_pp_warn -#define pp_xor Perl_pp_xor -#define pregcomp Perl_pregcomp -#define pregexec Perl_pregexec -#define pregfree Perl_pregfree -#define prepend_elem Perl_prepend_elem -#define push_return Perl_push_return -#define push_scope Perl_push_scope -#define q Perl_q -#define ref Perl_ref -#define refkids Perl_refkids -#define regdump Perl_regdump -#define regnext Perl_regnext -#define regprop Perl_regprop -#define repeatcpy Perl_repeatcpy -#define rninstr Perl_rninstr -#define runops Perl_runops -#define same_dirent Perl_same_dirent -#define save_I32 Perl_save_I32 -#define save_aptr Perl_save_aptr -#define save_ary Perl_save_ary -#define save_clearsv Perl_save_clearsv -#define save_delete Perl_save_delete -#define save_destructor Perl_save_destructor -#define save_freeop Perl_save_freeop -#define save_freepv Perl_save_freepv -#define save_freesv Perl_save_freesv -#define save_hash Perl_save_hash -#define save_hptr Perl_save_hptr -#define save_int Perl_save_int -#define save_item Perl_save_item -#define save_list Perl_save_list -#define save_long Perl_save_long -#define save_nogv Perl_save_nogv -#define save_pptr Perl_save_pptr -#define save_scalar Perl_save_scalar -#define save_sptr Perl_save_sptr -#define save_svref Perl_save_svref -#define savepv Perl_savepv -#define savepvn Perl_savepvn -#define savestack_grow Perl_savestack_grow -#define sawparens Perl_sawparens -#define scalar Perl_scalar -#define scalarkids Perl_scalarkids -#define scalarseq Perl_scalarseq -#define scalarvoid Perl_scalarvoid -#define scan_const Perl_scan_const -#define scan_formline Perl_scan_formline -#define scan_heredoc Perl_scan_heredoc -#define scan_hex Perl_scan_hex -#define scan_ident Perl_scan_ident +#define magic_freedefelem Perl_magic_freedefelem +#define magic_get Perl_magic_get +#define magic_getarylen Perl_magic_getarylen +#define magic_getdefelem Perl_magic_getdefelem +#define magic_getglob Perl_magic_getglob +#define magic_getpack Perl_magic_getpack +#define magic_getpos Perl_magic_getpos +#define magic_getsig Perl_magic_getsig +#define magic_gettaint Perl_magic_gettaint +#define magic_getuvar Perl_magic_getuvar +#define magic_len Perl_magic_len +#define magic_nextpack Perl_magic_nextpack +#define magic_set Perl_magic_set +#define magic_setamagic Perl_magic_setamagic +#define magic_setarylen Perl_magic_setarylen +#define magic_setbm Perl_magic_setbm +#define magic_setcollxfrm Perl_magic_setcollxfrm +#define magic_setdbline Perl_magic_setdbline +#define magic_setdefelem Perl_magic_setdefelem +#define magic_setenv Perl_magic_setenv +#define magic_setfm Perl_magic_setfm +#define magic_setglob Perl_magic_setglob +#define magic_setisa Perl_magic_setisa +#define magic_setmglob Perl_magic_setmglob +#define magic_setnkeys Perl_magic_setnkeys +#define magic_setpack Perl_magic_setpack +#define magic_setpos Perl_magic_setpos +#define magic_setsig Perl_magic_setsig +#define magic_setsubstr Perl_magic_setsubstr +#define magic_settaint Perl_magic_settaint +#define magic_setuvar Perl_magic_setuvar +#define magic_setvec Perl_magic_setvec +#define magic_wipepack Perl_magic_wipepack +#define magicname Perl_magicname +#define markstack Perl_markstack +#define markstack_grow Perl_markstack_grow +#define markstack_max Perl_markstack_max +#define markstack_ptr Perl_markstack_ptr +#define max_intro_pending Perl_max_intro_pending +#define maxo Perl_maxo +#define mem_collxfrm Perl_mem_collxfrm +#define mess Perl_mess +#define mg_clear Perl_mg_clear +#define mg_copy Perl_mg_copy +#define mg_find Perl_mg_find +#define mg_free Perl_mg_free +#define mg_get Perl_mg_get +#define mg_len Perl_mg_len +#define mg_magical Perl_mg_magical +#define mg_set Perl_mg_set +#define min_intro_pending Perl_min_intro_pending +#define mod Perl_mod +#define mod_amg Perl_mod_amg +#define mod_ass_amg Perl_mod_ass_amg +#define modkids Perl_modkids +#define moreswitches Perl_moreswitches +#define mstats Perl_mstats +#define mult_amg Perl_mult_amg +#define mult_ass_amg Perl_mult_ass_amg +#define multi_close Perl_multi_close +#define multi_end Perl_multi_end +#define multi_open Perl_multi_open +#define multi_start Perl_multi_start +#define my Perl_my +#define my_bcopy Perl_my_bcopy +#define my_bzero Perl_my_bzero +#define my_chsize Perl_my_chsize +#define my_exit Perl_my_exit +#define my_failure_exit Perl_my_failure_exit +#define my_htonl Perl_my_htonl +#define my_lstat Perl_my_lstat +#define my_memcmp Perl_my_memcmp +#define my_memset Perl_my_memset +#define my_ntohl Perl_my_ntohl +#define my_pclose Perl_my_pclose +#define my_popen Perl_my_popen +#define my_setenv Perl_my_setenv +#define my_stat Perl_my_stat +#define my_swap Perl_my_swap +#define my_unexec Perl_my_unexec +#define na Perl_na +#define ncmp_amg Perl_ncmp_amg +#define ne_amg Perl_ne_amg +#define neg_amg Perl_neg_amg +#define newANONHASH Perl_newANONHASH +#define newANONLIST Perl_newANONLIST +#define newANONSUB Perl_newANONSUB +#define newASSIGNOP Perl_newASSIGNOP +#define newAV Perl_newAV +#define newAVREF Perl_newAVREF +#define newBINOP Perl_newBINOP +#define newCONDOP Perl_newCONDOP +#define newCVREF Perl_newCVREF +#define newFORM Perl_newFORM +#define newFOROP Perl_newFOROP +#define newGVOP Perl_newGVOP +#define newGVREF Perl_newGVREF +#define newGVgen Perl_newGVgen +#define newHV Perl_newHV +#define newHVREF Perl_newHVREF +#define newIO Perl_newIO +#define newLISTOP Perl_newLISTOP +#define newLOGOP Perl_newLOGOP +#define newLOOPEX Perl_newLOOPEX +#define newLOOPOP Perl_newLOOPOP +#define newNULLLIST Perl_newNULLLIST +#define newOP Perl_newOP +#define newPMOP Perl_newPMOP +#define newPROG Perl_newPROG +#define newPVOP Perl_newPVOP +#define newRANGE Perl_newRANGE +#define newRV Perl_newRV +#define newSLICEOP Perl_newSLICEOP +#define newSTATEOP Perl_newSTATEOP +#define newSUB Perl_newSUB +#define newSV Perl_newSV +#define newSVOP Perl_newSVOP +#define newSVREF Perl_newSVREF +#define newSViv Perl_newSViv +#define newSVnv Perl_newSVnv +#define newSVpv Perl_newSVpv +#define newSVpvf Perl_newSVpvf +#define newSVrv Perl_newSVrv +#define newSVsv Perl_newSVsv +#define newUNOP Perl_newUNOP +#define newWHILEOP Perl_newWHILEOP +#define newXS Perl_newXS +#define newXSUB Perl_newXSUB +#define nextargv Perl_nextargv +#define nexttoke Perl_nexttoke +#define nexttype Perl_nexttype +#define nextval Perl_nextval +#define ninstr Perl_ninstr +#define no_aelem Perl_no_aelem +#define no_dir_func Perl_no_dir_func +#define no_fh_allowed Perl_no_fh_allowed +#define no_func Perl_no_func +#define no_helem Perl_no_helem +#define no_mem Perl_no_mem +#define no_modify Perl_no_modify +#define no_op Perl_no_op +#define no_security Perl_no_security +#define no_sock_func Perl_no_sock_func +#define no_usym Perl_no_usym +#define nointrp Perl_nointrp +#define nomem Perl_nomem +#define nomemok Perl_nomemok +#define nomethod_amg Perl_nomethod_amg +#define not_amg Perl_not_amg +#define numer_amg Perl_numer_amg +#define numeric_local Perl_numeric_local +#define numeric_name Perl_numeric_name +#define numeric_standard Perl_numeric_standard +#define oldbufptr Perl_oldbufptr +#define oldoldbufptr Perl_oldoldbufptr +#define oopsAV Perl_oopsAV +#define oopsCV Perl_oopsCV +#define oopsHV Perl_oopsHV +#define op Perl_op +#define op_desc Perl_op_desc +#define op_free Perl_op_free +#define op_name Perl_op_name +#define op_seqmax Perl_op_seqmax +#define opargs Perl_opargs +#define origalen Perl_origalen +#define origenviron Perl_origenviron +#define osname Perl_osname +#define package Perl_package +#define pad_alloc Perl_pad_alloc +#define pad_allocmy Perl_pad_allocmy +#define pad_findmy Perl_pad_findmy +#define pad_free Perl_pad_free +#define pad_leavemy Perl_pad_leavemy +#define pad_reset Perl_pad_reset +#define pad_sv Perl_pad_sv +#define pad_swipe Perl_pad_swipe +#define padix Perl_padix +#define patleave Perl_patleave +#define peep Perl_peep +#define pidgone Perl_pidgone +#define pidstatus Perl_pidstatus +#define pmflag Perl_pmflag +#define pmruntime Perl_pmruntime +#define pmtrans Perl_pmtrans +#define pop_return Perl_pop_return +#define pop_scope Perl_pop_scope +#define pow_amg Perl_pow_amg +#define pow_ass_amg Perl_pow_ass_amg +#define pp_aassign Perl_pp_aassign +#define pp_abs Perl_pp_abs +#define pp_accept Perl_pp_accept +#define pp_add Perl_pp_add +#define pp_aelem Perl_pp_aelem +#define pp_aelemfast Perl_pp_aelemfast +#define pp_alarm Perl_pp_alarm +#define pp_and Perl_pp_and +#define pp_andassign Perl_pp_andassign +#define pp_anoncode Perl_pp_anoncode +#define pp_anonhash Perl_pp_anonhash +#define pp_anonlist Perl_pp_anonlist +#define pp_aslice Perl_pp_aslice +#define pp_atan2 Perl_pp_atan2 +#define pp_av2arylen Perl_pp_av2arylen +#define pp_backtick Perl_pp_backtick +#define pp_bind Perl_pp_bind +#define pp_binmode Perl_pp_binmode +#define pp_bit_and Perl_pp_bit_and +#define pp_bit_or Perl_pp_bit_or +#define pp_bit_xor Perl_pp_bit_xor +#define pp_bless Perl_pp_bless +#define pp_caller Perl_pp_caller +#define pp_chdir Perl_pp_chdir +#define pp_chmod Perl_pp_chmod +#define pp_chomp Perl_pp_chomp +#define pp_chop Perl_pp_chop +#define pp_chown Perl_pp_chown +#define pp_chr Perl_pp_chr +#define pp_chroot Perl_pp_chroot +#define pp_close Perl_pp_close +#define pp_closedir Perl_pp_closedir +#define pp_complement Perl_pp_complement +#define pp_concat Perl_pp_concat +#define pp_cond_expr Perl_pp_cond_expr +#define pp_connect Perl_pp_connect +#define pp_const Perl_pp_const +#define pp_cos Perl_pp_cos +#define pp_crypt Perl_pp_crypt +#define pp_cswitch Perl_pp_cswitch +#define pp_dbmclose Perl_pp_dbmclose +#define pp_dbmopen Perl_pp_dbmopen +#define pp_dbstate Perl_pp_dbstate +#define pp_defined Perl_pp_defined +#define pp_delete Perl_pp_delete +#define pp_die Perl_pp_die +#define pp_divide Perl_pp_divide +#define pp_dofile Perl_pp_dofile +#define pp_dump Perl_pp_dump +#define pp_each Perl_pp_each +#define pp_egrent Perl_pp_egrent +#define pp_ehostent Perl_pp_ehostent +#define pp_enetent Perl_pp_enetent +#define pp_enter Perl_pp_enter +#define pp_entereval Perl_pp_entereval +#define pp_enteriter Perl_pp_enteriter +#define pp_enterloop Perl_pp_enterloop +#define pp_entersub Perl_pp_entersub +#define pp_entersubr Perl_pp_entersubr +#define pp_entertry Perl_pp_entertry +#define pp_enterwrite Perl_pp_enterwrite +#define pp_eof Perl_pp_eof +#define pp_eprotoent Perl_pp_eprotoent +#define pp_epwent Perl_pp_epwent +#define pp_eq Perl_pp_eq +#define pp_eservent Perl_pp_eservent +#define pp_evalonce Perl_pp_evalonce +#define pp_exec Perl_pp_exec +#define pp_exists Perl_pp_exists +#define pp_exit Perl_pp_exit +#define pp_exp Perl_pp_exp +#define pp_fcntl Perl_pp_fcntl +#define pp_fileno Perl_pp_fileno +#define pp_flip Perl_pp_flip +#define pp_flock Perl_pp_flock +#define pp_flop Perl_pp_flop +#define pp_fork Perl_pp_fork +#define pp_formline Perl_pp_formline +#define pp_ftatime Perl_pp_ftatime +#define pp_ftbinary Perl_pp_ftbinary +#define pp_ftblk Perl_pp_ftblk +#define pp_ftchr Perl_pp_ftchr +#define pp_ftctime Perl_pp_ftctime +#define pp_ftdir Perl_pp_ftdir +#define pp_fteexec Perl_pp_fteexec +#define pp_fteowned Perl_pp_fteowned +#define pp_fteread Perl_pp_fteread +#define pp_ftewrite Perl_pp_ftewrite +#define pp_ftfile Perl_pp_ftfile +#define pp_ftis Perl_pp_ftis +#define pp_ftlink Perl_pp_ftlink +#define pp_ftmtime Perl_pp_ftmtime +#define pp_ftpipe Perl_pp_ftpipe +#define pp_ftrexec Perl_pp_ftrexec +#define pp_ftrowned Perl_pp_ftrowned +#define pp_ftrread Perl_pp_ftrread +#define pp_ftrwrite Perl_pp_ftrwrite +#define pp_ftsgid Perl_pp_ftsgid +#define pp_ftsize Perl_pp_ftsize +#define pp_ftsock Perl_pp_ftsock +#define pp_ftsuid Perl_pp_ftsuid +#define pp_ftsvtx Perl_pp_ftsvtx +#define pp_fttext Perl_pp_fttext +#define pp_fttty Perl_pp_fttty +#define pp_ftzero Perl_pp_ftzero +#define pp_ge Perl_pp_ge +#define pp_gelem Perl_pp_gelem +#define pp_getc Perl_pp_getc +#define pp_getlogin Perl_pp_getlogin +#define pp_getpeername Perl_pp_getpeername +#define pp_getpgrp Perl_pp_getpgrp +#define pp_getppid Perl_pp_getppid +#define pp_getpriority Perl_pp_getpriority +#define pp_getsockname Perl_pp_getsockname +#define pp_ggrent Perl_pp_ggrent +#define pp_ggrgid Perl_pp_ggrgid +#define pp_ggrnam Perl_pp_ggrnam +#define pp_ghbyaddr Perl_pp_ghbyaddr +#define pp_ghbyname Perl_pp_ghbyname +#define pp_ghostent Perl_pp_ghostent +#define pp_glob Perl_pp_glob +#define pp_gmtime Perl_pp_gmtime +#define pp_gnbyaddr Perl_pp_gnbyaddr +#define pp_gnbyname Perl_pp_gnbyname +#define pp_gnetent Perl_pp_gnetent +#define pp_goto Perl_pp_goto +#define pp_gpbyname Perl_pp_gpbyname +#define pp_gpbynumber Perl_pp_gpbynumber +#define pp_gprotoent Perl_pp_gprotoent +#define pp_gpwent Perl_pp_gpwent +#define pp_gpwnam Perl_pp_gpwnam +#define pp_gpwuid Perl_pp_gpwuid +#define pp_grepstart Perl_pp_grepstart +#define pp_grepwhile Perl_pp_grepwhile +#define pp_gsbyname Perl_pp_gsbyname +#define pp_gsbyport Perl_pp_gsbyport +#define pp_gservent Perl_pp_gservent +#define pp_gsockopt Perl_pp_gsockopt +#define pp_gt Perl_pp_gt +#define pp_gv Perl_pp_gv +#define pp_gvsv Perl_pp_gvsv +#define pp_helem Perl_pp_helem +#define pp_hex Perl_pp_hex +#define pp_hslice Perl_pp_hslice +#define pp_i_add Perl_pp_i_add +#define pp_i_divide Perl_pp_i_divide +#define pp_i_eq Perl_pp_i_eq +#define pp_i_ge Perl_pp_i_ge +#define pp_i_gt Perl_pp_i_gt +#define pp_i_le Perl_pp_i_le +#define pp_i_lt Perl_pp_i_lt +#define pp_i_modulo Perl_pp_i_modulo +#define pp_i_multiply Perl_pp_i_multiply +#define pp_i_ncmp Perl_pp_i_ncmp +#define pp_i_ne Perl_pp_i_ne +#define pp_i_negate Perl_pp_i_negate +#define pp_i_subtract Perl_pp_i_subtract +#define pp_index Perl_pp_index +#define pp_indread Perl_pp_indread +#define pp_int Perl_pp_int +#define pp_interp Perl_pp_interp +#define pp_ioctl Perl_pp_ioctl +#define pp_iter Perl_pp_iter +#define pp_join Perl_pp_join +#define pp_keys Perl_pp_keys +#define pp_kill Perl_pp_kill +#define pp_last Perl_pp_last +#define pp_lc Perl_pp_lc +#define pp_lcfirst Perl_pp_lcfirst +#define pp_le Perl_pp_le +#define pp_leave Perl_pp_leave +#define pp_leaveeval Perl_pp_leaveeval +#define pp_leaveloop Perl_pp_leaveloop +#define pp_leavesub Perl_pp_leavesub +#define pp_leavetry Perl_pp_leavetry +#define pp_leavewrite Perl_pp_leavewrite +#define pp_left_shift Perl_pp_left_shift +#define pp_length Perl_pp_length +#define pp_lineseq Perl_pp_lineseq +#define pp_link Perl_pp_link +#define pp_list Perl_pp_list +#define pp_listen Perl_pp_listen +#define pp_localtime Perl_pp_localtime +#define pp_log Perl_pp_log +#define pp_lslice Perl_pp_lslice +#define pp_lstat Perl_pp_lstat +#define pp_lt Perl_pp_lt +#define pp_map Perl_pp_map +#define pp_mapstart Perl_pp_mapstart +#define pp_mapwhile Perl_pp_mapwhile +#define pp_match Perl_pp_match +#define pp_method Perl_pp_method +#define pp_mkdir Perl_pp_mkdir +#define pp_modulo Perl_pp_modulo +#define pp_msgctl Perl_pp_msgctl +#define pp_msgget Perl_pp_msgget +#define pp_msgrcv Perl_pp_msgrcv +#define pp_msgsnd Perl_pp_msgsnd +#define pp_multiply Perl_pp_multiply +#define pp_ncmp Perl_pp_ncmp +#define pp_ne Perl_pp_ne +#define pp_negate Perl_pp_negate +#define pp_next Perl_pp_next +#define pp_nextstate Perl_pp_nextstate +#define pp_not Perl_pp_not +#define pp_nswitch Perl_pp_nswitch +#define pp_null Perl_pp_null +#define pp_oct Perl_pp_oct +#define pp_open Perl_pp_open +#define pp_open_dir Perl_pp_open_dir +#define pp_or Perl_pp_or +#define pp_orassign Perl_pp_orassign +#define pp_ord Perl_pp_ord +#define pp_pack Perl_pp_pack +#define pp_padany Perl_pp_padany +#define pp_padav Perl_pp_padav +#define pp_padhv Perl_pp_padhv +#define pp_padsv Perl_pp_padsv +#define pp_pipe_op Perl_pp_pipe_op +#define pp_pop Perl_pp_pop +#define pp_pos Perl_pp_pos +#define pp_postdec Perl_pp_postdec +#define pp_postinc Perl_pp_postinc +#define pp_pow Perl_pp_pow +#define pp_predec Perl_pp_predec +#define pp_preinc Perl_pp_preinc +#define pp_print Perl_pp_print +#define pp_prototype Perl_pp_prototype +#define pp_prtf Perl_pp_prtf +#define pp_push Perl_pp_push +#define pp_pushmark Perl_pp_pushmark +#define pp_pushre Perl_pp_pushre +#define pp_quotemeta Perl_pp_quotemeta +#define pp_rand Perl_pp_rand +#define pp_range Perl_pp_range +#define pp_rcatline Perl_pp_rcatline +#define pp_read Perl_pp_read +#define pp_readdir Perl_pp_readdir +#define pp_readline Perl_pp_readline +#define pp_readlink Perl_pp_readlink +#define pp_recv Perl_pp_recv +#define pp_redo Perl_pp_redo +#define pp_ref Perl_pp_ref +#define pp_refgen Perl_pp_refgen +#define pp_regcmaybe Perl_pp_regcmaybe +#define pp_regcomp Perl_pp_regcomp +#define pp_rename Perl_pp_rename +#define pp_repeat Perl_pp_repeat +#define pp_require Perl_pp_require +#define pp_reset Perl_pp_reset +#define pp_return Perl_pp_return +#define pp_reverse Perl_pp_reverse +#define pp_rewinddir Perl_pp_rewinddir +#define pp_right_shift Perl_pp_right_shift +#define pp_rindex Perl_pp_rindex +#define pp_rmdir Perl_pp_rmdir +#define pp_rv2av Perl_pp_rv2av +#define pp_rv2cv Perl_pp_rv2cv +#define pp_rv2gv Perl_pp_rv2gv +#define pp_rv2hv Perl_pp_rv2hv +#define pp_rv2sv Perl_pp_rv2sv +#define pp_sassign Perl_pp_sassign +#define pp_scalar Perl_pp_scalar +#define pp_schomp Perl_pp_schomp +#define pp_schop Perl_pp_schop +#define pp_scmp Perl_pp_scmp +#define pp_scope Perl_pp_scope +#define pp_seek Perl_pp_seek +#define pp_seekdir Perl_pp_seekdir +#define pp_select Perl_pp_select +#define pp_semctl Perl_pp_semctl +#define pp_semget Perl_pp_semget +#define pp_semop Perl_pp_semop +#define pp_send Perl_pp_send +#define pp_seq Perl_pp_seq +#define pp_setpgrp Perl_pp_setpgrp +#define pp_setpriority Perl_pp_setpriority +#define pp_sge Perl_pp_sge +#define pp_sgrent Perl_pp_sgrent +#define pp_sgt Perl_pp_sgt +#define pp_shift Perl_pp_shift +#define pp_shmctl Perl_pp_shmctl +#define pp_shmget Perl_pp_shmget +#define pp_shmread Perl_pp_shmread +#define pp_shmwrite Perl_pp_shmwrite +#define pp_shostent Perl_pp_shostent +#define pp_shutdown Perl_pp_shutdown +#define pp_sin Perl_pp_sin +#define pp_sle Perl_pp_sle +#define pp_sleep Perl_pp_sleep +#define pp_slt Perl_pp_slt +#define pp_sne Perl_pp_sne +#define pp_snetent Perl_pp_snetent +#define pp_socket Perl_pp_socket +#define pp_sockpair Perl_pp_sockpair +#define pp_sort Perl_pp_sort +#define pp_splice Perl_pp_splice +#define pp_split Perl_pp_split +#define pp_sprintf Perl_pp_sprintf +#define pp_sprotoent Perl_pp_sprotoent +#define pp_spwent Perl_pp_spwent +#define pp_sqrt Perl_pp_sqrt +#define pp_srand Perl_pp_srand +#define pp_srefgen Perl_pp_srefgen +#define pp_sselect Perl_pp_sselect +#define pp_sservent Perl_pp_sservent +#define pp_ssockopt Perl_pp_ssockopt +#define pp_stat Perl_pp_stat +#define pp_stringify Perl_pp_stringify +#define pp_stub Perl_pp_stub +#define pp_study Perl_pp_study +#define pp_subst Perl_pp_subst +#define pp_substcont Perl_pp_substcont +#define pp_substr Perl_pp_substr +#define pp_subtract Perl_pp_subtract +#define pp_symlink Perl_pp_symlink +#define pp_syscall Perl_pp_syscall +#define pp_sysopen Perl_pp_sysopen +#define pp_sysread Perl_pp_sysread +#define pp_sysseek Perl_pp_sysseek +#define pp_system Perl_pp_system +#define pp_syswrite Perl_pp_syswrite +#define pp_tell Perl_pp_tell +#define pp_telldir Perl_pp_telldir +#define pp_tie Perl_pp_tie +#define pp_tied Perl_pp_tied +#define pp_time Perl_pp_time +#define pp_tms Perl_pp_tms +#define pp_trans Perl_pp_trans +#define pp_truncate Perl_pp_truncate +#define pp_uc Perl_pp_uc +#define pp_ucfirst Perl_pp_ucfirst +#define pp_umask Perl_pp_umask +#define pp_undef Perl_pp_undef +#define pp_unlink Perl_pp_unlink +#define pp_unpack Perl_pp_unpack +#define pp_unshift Perl_pp_unshift +#define pp_unstack Perl_pp_unstack +#define pp_untie Perl_pp_untie +#define pp_utime Perl_pp_utime +#define pp_values Perl_pp_values +#define pp_vec Perl_pp_vec +#define pp_wait Perl_pp_wait +#define pp_waitpid Perl_pp_waitpid +#define pp_wantarray Perl_pp_wantarray +#define pp_warn Perl_pp_warn +#define pp_xor Perl_pp_xor +#define ppaddr Perl_ppaddr +#define pregcomp Perl_pregcomp +#define pregexec Perl_pregexec +#define pregfree Perl_pregfree +#define prepend_elem Perl_prepend_elem +#define profiledata Perl_profiledata +#define psig_name Perl_psig_name +#define psig_ptr Perl_psig_ptr +#define push_return Perl_push_return +#define push_scope Perl_push_scope +#define q Perl_q +#define rcsid Perl_rcsid +#define reall_srchlen Perl_reall_srchlen +#define ref Perl_ref +#define refkids Perl_refkids +#define regarglen Perl_regarglen +#define regbol Perl_regbol +#define regcode Perl_regcode +#define regdummy Perl_regdummy +#define regdump Perl_regdump +#define regendp Perl_regendp +#define regeol Perl_regeol +#define reginput Perl_reginput +#define regkind Perl_regkind +#define reglastparen Perl_reglastparen +#define regmyendp Perl_regmyendp +#define regmyp_size Perl_regmyp_size +#define regmystartp Perl_regmystartp +#define regnarrate Perl_regnarrate +#define regnaughty Perl_regnaughty +#define regnext Perl_regnext +#define regnpar Perl_regnpar +#define regparse Perl_regparse +#define regprecomp Perl_regprecomp +#define regprev Perl_regprev +#define regprop Perl_regprop +#define regsawback Perl_regsawback +#define regsize Perl_regsize +#define regstartp Perl_regstartp +#define regtill Perl_regtill +#define regxend Perl_regxend +#define repeat_amg Perl_repeat_amg +#define repeat_ass_amg Perl_repeat_ass_amg +#define repeatcpy Perl_repeatcpy +#define retstack Perl_retstack +#define retstack_ix Perl_retstack_ix +#define retstack_max Perl_retstack_max +#define rninstr Perl_rninstr +#define rsfp Perl_rsfp +#define rsfp_filters Perl_rsfp_filters +#define rshift_amg Perl_rshift_amg +#define rshift_ass_amg Perl_rshift_ass_amg +#define rsignal Perl_rsignal +#define rsignal_restore Perl_rsignal_restore +#define rsignal_save Perl_rsignal_save +#define rsignal_state Perl_rsignal_state +#define runops Perl_runops +#define rxres_free Perl_rxres_free +#define rxres_restore Perl_rxres_restore +#define rxres_save Perl_rxres_save +#define same_dirent Perl_same_dirent +#define save_I16 Perl_save_I16 +#define save_I32 Perl_save_I32 +#define save_aptr Perl_save_aptr +#define save_ary Perl_save_ary +#define save_clearsv Perl_save_clearsv +#define save_delete Perl_save_delete +#define save_destructor Perl_save_destructor +#define save_freeop Perl_save_freeop +#define save_freepv Perl_save_freepv +#define save_freesv Perl_save_freesv +#define save_gp Perl_save_gp +#define save_hash Perl_save_hash +#define save_hptr Perl_save_hptr +#define save_int Perl_save_int +#define save_item Perl_save_item +#define save_list Perl_save_list +#define save_long Perl_save_long +#define save_nogv Perl_save_nogv +#define save_pptr Perl_save_pptr +#define save_scalar Perl_save_scalar +#define save_sptr Perl_save_sptr +#define save_svref Perl_save_svref +#define savepv Perl_savepv +#define savepvn Perl_savepvn +#define savestack Perl_savestack +#define savestack_grow Perl_savestack_grow +#define savestack_ix Perl_savestack_ix +#define savestack_max Perl_savestack_max +#define saw_return Perl_saw_return +#define sawparens Perl_sawparens +#define scalar Perl_scalar +#define scalarkids Perl_scalarkids +#define scalarseq Perl_scalarseq +#define scalarvoid Perl_scalarvoid +#define scan_const Perl_scan_const +#define scan_formline Perl_scan_formline +#define scan_heredoc Perl_scan_heredoc +#define scan_hex Perl_scan_hex +#define scan_ident Perl_scan_ident #define scan_inputsymbol Perl_scan_inputsymbol -#define scan_num Perl_scan_num -#define scan_oct Perl_scan_oct -#define scan_pat Perl_scan_pat -#define scan_prefix Perl_scan_prefix -#define scan_str Perl_scan_str -#define scan_subst Perl_scan_subst -#define scan_trans Perl_scan_trans -#define scan_word Perl_scan_word -#define scope Perl_scope -#define screaminstr Perl_screaminstr -#define setdefout Perl_setdefout -#define setenv_getix Perl_setenv_getix -#define sighandler Perl_sighandler -#define skipspace Perl_skipspace -#define stack_grow Perl_stack_grow -#define start_subparse Perl_start_subparse -#define sublex_done Perl_sublex_done -#define sublex_start Perl_sublex_start -#define sv_2bool Perl_sv_2bool -#define sv_2cv Perl_sv_2cv -#define sv_2io Perl_sv_2io -#define sv_2iv Perl_sv_2iv -#define sv_2mortal Perl_sv_2mortal -#define sv_2nv Perl_sv_2nv -#define sv_2pv Perl_sv_2pv -#define sv_add_arena Perl_sv_add_arena -#define sv_backoff Perl_sv_backoff -#define sv_bless Perl_sv_bless -#define sv_catpv Perl_sv_catpv -#define sv_catpvn Perl_sv_catpvn -#define sv_catsv Perl_sv_catsv -#define sv_chop Perl_sv_chop -#define sv_clean_all Perl_sv_clean_all -#define sv_clean_objs Perl_sv_clean_objs -#define sv_clear Perl_sv_clear -#define sv_cmp Perl_sv_cmp -#define sv_dec Perl_sv_dec -#define sv_dump Perl_sv_dump -#define sv_eq Perl_sv_eq -#define sv_free Perl_sv_free -#define sv_free_arenas Perl_sv_free_arenas -#define sv_gets Perl_sv_gets -#define sv_grow Perl_sv_grow -#define sv_inc Perl_sv_inc -#define sv_insert Perl_sv_insert -#define sv_isa Perl_sv_isa -#define sv_isobject Perl_sv_isobject -#define sv_len Perl_sv_len -#define sv_magic Perl_sv_magic -#define sv_mortalcopy Perl_sv_mortalcopy -#define sv_newmortal Perl_sv_newmortal -#define sv_newref Perl_sv_newref -#define sv_peek Perl_sv_peek -#define sv_pvn_force Perl_sv_pvn_force -#define sv_ref Perl_sv_ref -#define sv_reftype Perl_sv_reftype -#define sv_replace Perl_sv_replace -#define sv_report_used Perl_sv_report_used -#define sv_reset Perl_sv_reset -#define sv_setiv Perl_sv_setiv -#define sv_setnv Perl_sv_setnv -#define sv_setptrobj Perl_sv_setptrobj -#define sv_setpv Perl_sv_setpv -#define sv_setpvn Perl_sv_setpvn -#define sv_setref_iv Perl_sv_setref_iv -#define sv_setref_nv Perl_sv_setref_nv -#define sv_setref_pv Perl_sv_setref_pv -#define sv_setref_pvn Perl_sv_setref_pvn -#define sv_setsv Perl_sv_setsv -#define sv_unmagic Perl_sv_unmagic -#define sv_unref Perl_sv_unref -#define sv_upgrade Perl_sv_upgrade -#define sv_usepvn Perl_sv_usepvn -#define taint_env Perl_taint_env -#define taint_not Perl_taint_not -#define taint_proper Perl_taint_proper +#define scan_num Perl_scan_num +#define scan_oct Perl_scan_oct +#define scan_pat Perl_scan_pat +#define scan_prefix Perl_scan_prefix +#define scan_str Perl_scan_str +#define scan_subst Perl_scan_subst +#define scan_trans Perl_scan_trans +#define scan_word Perl_scan_word +#define scmp_amg Perl_scmp_amg +#define scope Perl_scope +#define scopestack Perl_scopestack +#define scopestack_ix Perl_scopestack_ix +#define scopestack_max Perl_scopestack_max +#define screaminstr Perl_screaminstr +#define scrgv Perl_scrgv +#define seq_amg Perl_seq_amg +#define setdefout Perl_setdefout +#define setenv_getix Perl_setenv_getix +#define sge_amg Perl_sge_amg +#define sgt_amg Perl_sgt_amg +#define sh_path Perl_sh_path +#define share_hek Perl_share_hek +#define sharepvn Perl_sharepvn +#define sig_name Perl_sig_name +#define sig_num Perl_sig_num +#define sighandler Perl_sighandler +#define simple Perl_simple +#define sin_amg Perl_sin_amg +#define skipspace Perl_skipspace +#define sle_amg Perl_sle_amg +#define slt_amg Perl_slt_amg +#define sne_amg Perl_sne_amg +#define sqrt_amg Perl_sqrt_amg +#define stack_base Perl_stack_base +#define stack_grow Perl_stack_grow +#define stack_max Perl_stack_max +#define stack_sp Perl_stack_sp +#define start_subparse Perl_start_subparse +#define statbuf Perl_statbuf +#define string_amg Perl_string_amg +#define sub_crush_depth Perl_sub_crush_depth +#define sub_generation Perl_sub_generation +#define subline Perl_subline +#define subname Perl_subname +#define subtr_amg Perl_subtr_amg +#define subtr_ass_amg Perl_subtr_ass_amg +#define sv_2bool Perl_sv_2bool +#define sv_2cv Perl_sv_2cv +#define sv_2io Perl_sv_2io +#define sv_2iv Perl_sv_2iv +#define sv_2mortal Perl_sv_2mortal +#define sv_2nv Perl_sv_2nv +#define sv_2pv Perl_sv_2pv +#define sv_2uv Perl_sv_2uv +#define sv_add_arena Perl_sv_add_arena +#define sv_backoff Perl_sv_backoff +#define sv_bless Perl_sv_bless +#define sv_catpv Perl_sv_catpv +#define sv_catpvf Perl_sv_catpvf +#define sv_catpvn Perl_sv_catpvn +#define sv_catsv Perl_sv_catsv +#define sv_chop Perl_sv_chop +#define sv_clean_all Perl_sv_clean_all +#define sv_clean_objs Perl_sv_clean_objs +#define sv_clear Perl_sv_clear +#define sv_cmp Perl_sv_cmp +#define sv_cmp_locale Perl_sv_cmp_locale +#define sv_collxfrm Perl_sv_collxfrm +#define sv_dec Perl_sv_dec +#define sv_derived_from Perl_sv_derived_from +#define sv_dump Perl_sv_dump +#define sv_eq Perl_sv_eq +#define sv_free Perl_sv_free +#define sv_free_arenas Perl_sv_free_arenas +#define sv_gets Perl_sv_gets +#define sv_grow Perl_sv_grow +#define sv_inc Perl_sv_inc +#define sv_insert Perl_sv_insert +#define sv_isa Perl_sv_isa +#define sv_isobject Perl_sv_isobject +#define sv_len Perl_sv_len +#define sv_magic Perl_sv_magic +#define sv_mortalcopy Perl_sv_mortalcopy +#define sv_newmortal Perl_sv_newmortal +#define sv_newref Perl_sv_newref +#define sv_no Perl_sv_no +#define sv_peek Perl_sv_peek +#define sv_pvn_force Perl_sv_pvn_force +#define sv_ref Perl_sv_ref +#define sv_reftype Perl_sv_reftype +#define sv_replace Perl_sv_replace +#define sv_report_used Perl_sv_report_used +#define sv_reset Perl_sv_reset +#define sv_setiv Perl_sv_setiv +#define sv_setnv Perl_sv_setnv +#define sv_setptrobj Perl_sv_setptrobj +#define sv_setpv Perl_sv_setpv +#define sv_setpvf Perl_sv_setpvf +#define sv_setpvn Perl_sv_setpvn +#define sv_setref_iv Perl_sv_setref_iv +#define sv_setref_nv Perl_sv_setref_nv +#define sv_setref_pv Perl_sv_setref_pv +#define sv_setref_pvn Perl_sv_setref_pvn +#define sv_setsv Perl_sv_setsv +#define sv_setuv Perl_sv_setuv +#define sv_taint Perl_sv_taint +#define sv_tainted Perl_sv_tainted +#define sv_undef Perl_sv_undef +#define sv_unmagic Perl_sv_unmagic +#define sv_unref Perl_sv_unref +#define sv_untaint Perl_sv_untaint +#define sv_upgrade Perl_sv_upgrade +#define sv_usepvn Perl_sv_usepvn +#define sv_vcatpvfn Perl_sv_vcatpvfn +#define sv_vsetpvfn Perl_sv_vsetpvfn +#define sv_yes Perl_sv_yes +#define taint_env Perl_taint_env +#define taint_proper Perl_taint_proper +#define thisexpr Perl_thisexpr +#define timesbuf Perl_timesbuf +#define tokenbuf Perl_tokenbuf #define too_few_arguments Perl_too_few_arguments #define too_many_arguments Perl_too_many_arguments -#define unlnk Perl_unlnk -#define utilize Perl_utilize -#define wait4pid Perl_wait4pid -#define warn Perl_warn -#define watch Perl_watch -#define whichsig Perl_whichsig -#define xiv_arenaroot Perl_xiv_arenaroot -#define xiv_root Perl_xiv_root -#define xnv_root Perl_xnv_root -#define xpv_root Perl_xpv_root -#define xrv_root Perl_xrv_root -#define yyerror Perl_yyerror -#define yylex Perl_yylex -#define yyparse Perl_yyparse -#define yywarn Perl_yywarn +#define uid Perl_uid +#define unlnk Perl_unlnk +#define unshare_hek Perl_unshare_hek +#define unsharepvn Perl_unsharepvn +#define utilize Perl_utilize +#define varies Perl_varies +#define vert Perl_vert +#define vivify_defelem Perl_vivify_defelem +#define vivify_ref Perl_vivify_ref +#define vtbl_amagic Perl_vtbl_amagic +#define vtbl_amagicelem Perl_vtbl_amagicelem +#define vtbl_arylen Perl_vtbl_arylen +#define vtbl_bm Perl_vtbl_bm +#define vtbl_collxfrm Perl_vtbl_collxfrm +#define vtbl_dbline Perl_vtbl_dbline +#define vtbl_defelem Perl_vtbl_defelem +#define vtbl_env Perl_vtbl_env +#define vtbl_envelem Perl_vtbl_envelem +#define vtbl_fm Perl_vtbl_fm +#define vtbl_glob Perl_vtbl_glob +#define vtbl_isa Perl_vtbl_isa +#define vtbl_isaelem Perl_vtbl_isaelem +#define vtbl_mglob Perl_vtbl_mglob +#define vtbl_nkeys Perl_vtbl_nkeys +#define vtbl_pack Perl_vtbl_pack +#define vtbl_packelem Perl_vtbl_packelem +#define vtbl_pos Perl_vtbl_pos +#define vtbl_sig Perl_vtbl_sig +#define vtbl_sigelem Perl_vtbl_sigelem +#define vtbl_substr Perl_vtbl_substr +#define vtbl_sv Perl_vtbl_sv +#define vtbl_taint Perl_vtbl_taint +#define vtbl_uvar Perl_vtbl_uvar +#define vtbl_vec Perl_vtbl_vec +#define wait4pid Perl_wait4pid +#define warn Perl_warn +#define warn_nl Perl_warn_nl +#define warn_nosemi Perl_warn_nosemi +#define warn_reserved Perl_warn_reserved +#define watch Perl_watch +#define watchaddr Perl_watchaddr +#define watchok Perl_watchok +#define whichsig Perl_whichsig +#define xiv_arenaroot Perl_xiv_arenaroot +#define xiv_root Perl_xiv_root +#define xnv_root Perl_xnv_root +#define xpv_root Perl_xpv_root +#define xrv_root Perl_xrv_root +#define yychar Perl_yychar +#define yycheck Perl_yycheck +#define yydebug Perl_yydebug +#define yydefred Perl_yydefred +#define yydgoto Perl_yydgoto +#define yyerrflag Perl_yyerrflag +#define yyerror Perl_yyerror +#define yygindex Perl_yygindex +#define yylen Perl_yylen +#define yylex Perl_yylex +#define yylhs Perl_yylhs +#define yylval Perl_yylval +#define yyname Perl_yyname +#define yynerrs Perl_yynerrs +#define yyparse Perl_yyparse +#define yyrindex Perl_yyrindex +#define yyrule Perl_yyrule +#define yysindex Perl_yysindex +#define yytable Perl_yytable +#define yyval Perl_yyval +#define yywarn Perl_yywarn + +/* Hide global symbols that 5.003 revealed? */ + +#ifndef BINCOMPAT3 + +#define Error Perl_Error +#define SvIV Perl_SvIV +#define SvNV Perl_SvNV +#define SvTRUE Perl_SvTRUE +#define SvUV Perl_SvUV +#define block_type Perl_block_type +#define boot_core_UNIVERSAL Perl_boot_core_UNIVERSAL +#define comppad_name_floor Perl_comppad_name_floor +#define debug Perl_debug +#define do_undump Perl_do_undump +#define nice_chunk Perl_nice_chunk +#define nice_chunk_size Perl_nice_chunk_size +#define no_myglob Perl_no_myglob +#define no_symref Perl_no_symref +#define no_wrongref Perl_no_wrongref +#define pad_reset_pending Perl_pad_reset_pending +#define padix_floor Perl_padix_floor +#define regflags Perl_regflags +#define safecalloc Perl_safecalloc +#define safefree Perl_safefree +#define safemalloc Perl_safemalloc +#define saferealloc Perl_saferealloc +#define safexcalloc Perl_safexcalloc +#define safexfree Perl_safexfree +#define safexmalloc Perl_safexmalloc +#define safexrealloc Perl_safexrealloc +#define save_iv Perl_save_iv +#define sv_pvn Perl_sv_pvn +#define warn_uninit Perl_warn_uninit +#define yydestruct Perl_yydestruct + +#endif /* !BINCOMPAT3 */ #endif /* EMBED */ @@@ -1183,475 -1084,310 +1196,478 @@@ #ifdef MULTIPLICITY -#define Argv (curinterp->IArgv) -#define Cmd (curinterp->ICmd) -#define DBgv (curinterp->IDBgv) -#define DBline (curinterp->IDBline) -#define DBsignal (curinterp->IDBsignal) -#define DBsingle (curinterp->IDBsingle) -#define DBsub (curinterp->IDBsub) -#define DBtrace (curinterp->IDBtrace) -#define allgvs (curinterp->Iallgvs) -#define ampergv (curinterp->Iampergv) -#define argvgv (curinterp->Iargvgv) -#define argvoutgv (curinterp->Iargvoutgv) -#define basetime (curinterp->Ibasetime) -#define beginav (curinterp->Ibeginav) -#define bodytarget (curinterp->Ibodytarget) -#define cddir (curinterp->Icddir) -#define chopset (curinterp->Ichopset) -#define copline (curinterp->Icopline) -#define curblock (curinterp->Icurblock) -#define curcop (curinterp->Icurcop) -#define curcsv (curinterp->Icurcsv) -#define curpm (curinterp->Icurpm) -#define curstash (curinterp->Icurstash) -#define curstname (curinterp->Icurstname) -#define cxstack (curinterp->Icxstack) -#define cxstack_ix (curinterp->Icxstack_ix) -#define cxstack_max (curinterp->Icxstack_max) -#define dbargs (curinterp->Idbargs) -#define debdelim (curinterp->Idebdelim) -#define debname (curinterp->Idebname) -#define debstash (curinterp->Idebstash) -#define debug (curinterp->Idebug) -#define defgv (curinterp->Idefgv) -#define defoutgv (curinterp->Idefoutgv) -#define defstash (curinterp->Idefstash) -#define delaymagic (curinterp->Idelaymagic) -#define diehook (curinterp->Idiehook) -#define dirty (curinterp->Idirty) -#define dlevel (curinterp->Idlevel) -#define dlmax (curinterp->Idlmax) -#define do_undump (curinterp->Ido_undump) -#define doextract (curinterp->Idoextract) -#define doswitches (curinterp->Idoswitches) -#define dowarn (curinterp->Idowarn) -#define dumplvl (curinterp->Idumplvl) -#define e_fp (curinterp->Ie_fp) -#define e_tmpname (curinterp->Ie_tmpname) -#define endav (curinterp->Iendav) -#define envgv (curinterp->Ienvgv) -#define errgv (curinterp->Ierrgv) -#define eval_root (curinterp->Ieval_root) -#define eval_start (curinterp->Ieval_start) -#define fdpid (curinterp->Ifdpid) -#define filemode (curinterp->Ifilemode) -#define firstgv (curinterp->Ifirstgv) -#define forkprocess (curinterp->Iforkprocess) -#define formfeed (curinterp->Iformfeed) -#define formtarget (curinterp->Iformtarget) -#define gensym (curinterp->Igensym) -#define in_eval (curinterp->Iin_eval) -#define incgv (curinterp->Iincgv) -#define inplace (curinterp->Iinplace) -#define last_in_gv (curinterp->Ilast_in_gv) -#define lastfd (curinterp->Ilastfd) -#define lastretstr (curinterp->Ilastretstr) -#define lastscream (curinterp->Ilastscream) -#define lastsize (curinterp->Ilastsize) -#define lastspbase (curinterp->Ilastspbase) -#define laststatval (curinterp->Ilaststatval) -#define laststype (curinterp->Ilaststype) -#define leftgv (curinterp->Ileftgv) -#define lineary (curinterp->Ilineary) -#define localizing (curinterp->Ilocalizing) -#define main_cv (curinterp->Imain_cv) -#define main_root (curinterp->Imain_root) -#define main_start (curinterp->Imain_start) -#define mainstack (curinterp->Imainstack) -#define maxscream (curinterp->Imaxscream) -#define maxsysfd (curinterp->Imaxsysfd) -#define minus_F (curinterp->Iminus_F) -#define minus_a (curinterp->Iminus_a) -#define minus_c (curinterp->Iminus_c) -#define minus_l (curinterp->Iminus_l) -#define minus_n (curinterp->Iminus_n) -#define minus_p (curinterp->Iminus_p) -#define multiline (curinterp->Imultiline) -#define mystack_base (curinterp->Imystack_base) -#define mystack_mark (curinterp->Imystack_mark) -#define mystack_max (curinterp->Imystack_max) -#define mystack_sp (curinterp->Imystack_sp) -#define mystrk (curinterp->Imystrk) -#define nrs (curinterp->Inrs) -#define ofmt (curinterp->Iofmt) -#define ofs (curinterp->Iofs) -#define ofslen (curinterp->Iofslen) -#define oldlastpm (curinterp->Ioldlastpm) -#define oldname (curinterp->Ioldname) -#define op_mask (curinterp->Iop_mask) -#define origargc (curinterp->Iorigargc) -#define origargv (curinterp->Iorigargv) -#define origfilename (curinterp->Iorigfilename) -#define ors (curinterp->Iors) -#define orslen (curinterp->Iorslen) -#define pad (curinterp->Ipad) -#define padname (curinterp->Ipadname) -#define parsehook (curinterp->Iparsehook) -#define patchlevel (curinterp->Ipatchlevel) -#define perldb (curinterp->Iperldb) +#define Argv (curinterp->IArgv) +#define Cmd (curinterp->ICmd) +#define DBgv (curinterp->IDBgv) +#define DBline (curinterp->IDBline) +#define DBsignal (curinterp->IDBsignal) +#define DBsingle (curinterp->IDBsingle) +#define DBsub (curinterp->IDBsub) +#define DBtrace (curinterp->IDBtrace) +#define allgvs (curinterp->Iallgvs) +#define ampergv (curinterp->Iampergv) +#define argvgv (curinterp->Iargvgv) +#define argvoutgv (curinterp->Iargvoutgv) +#define basetime (curinterp->Ibasetime) +#define beginav (curinterp->Ibeginav) +#define bodytarget (curinterp->Ibodytarget) +#define cddir (curinterp->Icddir) +#define chopset (curinterp->Ichopset) +#define copline (curinterp->Icopline) +#define curblock (curinterp->Icurblock) +#define curcop (curinterp->Icurcop) +#define curcopdb (curinterp->Icurcopdb) +#define curcsv (curinterp->Icurcsv) +#define curpm (curinterp->Icurpm) +#define curstack (curinterp->Icurstack) +#define curstash (curinterp->Icurstash) +#define curstname (curinterp->Icurstname) +#define cxstack (curinterp->Icxstack) +#define cxstack_ix (curinterp->Icxstack_ix) +#define cxstack_max (curinterp->Icxstack_max) +#define dbargs (curinterp->Idbargs) +#define debdelim (curinterp->Idebdelim) +#define debname (curinterp->Idebname) +#define debstash (curinterp->Idebstash) +#define defgv (curinterp->Idefgv) +#define defoutgv (curinterp->Idefoutgv) +#define defstash (curinterp->Idefstash) +#define delaymagic (curinterp->Idelaymagic) +#define diehook (curinterp->Idiehook) +#define dirty (curinterp->Idirty) +#define dlevel (curinterp->Idlevel) +#define dlmax (curinterp->Idlmax) +#define doextract (curinterp->Idoextract) +#define doswitches (curinterp->Idoswitches) +#define dowarn (curinterp->Idowarn) +#define dumplvl (curinterp->Idumplvl) +#define e_fp (curinterp->Ie_fp) +#define e_tmpname (curinterp->Ie_tmpname) +#define endav (curinterp->Iendav) +#define envgv (curinterp->Ienvgv) +#define errgv (curinterp->Ierrgv) +#define eval_root (curinterp->Ieval_root) +#define eval_start (curinterp->Ieval_start) +#define fdpid (curinterp->Ifdpid) +#define filemode (curinterp->Ifilemode) +#define firstgv (curinterp->Ifirstgv) +#define forkprocess (curinterp->Iforkprocess) +#define formfeed (curinterp->Iformfeed) +#define formtarget (curinterp->Iformtarget) +#define gensym (curinterp->Igensym) +#define in_eval (curinterp->Iin_eval) +#define incgv (curinterp->Iincgv) +#define inplace (curinterp->Iinplace) +#define last_in_gv (curinterp->Ilast_in_gv) +#define lastfd (curinterp->Ilastfd) +#define lastretstr (curinterp->Ilastretstr) +#define lastscream (curinterp->Ilastscream) +#define lastsize (curinterp->Ilastsize) +#define lastspbase (curinterp->Ilastspbase) +#define laststatval (curinterp->Ilaststatval) +#define laststype (curinterp->Ilaststype) +#define leftgv (curinterp->Ileftgv) +#define lineary (curinterp->Ilineary) +#define localizing (curinterp->Ilocalizing) +#define localpatches (curinterp->Ilocalpatches) +#define main_cv (curinterp->Imain_cv) +#define main_root (curinterp->Imain_root) +#define main_start (curinterp->Imain_start) +#define mainstack (curinterp->Imainstack) +#define maxscream (curinterp->Imaxscream) +#define maxsysfd (curinterp->Imaxsysfd) +#define mess_sv (curinterp->Imess_sv) +#define minus_F (curinterp->Iminus_F) +#define minus_a (curinterp->Iminus_a) +#define minus_c (curinterp->Iminus_c) +#define minus_l (curinterp->Iminus_l) +#define minus_n (curinterp->Iminus_n) +#define minus_p (curinterp->Iminus_p) +#define multiline (curinterp->Imultiline) +#define mystack_base (curinterp->Imystack_base) +#define mystack_mark (curinterp->Imystack_mark) +#define mystack_max (curinterp->Imystack_max) +#define mystack_sp (curinterp->Imystack_sp) +#define mystrk (curinterp->Imystrk) +#define nrs (curinterp->Inrs) +#define ofmt (curinterp->Iofmt) +#define ofs (curinterp->Iofs) +#define ofslen (curinterp->Iofslen) +#define oldlastpm (curinterp->Ioldlastpm) +#define oldname (curinterp->Ioldname) +#define op_mask (curinterp->Iop_mask) +#define origargc (curinterp->Iorigargc) +#define origargv (curinterp->Iorigargv) +#define origfilename (curinterp->Iorigfilename) +#define ors (curinterp->Iors) +#define orslen (curinterp->Iorslen) +#define parsehook (curinterp->Iparsehook) +#define patchlevel (curinterp->Ipatchlevel) #define perl_destruct_level (curinterp->Iperl_destruct_level) -#define pidstatus (curinterp->Ipidstatus) -#define preambled (curinterp->Ipreambled) -#define preambleav (curinterp->Ipreambleav) -#define preprocess (curinterp->Ipreprocess) -#define restartop (curinterp->Irestartop) -#define rightgv (curinterp->Irightgv) -#define rs (curinterp->Irs) -#define runlevel (curinterp->Irunlevel) -#define sawampersand (curinterp->Isawampersand) -#define sawi (curinterp->Isawi) -#define sawstudy (curinterp->Isawstudy) -#define sawvec (curinterp->Isawvec) -#define screamfirst (curinterp->Iscreamfirst) -#define screamnext (curinterp->Iscreamnext) -#define secondgv (curinterp->Isecondgv) -#define siggv (curinterp->Isiggv) -#define signalstack (curinterp->Isignalstack) -#define sortcop (curinterp->Isortcop) -#define sortstack (curinterp->Isortstack) -#define sortstash (curinterp->Isortstash) -#define splitstr (curinterp->Isplitstr) -#define stack (curinterp->Istack) -#define statcache (curinterp->Istatcache) -#define statgv (curinterp->Istatgv) -#define statname (curinterp->Istatname) -#define statusvalue (curinterp->Istatusvalue) -#define stdingv (curinterp->Istdingv) -#define strchop (curinterp->Istrchop) -#define sv_count (curinterp->Isv_count) -#define sv_objcount (curinterp->Isv_objcount) -#define sv_root (curinterp->Isv_root) -#define sv_arenaroot (curinterp->Isv_arenaroot) -#define tainted (curinterp->Itainted) -#define tainting (curinterp->Itainting) -#define tmps_floor (curinterp->Itmps_floor) -#define tmps_ix (curinterp->Itmps_ix) -#define tmps_max (curinterp->Itmps_max) -#define tmps_stack (curinterp->Itmps_stack) -#define top_env (curinterp->Itop_env) -#define toptarget (curinterp->Itoptarget) -#define unsafe (curinterp->Iunsafe) -#define warnhook (curinterp->Iwarnhook) +#define perldb (curinterp->Iperldb) +#define preambleav (curinterp->Ipreambleav) +#define preambled (curinterp->Ipreambled) +#define preprocess (curinterp->Ipreprocess) ++#define restartav (curinterp->Irestartav) +#define restartop (curinterp->Irestartop) +#define rightgv (curinterp->Irightgv) +#define rs (curinterp->Irs) +#define runlevel (curinterp->Irunlevel) +#define sawampersand (curinterp->Isawampersand) +#define sawstudy (curinterp->Isawstudy) +#define sawvec (curinterp->Isawvec) +#define screamfirst (curinterp->Iscreamfirst) +#define screamnext (curinterp->Iscreamnext) +#define secondgv (curinterp->Isecondgv) +#define siggv (curinterp->Isiggv) +#define signalstack (curinterp->Isignalstack) +#define sortcop (curinterp->Isortcop) +#define sortstack (curinterp->Isortstack) +#define sortstash (curinterp->Isortstash) +#define splitstr (curinterp->Isplitstr) +#define start_env (curinterp->Istart_env) +#define statcache (curinterp->Istatcache) +#define statgv (curinterp->Istatgv) +#define statname (curinterp->Istatname) +#define statusvalue (curinterp->Istatusvalue) +#define statusvalue_vms (curinterp->Istatusvalue_vms) +#define stdingv (curinterp->Istdingv) +#define strchop (curinterp->Istrchop) +#define strtab (curinterp->Istrtab) +#define sv_arenaroot (curinterp->Isv_arenaroot) +#define sv_count (curinterp->Isv_count) +#define sv_objcount (curinterp->Isv_objcount) +#define sv_root (curinterp->Isv_root) +#define tainted (curinterp->Itainted) +#define tainting (curinterp->Itainting) +#define tmps_floor (curinterp->Itmps_floor) +#define tmps_ix (curinterp->Itmps_ix) +#define tmps_max (curinterp->Itmps_max) +#define tmps_stack (curinterp->Itmps_stack) +#define top_env (curinterp->Itop_env) +#define toptarget (curinterp->Itoptarget) +#define unsafe (curinterp->Iunsafe) +#define warnhook (curinterp->Iwarnhook) -#else /* not multiple, so translate interpreter symbols the other way... */ +#else /* !MULTIPLICITY */ -#define IArgv Argv -#define ICmd Cmd -#define IDBgv DBgv -#define IDBline DBline -#define IDBsignal DBsignal -#define IDBsingle DBsingle -#define IDBsub DBsub -#define IDBtrace DBtrace -#define Iallgvs allgvs -#define Iampergv ampergv -#define Iargvgv argvgv -#define Iargvoutgv argvoutgv -#define Ibasetime basetime -#define Ibeginav beginav -#define Ibodytarget bodytarget -#define Icddir cddir -#define Ichopset chopset -#define Icopline copline -#define Icurblock curblock -#define Icurcop curcop -#define Icurcsv curcsv -#define Icurpm curpm -#define Icurstash curstash -#define Icurstname curstname -#define Icxstack cxstack -#define Icxstack_ix cxstack_ix -#define Icxstack_max cxstack_max -#define Idbargs dbargs -#define Idebdelim debdelim -#define Idebname debname -#define Idebstash debstash -#define Idebug debug -#define Idefgv defgv -#define Idefoutgv defoutgv -#define Idefstash defstash -#define Idelaymagic delaymagic -#define Idiehook diehook -#define Idirty dirty -#define Idlevel dlevel -#define Idlmax dlmax -#define Ido_undump do_undump -#define Idoextract doextract -#define Idoswitches doswitches -#define Idowarn dowarn -#define Idumplvl dumplvl -#define Ie_fp e_fp -#define Ie_tmpname e_tmpname -#define Iendav endav -#define Ienvgv envgv -#define Ierrgv errgv -#define Ieval_root eval_root -#define Ieval_start eval_start -#define Ifdpid fdpid -#define Ifilemode filemode -#define Ifirstgv firstgv -#define Iforkprocess forkprocess -#define Iformfeed formfeed -#define Iformtarget formtarget -#define Igensym gensym -#define Iin_eval in_eval -#define Iincgv incgv -#define Iinplace inplace -#define Ilast_in_gv last_in_gv -#define Ilastfd lastfd -#define Ilastretstr lastretstr -#define Ilastscream lastscream -#define Ilastsize lastsize -#define Ilastspbase lastspbase -#define Ilaststatval laststatval -#define Ilaststype laststype -#define Ileftgv leftgv -#define Ilineary lineary -#define Ilocalizing localizing -#define Imain_cv main_cv -#define Imain_root main_root -#define Imain_start main_start -#define Imainstack mainstack -#define Imaxscream maxscream -#define Imaxsysfd maxsysfd -#define Iminus_F minus_F -#define Iminus_a minus_a -#define Iminus_c minus_c -#define Iminus_l minus_l -#define Iminus_n minus_n -#define Iminus_p minus_p -#define Imultiline multiline -#define Imystack_base mystack_base -#define Imystack_mark mystack_mark -#define Imystack_max mystack_max -#define Imystack_sp mystack_sp -#define Imystrk mystrk -#define Inrs nrs -#define Iofmt ofmt -#define Iofs ofs -#define Iofslen ofslen -#define Ioldlastpm oldlastpm -#define Ioldname oldname -#define Iop_mask op_mask -#define Iorigargc origargc -#define Iorigargv origargv -#define Iorigfilename origfilename -#define Iors ors -#define Iorslen orslen -#define Ipad pad -#define Ipadname padname -#define Iparsehook parsehook -#define Ipatchlevel patchlevel -#define Iperldb perldb +#define IArgv Argv +#define ICmd Cmd +#define IDBgv DBgv +#define IDBline DBline +#define IDBsignal DBsignal +#define IDBsingle DBsingle +#define IDBsub DBsub +#define IDBtrace DBtrace +#define Iallgvs allgvs +#define Iampergv ampergv +#define Iargvgv argvgv +#define Iargvoutgv argvoutgv +#define Ibasetime basetime +#define Ibeginav beginav +#define Ibodytarget bodytarget +#define Icddir cddir +#define Ichopset chopset +#define Icopline copline +#define Icurblock curblock +#define Icurcop curcop +#define Icurcopdb curcopdb +#define Icurcsv curcsv +#define Icurpm curpm +#define Icurstack curstack +#define Icurstash curstash +#define Icurstname curstname +#define Icxstack cxstack +#define Icxstack_ix cxstack_ix +#define Icxstack_max cxstack_max +#define Idbargs dbargs +#define Idebdelim debdelim +#define Idebname debname +#define Idebstash debstash +#define Idefgv defgv +#define Idefoutgv defoutgv +#define Idefstash defstash +#define Idelaymagic delaymagic +#define Idiehook diehook +#define Idirty dirty +#define Idlevel dlevel +#define Idlmax dlmax +#define Idoextract doextract +#define Idoswitches doswitches +#define Idowarn dowarn +#define Idumplvl dumplvl +#define Ie_fp e_fp +#define Ie_tmpname e_tmpname +#define Iendav endav +#define Ienvgv envgv +#define Ierrgv errgv +#define Ieval_root eval_root +#define Ieval_start eval_start +#define Ifdpid fdpid +#define Ifilemode filemode +#define Ifirstgv firstgv +#define Iforkprocess forkprocess +#define Iformfeed formfeed +#define Iformtarget formtarget +#define Igensym gensym +#define Iin_eval in_eval +#define Iincgv incgv +#define Iinplace inplace +#define Ilast_in_gv last_in_gv +#define Ilastfd lastfd +#define Ilastretstr lastretstr +#define Ilastscream lastscream +#define Ilastsize lastsize +#define Ilastspbase lastspbase +#define Ilaststatval laststatval +#define Ilaststype laststype +#define Ileftgv leftgv +#define Ilineary lineary +#define Ilocalizing localizing +#define Ilocalpatches localpatches +#define Imain_cv main_cv +#define Imain_root main_root +#define Imain_start main_start +#define Imainstack mainstack +#define Imaxscream maxscream +#define Imaxsysfd maxsysfd +#define Imess_sv mess_sv +#define Iminus_F minus_F +#define Iminus_a minus_a +#define Iminus_c minus_c +#define Iminus_l minus_l +#define Iminus_n minus_n +#define Iminus_p minus_p +#define Imultiline multiline +#define Imystack_base mystack_base +#define Imystack_mark mystack_mark +#define Imystack_max mystack_max +#define Imystack_sp mystack_sp +#define Imystrk mystrk +#define Inrs nrs +#define Iofmt ofmt +#define Iofs ofs +#define Iofslen ofslen +#define Ioldlastpm oldlastpm +#define Ioldname oldname +#define Iop_mask op_mask +#define Iorigargc origargc +#define Iorigargv origargv +#define Iorigfilename origfilename +#define Iors ors +#define Iorslen orslen +#define Iparsehook parsehook +#define Ipatchlevel patchlevel #define Iperl_destruct_level perl_destruct_level -#define Ipidstatus pidstatus -#define Ipreambled preambled -#define Ipreambleav preambleav -#define Ipreprocess preprocess -#define Irestartop restartop -#define Irightgv rightgv -#define Irs rs -#define Irunlevel runlevel -#define Isawampersand sawampersand -#define Isawi sawi -#define Isawstudy sawstudy -#define Isawvec sawvec -#define Iscreamfirst screamfirst -#define Iscreamnext screamnext -#define Isecondgv secondgv -#define Isiggv siggv -#define Isignalstack signalstack -#define Isortcop sortcop -#define Isortstack sortstack -#define Isortstash sortstash -#define Isplitstr splitstr -#define Istack stack -#define Istatcache statcache -#define Istatgv statgv -#define Istatname statname -#define Istatusvalue statusvalue -#define Istdingv stdingv -#define Istrchop strchop -#define Isv_count sv_count -#define Isv_objcount sv_objcount -#define Isv_root sv_root -#define Isv_arenaroot sv_arenaroot -#define Itainted tainted -#define Itainting tainting -#define Itmps_floor tmps_floor -#define Itmps_ix tmps_ix -#define Itmps_max tmps_max -#define Itmps_stack tmps_stack -#define Itop_env top_env -#define Itoptarget toptarget -#define Iunsafe unsafe -#define Iwarnhook warnhook +#define Iperldb perldb +#define Ipreambleav preambleav +#define Ipreambled preambled +#define Ipreprocess preprocess ++#define Irestartav restartav +#define Irestartop restartop +#define Irightgv rightgv +#define Irs rs +#define Irunlevel runlevel +#define Isawampersand sawampersand +#define Isawstudy sawstudy +#define Isawvec sawvec +#define Iscreamfirst screamfirst +#define Iscreamnext screamnext +#define Isecondgv secondgv +#define Isiggv siggv +#define Isignalstack signalstack +#define Isortcop sortcop +#define Isortstack sortstack +#define Isortstash sortstash +#define Isplitstr splitstr +#define Istart_env start_env +#define Istatcache statcache +#define Istatgv statgv +#define Istatname statname +#define Istatusvalue statusvalue +#define Istatusvalue_vms statusvalue_vms +#define Istdingv stdingv +#define Istrchop strchop +#define Istrtab strtab +#define Isv_arenaroot sv_arenaroot +#define Isv_count sv_count +#define Isv_objcount sv_objcount +#define Isv_root sv_root +#define Itainted tainted +#define Itainting tainting +#define Itmps_floor tmps_floor +#define Itmps_ix tmps_ix +#define Itmps_max tmps_max +#define Itmps_stack tmps_stack +#define Itop_env top_env +#define Itoptarget toptarget +#define Iunsafe unsafe +#define Iwarnhook warnhook + +/* Hide interpreter-specific symbols? */ + +#ifdef EMBED + +#define curcop Perl_curcop +#define curcopdb Perl_curcopdb +#define envgv Perl_envgv +#define siggv Perl_siggv +#define tainting Perl_tainting + +/* Hide interpreter symbols that 5.003 revealed? */ + +#ifndef BINCOMPAT3 + +#define Argv Perl_Argv +#define Cmd Perl_Cmd +#define DBgv Perl_DBgv +#define DBline Perl_DBline +#define DBsignal Perl_DBsignal +#define DBsingle Perl_DBsingle +#define DBsub Perl_DBsub +#define DBtrace Perl_DBtrace +#define allgvs Perl_allgvs +#define ampergv Perl_ampergv +#define argvgv Perl_argvgv +#define argvoutgv Perl_argvoutgv +#define basetime Perl_basetime +#define beginav Perl_beginav +#define bodytarget Perl_bodytarget +#define cddir Perl_cddir +#define chopset Perl_chopset +#define copline Perl_copline +#define curblock Perl_curblock +#define curcsv Perl_curcsv +#define curpm Perl_curpm +#define curstack Perl_curstack +#define curstash Perl_curstash +#define curstname Perl_curstname +#define cxstack Perl_cxstack +#define cxstack_ix Perl_cxstack_ix +#define cxstack_max Perl_cxstack_max +#define dbargs Perl_dbargs +#define debdelim Perl_debdelim +#define debname Perl_debname +#define debstash Perl_debstash +#define defgv Perl_defgv +#define defoutgv Perl_defoutgv +#define defstash Perl_defstash +#define delaymagic Perl_delaymagic +#define diehook Perl_diehook +#define dirty Perl_dirty +#define dlevel Perl_dlevel +#define dlmax Perl_dlmax +#define doextract Perl_doextract +#define doswitches Perl_doswitches +#define dowarn Perl_dowarn +#define dumplvl Perl_dumplvl +#define e_fp Perl_e_fp +#define e_tmpname Perl_e_tmpname +#define endav Perl_endav +#define errgv Perl_errgv +#define eval_root Perl_eval_root +#define eval_start Perl_eval_start +#define fdpid Perl_fdpid +#define filemode Perl_filemode +#define firstgv Perl_firstgv +#define forkprocess Perl_forkprocess +#define formfeed Perl_formfeed +#define formtarget Perl_formtarget +#define gensym Perl_gensym +#define in_eval Perl_in_eval +#define incgv Perl_incgv +#define inplace Perl_inplace +#define last_in_gv Perl_last_in_gv +#define lastfd Perl_lastfd +#define lastretstr Perl_lastretstr +#define lastscream Perl_lastscream +#define lastsize Perl_lastsize +#define lastspbase Perl_lastspbase +#define laststatval Perl_laststatval +#define laststype Perl_laststype +#define leftgv Perl_leftgv +#define lineary Perl_lineary +#define localizing Perl_localizing +#define localpatches Perl_localpatches +#define main_cv Perl_main_cv +#define main_root Perl_main_root +#define main_start Perl_main_start +#define mainstack Perl_mainstack +#define maxscream Perl_maxscream +#define maxsysfd Perl_maxsysfd +#define mess_sv Perl_mess_sv +#define minus_F Perl_minus_F +#define minus_a Perl_minus_a +#define minus_c Perl_minus_c +#define minus_l Perl_minus_l +#define minus_n Perl_minus_n +#define minus_p Perl_minus_p +#define multiline Perl_multiline +#define mystack_base Perl_mystack_base +#define mystack_mark Perl_mystack_mark +#define mystack_max Perl_mystack_max +#define mystack_sp Perl_mystack_sp +#define mystrk Perl_mystrk +#define nrs Perl_nrs +#define ofmt Perl_ofmt +#define ofs Perl_ofs +#define ofslen Perl_ofslen +#define oldlastpm Perl_oldlastpm +#define oldname Perl_oldname +#define op_mask Perl_op_mask +#define origargc Perl_origargc +#define origargv Perl_origargv +#define origfilename Perl_origfilename +#define ors Perl_ors +#define orslen Perl_orslen +#define parsehook Perl_parsehook +#define patchlevel Perl_patchlevel +#define perl_destruct_level Perl_perl_destruct_level +#define perldb Perl_perldb +#define preambleav Perl_preambleav +#define preambled Perl_preambled +#define preprocess Perl_preprocess ++#define restartav Perl_restartav +#define restartop Perl_restartop +#define rightgv Perl_rightgv +#define rs Perl_rs +#define runlevel Perl_runlevel +#define sawampersand Perl_sawampersand +#define sawstudy Perl_sawstudy +#define sawvec Perl_sawvec +#define screamfirst Perl_screamfirst +#define screamnext Perl_screamnext +#define secondgv Perl_secondgv +#define signalstack Perl_signalstack +#define sortcop Perl_sortcop +#define sortstack Perl_sortstack +#define sortstash Perl_sortstash +#define splitstr Perl_splitstr +#define start_env Perl_start_env +#define statcache Perl_statcache +#define statgv Perl_statgv +#define statname Perl_statname +#define statusvalue Perl_statusvalue +#define statusvalue_vms Perl_statusvalue_vms +#define stdingv Perl_stdingv +#define strchop Perl_strchop +#define strtab Perl_strtab +#define sv_arenaroot Perl_sv_arenaroot +#define sv_count Perl_sv_count +#define sv_objcount Perl_sv_objcount +#define sv_root Perl_sv_root +#define tainted Perl_tainted +#define tmps_floor Perl_tmps_floor +#define tmps_ix Perl_tmps_ix +#define tmps_max Perl_tmps_max +#define tmps_stack Perl_tmps_stack +#define top_env Perl_top_env +#define toptarget Perl_toptarget +#define unsafe Perl_unsafe +#define warnhook Perl_warnhook + +#endif /* !BINCOMPAT3 */ + +#endif /* EMBED */ #endif /* MULTIPLICITY */ diff --cc global.sym index 27d80c5,0792dbb..219e9a5 --- a/global.sym +++ b/global.sym @@@ -255,7 -238,7 +255,8 @@@ vtbl_glo vtbl_isa vtbl_isaelem vtbl_mglob + vtbl_mutex +vtbl_nkeys vtbl_pack vtbl_packelem vtbl_pos @@@ -372,11 -333,11 +373,12 @@@ ck_spli ck_subr ck_svconst ck_trunc + condpair_magic convert -cpytill croak +cv_ckproto cv_clone +cv_const_sv cv_undef cx_dump cxinc @@@ -487,13 -435,11 +489,14 @@@ hv_kspli hv_magic hv_stashpv hv_store +hv_store_ent hv_undef ibcmp +ibcmp_locale ingroup + init_stacks instr +intro_my intuit_more invert jmaybe diff --cc gv.c index 6c912a0,7f73664..c9f919c --- a/gv.c +++ b/gv.c @@@ -1339,10 -1139,8 +1345,10 @@@ int flags ENTER; SAVESPTR(op); op = (OP *) &myop; + if (perldb && curstash != debstash) + op->op_private |= OPpENTERSUB_DB; PUTBACK; - pp_pushmark(); + pp_pushmark(ARGS); EXTEND(sp, notfound + 5); PUSHs(lr>0? right: left); diff --cc keywords.h index a6dabf3,8cb2748..7d71649 --- a/keywords.h +++ b/keywords.h @@@ -1,246 -1,245 +1,248 @@@ #define KEY_NULL 0 --#define KEY___LINE__ 1 --#define KEY___FILE__ 2 --#define KEY___DATA__ 3 --#define KEY___END__ 4 --#define KEY_AUTOLOAD 5 --#define KEY_BEGIN 6 --#define KEY_CORE 7 --#define KEY_DESTROY 8 --#define KEY_END 9 --#define KEY_EQ 10 --#define KEY_GE 11 --#define KEY_GT 12 --#define KEY_LE 13 --#define KEY_LT 14 --#define KEY_NE 15 - #define KEY_RESTART 16 - #define KEY_abs 17 - #define KEY_accept 18 - #define KEY_alarm 19 - #define KEY_and 20 - #define KEY_atan2 21 - #define KEY_bind 22 - #define KEY_binmode 23 - #define KEY_bless 24 - #define KEY_caller 25 - #define KEY_chdir 26 - #define KEY_chmod 27 - #define KEY_chomp 28 - #define KEY_chop 29 - #define KEY_chown 30 - #define KEY_chr 31 - #define KEY_chroot 32 - #define KEY_close 33 - #define KEY_closedir 34 - #define KEY_cmp 35 - #define KEY_connect 36 - #define KEY_continue 37 - #define KEY_cos 38 - #define KEY_crypt 39 - #define KEY_dbmclose 40 - #define KEY_dbmopen 41 - #define KEY_defined 42 - #define KEY_delete 43 - #define KEY_die 44 - #define KEY_do 45 - #define KEY_dump 46 - #define KEY_each 47 - #define KEY_else 48 - #define KEY_elsif 49 - #define KEY_endgrent 50 - #define KEY_endhostent 51 - #define KEY_endnetent 52 - #define KEY_endprotoent 53 - #define KEY_endpwent 54 - #define KEY_endservent 55 - #define KEY_eof 56 - #define KEY_eq 57 - #define KEY_eval 58 - #define KEY_exec 59 - #define KEY_exists 60 - #define KEY_exit 61 - #define KEY_exp 62 - #define KEY_fcntl 63 - #define KEY_fileno 64 - #define KEY_flock 65 - #define KEY_for 66 - #define KEY_foreach 67 - #define KEY_fork 68 - #define KEY_format 69 - #define KEY_formline 70 - #define KEY_ge 71 - #define KEY_getc 72 - #define KEY_getgrent 73 - #define KEY_getgrgid 74 - #define KEY_getgrnam 75 - #define KEY_gethostbyaddr 76 - #define KEY_gethostbyname 77 - #define KEY_gethostent 78 - #define KEY_getlogin 79 - #define KEY_getnetbyaddr 80 - #define KEY_getnetbyname 81 - #define KEY_getnetent 82 - #define KEY_getpeername 83 - #define KEY_getpgrp 84 - #define KEY_getppid 85 - #define KEY_getpriority 86 - #define KEY_getprotobyname 87 - #define KEY_getprotobynumber 88 - #define KEY_getprotoent 89 - #define KEY_getpwent 90 - #define KEY_getpwnam 91 - #define KEY_getpwuid 92 - #define KEY_getservbyname 93 - #define KEY_getservbyport 94 - #define KEY_getservent 95 - #define KEY_getsockname 96 - #define KEY_getsockopt 97 - #define KEY_glob 98 - #define KEY_gmtime 99 - #define KEY_goto 100 - #define KEY_grep 101 - #define KEY_gt 102 - #define KEY_hex 103 - #define KEY_if 104 - #define KEY_index 105 - #define KEY_int 106 - #define KEY_ioctl 107 - #define KEY_join 108 - #define KEY_keys 109 - #define KEY_kill 110 - #define KEY_last 111 - #define KEY_lc 112 - #define KEY_lcfirst 113 - #define KEY_le 114 - #define KEY_length 115 - #define KEY_link 116 - #define KEY_listen 117 - #define KEY_local 118 - #define KEY_localtime 119 - #define KEY_log 120 - #define KEY_lstat 121 - #define KEY_lt 122 - #define KEY_m 123 - #define KEY_map 124 - #define KEY_mkdir 125 - #define KEY_msgctl 126 - #define KEY_msgget 127 - #define KEY_msgrcv 128 - #define KEY_msgsnd 129 - #define KEY_my 130 - #define KEY_ne 131 - #define KEY_next 132 - #define KEY_no 133 - #define KEY_not 134 - #define KEY_oct 135 - #define KEY_open 136 - #define KEY_opendir 137 - #define KEY_or 138 - #define KEY_ord 139 - #define KEY_pack 140 - #define KEY_package 141 - #define KEY_pipe 142 - #define KEY_pop 143 - #define KEY_pos 144 - #define KEY_print 145 - #define KEY_printf 146 - #define KEY_prototype 147 - #define KEY_push 148 - #define KEY_q 149 - #define KEY_qq 150 - #define KEY_quotemeta 151 - #define KEY_qw 152 - #define KEY_qx 153 - #define KEY_rand 154 - #define KEY_read 155 - #define KEY_readdir 156 - #define KEY_readline 157 - #define KEY_readlink 158 - #define KEY_readpipe 159 - #define KEY_recv 160 - #define KEY_redo 161 - #define KEY_ref 162 - #define KEY_rename 163 - #define KEY_require 164 - #define KEY_reset 165 - #define KEY_return 166 - #define KEY_reverse 167 - #define KEY_rewinddir 168 - #define KEY_rindex 169 - #define KEY_rmdir 170 - #define KEY_s 171 - #define KEY_scalar 172 - #define KEY_seek 173 - #define KEY_seekdir 174 - #define KEY_select 175 - #define KEY_semctl 176 - #define KEY_semget 177 - #define KEY_semop 178 - #define KEY_send 179 - #define KEY_setgrent 180 - #define KEY_sethostent 181 - #define KEY_setnetent 182 - #define KEY_setpgrp 183 - #define KEY_setpriority 184 - #define KEY_setprotoent 185 - #define KEY_setpwent 186 - #define KEY_setservent 187 - #define KEY_setsockopt 188 - #define KEY_shift 189 - #define KEY_shmctl 190 - #define KEY_shmget 191 - #define KEY_shmread 192 - #define KEY_shmwrite 193 - #define KEY_shutdown 194 - #define KEY_sin 195 - #define KEY_sleep 196 - #define KEY_socket 197 - #define KEY_socketpair 198 - #define KEY_sort 199 - #define KEY_splice 200 - #define KEY_split 201 - #define KEY_sprintf 202 - #define KEY_sqrt 203 - #define KEY_srand 204 - #define KEY_stat 205 - #define KEY_study 206 - #define KEY_sub 207 - #define KEY_substr 208 - #define KEY_symlink 209 - #define KEY_syscall 210 - #define KEY_sysopen 211 - #define KEY_sysread 212 - #define KEY_system 213 - #define KEY_syswrite 214 - #define KEY_tell 215 - #define KEY_telldir 216 - #define KEY_tie 217 - #define KEY_tied 218 - #define KEY_time 219 - #define KEY_times 220 - #define KEY_tr 221 - #define KEY_truncate 222 - #define KEY_uc 223 - #define KEY_ucfirst 224 - #define KEY_umask 225 - #define KEY_undef 226 - #define KEY_unless 227 - #define KEY_unlink 228 - #define KEY_unpack 229 - #define KEY_unshift 230 - #define KEY_untie 231 - #define KEY_until 232 - #define KEY_use 233 - #define KEY_utime 234 - #define KEY_values 235 - #define KEY_vec 236 - #define KEY_wait 237 - #define KEY_waitpid 238 - #define KEY_wantarray 239 - #define KEY_warn 240 - #define KEY_while 241 - #define KEY_write 242 - #define KEY_x 243 - #define KEY_xor 244 - #define KEY_y 245 -#define KEY_abs 16 -#define KEY_accept 17 -#define KEY_alarm 18 -#define KEY_and 19 -#define KEY_atan2 20 -#define KEY_bind 21 -#define KEY_binmode 22 -#define KEY_bless 23 -#define KEY_caller 24 -#define KEY_chdir 25 -#define KEY_chmod 26 -#define KEY_chomp 27 -#define KEY_chop 28 -#define KEY_chown 29 -#define KEY_chr 30 -#define KEY_chroot 31 -#define KEY_close 32 -#define KEY_closedir 33 -#define KEY_cmp 34 -#define KEY_connect 35 -#define KEY_continue 36 -#define KEY_cos 37 -#define KEY_crypt 38 -#define KEY_dbmclose 39 -#define KEY_dbmopen 40 -#define KEY_defined 41 -#define KEY_delete 42 -#define KEY_die 43 -#define KEY_do 44 -#define KEY_dump 45 -#define KEY_each 46 -#define KEY_else 47 -#define KEY_elsif 48 -#define KEY_endgrent 49 -#define KEY_endhostent 50 -#define KEY_endnetent 51 -#define KEY_endprotoent 52 -#define KEY_endpwent 53 -#define KEY_endservent 54 -#define KEY_eof 55 -#define KEY_eq 56 -#define KEY_eval 57 -#define KEY_exec 58 -#define KEY_exists 59 -#define KEY_exit 60 -#define KEY_exp 61 -#define KEY_fcntl 62 -#define KEY_fileno 63 -#define KEY_flock 64 -#define KEY_for 65 -#define KEY_foreach 66 -#define KEY_fork 67 -#define KEY_format 68 -#define KEY_formline 69 -#define KEY_ge 70 -#define KEY_getc 71 -#define KEY_getgrent 72 -#define KEY_getgrgid 73 -#define KEY_getgrnam 74 -#define KEY_gethostbyaddr 75 -#define KEY_gethostbyname 76 -#define KEY_gethostent 77 -#define KEY_getlogin 78 -#define KEY_getnetbyaddr 79 -#define KEY_getnetbyname 80 -#define KEY_getnetent 81 -#define KEY_getpeername 82 -#define KEY_getpgrp 83 -#define KEY_getppid 84 -#define KEY_getpriority 85 -#define KEY_getprotobyname 86 -#define KEY_getprotobynumber 87 -#define KEY_getprotoent 88 -#define KEY_getpwent 89 -#define KEY_getpwnam 90 -#define KEY_getpwuid 91 -#define KEY_getservbyname 92 -#define KEY_getservbyport 93 -#define KEY_getservent 94 -#define KEY_getsockname 95 -#define KEY_getsockopt 96 -#define KEY_glob 97 -#define KEY_gmtime 98 -#define KEY_goto 99 -#define KEY_grep 100 -#define KEY_gt 101 -#define KEY_hex 102 -#define KEY_if 103 -#define KEY_index 104 -#define KEY_int 105 -#define KEY_ioctl 106 -#define KEY_join 107 -#define KEY_keys 108 -#define KEY_kill 109 -#define KEY_last 110 -#define KEY_lc 111 -#define KEY_lcfirst 112 -#define KEY_le 113 -#define KEY_length 114 -#define KEY_link 115 -#define KEY_listen 116 -#define KEY_local 117 -#define KEY_localtime 118 -#define KEY_log 119 -#define KEY_lstat 120 -#define KEY_lt 121 -#define KEY_m 122 -#define KEY_map 123 -#define KEY_mkdir 124 -#define KEY_msgctl 125 -#define KEY_msgget 126 -#define KEY_msgrcv 127 -#define KEY_msgsnd 128 -#define KEY_my 129 -#define KEY_ne 130 -#define KEY_next 131 -#define KEY_no 132 -#define KEY_not 133 -#define KEY_oct 134 -#define KEY_open 135 -#define KEY_opendir 136 -#define KEY_or 137 -#define KEY_ord 138 -#define KEY_pack 139 -#define KEY_package 140 -#define KEY_pipe 141 -#define KEY_pop 142 -#define KEY_pos 143 -#define KEY_print 144 -#define KEY_printf 145 -#define KEY_prototype 146 -#define KEY_push 147 -#define KEY_q 148 -#define KEY_qq 149 -#define KEY_quotemeta 150 -#define KEY_qw 151 -#define KEY_qx 152 -#define KEY_rand 153 -#define KEY_read 154 -#define KEY_readdir 155 -#define KEY_readline 156 -#define KEY_readlink 157 -#define KEY_readpipe 158 -#define KEY_recv 159 -#define KEY_redo 160 -#define KEY_ref 161 -#define KEY_rename 162 -#define KEY_require 163 -#define KEY_reset 164 -#define KEY_return 165 -#define KEY_reverse 166 -#define KEY_rewinddir 167 -#define KEY_rindex 168 -#define KEY_rmdir 169 -#define KEY_s 170 -#define KEY_scalar 171 -#define KEY_seek 172 -#define KEY_seekdir 173 -#define KEY_select 174 -#define KEY_semctl 175 -#define KEY_semget 176 -#define KEY_semop 177 -#define KEY_send 178 -#define KEY_setgrent 179 -#define KEY_sethostent 180 -#define KEY_setnetent 181 -#define KEY_setpgrp 182 -#define KEY_setpriority 183 -#define KEY_setprotoent 184 -#define KEY_setpwent 185 -#define KEY_setservent 186 -#define KEY_setsockopt 187 -#define KEY_shift 188 -#define KEY_shmctl 189 -#define KEY_shmget 190 -#define KEY_shmread 191 -#define KEY_shmwrite 192 -#define KEY_shutdown 193 -#define KEY_sin 194 -#define KEY_sleep 195 -#define KEY_socket 196 -#define KEY_socketpair 197 -#define KEY_sort 198 -#define KEY_splice 199 -#define KEY_split 200 -#define KEY_sprintf 201 -#define KEY_sqrt 202 -#define KEY_srand 203 -#define KEY_stat 204 -#define KEY_study 205 -#define KEY_sub 206 -#define KEY_substr 207 -#define KEY_symlink 208 -#define KEY_syscall 209 -#define KEY_sysopen 210 -#define KEY_sysread 211 -#define KEY_system 212 -#define KEY_syswrite 213 -#define KEY_tell 214 -#define KEY_telldir 215 -#define KEY_tie 216 -#define KEY_tied 217 -#define KEY_time 218 -#define KEY_times 219 -#define KEY_tr 220 -#define KEY_truncate 221 -#define KEY_uc 222 -#define KEY_ucfirst 223 -#define KEY_umask 224 -#define KEY_undef 225 -#define KEY_unless 226 -#define KEY_unlink 227 -#define KEY_unpack 228 -#define KEY_unshift 229 -#define KEY_untie 230 -#define KEY_until 231 -#define KEY_use 232 -#define KEY_utime 233 -#define KEY_values 234 -#define KEY_vec 235 -#define KEY_wait 236 -#define KEY_waitpid 237 -#define KEY_wantarray 238 -#define KEY_warn 239 -#define KEY_while 240 -#define KEY_write 241 -#define KEY_x 242 -#define KEY_xor 243 -#define KEY_y 244 ++#define KEY___FILE__ 1 ++#define KEY___LINE__ 2 ++#define KEY___PACKAGE__ 3 ++#define KEY___DATA__ 4 ++#define KEY___END__ 5 ++#define KEY_AUTOLOAD 6 ++#define KEY_BEGIN 7 ++#define KEY_CORE 8 ++#define KEY_DESTROY 9 ++#define KEY_END 10 ++#define KEY_EQ 11 ++#define KEY_GE 12 ++#define KEY_GT 13 ++#define KEY_LE 14 ++#define KEY_LT 15 ++#define KEY_NE 16 ++#define KEY_RESTART 17 ++#define KEY_abs 18 ++#define KEY_accept 19 ++#define KEY_alarm 20 ++#define KEY_and 21 ++#define KEY_atan2 22 ++#define KEY_bind 23 ++#define KEY_binmode 24 ++#define KEY_bless 25 ++#define KEY_caller 26 ++#define KEY_chdir 27 ++#define KEY_chmod 28 ++#define KEY_chomp 29 ++#define KEY_chop 30 ++#define KEY_chown 31 ++#define KEY_chr 32 ++#define KEY_chroot 33 ++#define KEY_close 34 ++#define KEY_closedir 35 ++#define KEY_cmp 36 ++#define KEY_connect 37 ++#define KEY_continue 38 ++#define KEY_cos 39 ++#define KEY_crypt 40 ++#define KEY_dbmclose 41 ++#define KEY_dbmopen 42 ++#define KEY_defined 43 ++#define KEY_delete 44 ++#define KEY_die 45 ++#define KEY_do 46 ++#define KEY_dump 47 ++#define KEY_each 48 ++#define KEY_else 49 ++#define KEY_elsif 50 ++#define KEY_endgrent 51 ++#define KEY_endhostent 52 ++#define KEY_endnetent 53 ++#define KEY_endprotoent 54 ++#define KEY_endpwent 55 ++#define KEY_endservent 56 ++#define KEY_eof 57 ++#define KEY_eq 58 ++#define KEY_eval 59 ++#define KEY_exec 60 ++#define KEY_exists 61 ++#define KEY_exit 62 ++#define KEY_exp 63 ++#define KEY_fcntl 64 ++#define KEY_fileno 65 ++#define KEY_flock 66 ++#define KEY_for 67 ++#define KEY_foreach 68 ++#define KEY_fork 69 ++#define KEY_format 70 ++#define KEY_formline 71 ++#define KEY_ge 72 ++#define KEY_getc 73 ++#define KEY_getgrent 74 ++#define KEY_getgrgid 75 ++#define KEY_getgrnam 76 ++#define KEY_gethostbyaddr 77 ++#define KEY_gethostbyname 78 ++#define KEY_gethostent 79 ++#define KEY_getlogin 80 ++#define KEY_getnetbyaddr 81 ++#define KEY_getnetbyname 82 ++#define KEY_getnetent 83 ++#define KEY_getpeername 84 ++#define KEY_getpgrp 85 ++#define KEY_getppid 86 ++#define KEY_getpriority 87 ++#define KEY_getprotobyname 88 ++#define KEY_getprotobynumber 89 ++#define KEY_getprotoent 90 ++#define KEY_getpwent 91 ++#define KEY_getpwnam 92 ++#define KEY_getpwuid 93 ++#define KEY_getservbyname 94 ++#define KEY_getservbyport 95 ++#define KEY_getservent 96 ++#define KEY_getsockname 97 ++#define KEY_getsockopt 98 ++#define KEY_glob 99 ++#define KEY_gmtime 100 ++#define KEY_goto 101 ++#define KEY_grep 102 ++#define KEY_gt 103 ++#define KEY_hex 104 ++#define KEY_if 105 ++#define KEY_index 106 ++#define KEY_int 107 ++#define KEY_ioctl 108 ++#define KEY_join 109 ++#define KEY_keys 110 ++#define KEY_kill 111 ++#define KEY_last 112 ++#define KEY_lc 113 ++#define KEY_lcfirst 114 ++#define KEY_le 115 ++#define KEY_length 116 ++#define KEY_link 117 ++#define KEY_listen 118 ++#define KEY_local 119 ++#define KEY_localtime 120 ++#define KEY_log 121 ++#define KEY_lstat 122 ++#define KEY_lt 123 ++#define KEY_m 124 ++#define KEY_map 125 ++#define KEY_mkdir 126 ++#define KEY_msgctl 127 ++#define KEY_msgget 128 ++#define KEY_msgrcv 129 ++#define KEY_msgsnd 130 ++#define KEY_my 131 ++#define KEY_ne 132 ++#define KEY_next 133 ++#define KEY_no 134 ++#define KEY_not 135 ++#define KEY_oct 136 ++#define KEY_open 137 ++#define KEY_opendir 138 ++#define KEY_or 139 ++#define KEY_ord 140 ++#define KEY_pack 141 ++#define KEY_package 142 ++#define KEY_pipe 143 ++#define KEY_pop 144 ++#define KEY_pos 145 ++#define KEY_print 146 ++#define KEY_printf 147 ++#define KEY_prototype 148 ++#define KEY_push 149 ++#define KEY_q 150 ++#define KEY_qq 151 ++#define KEY_quotemeta 152 ++#define KEY_qw 153 ++#define KEY_qx 154 ++#define KEY_rand 155 ++#define KEY_read 156 ++#define KEY_readdir 157 ++#define KEY_readline 158 ++#define KEY_readlink 159 ++#define KEY_readpipe 160 ++#define KEY_recv 161 ++#define KEY_redo 162 ++#define KEY_ref 163 ++#define KEY_rename 164 ++#define KEY_require 165 ++#define KEY_reset 166 ++#define KEY_return 167 ++#define KEY_reverse 168 ++#define KEY_rewinddir 169 ++#define KEY_rindex 170 ++#define KEY_rmdir 171 ++#define KEY_s 172 ++#define KEY_scalar 173 ++#define KEY_seek 174 ++#define KEY_seekdir 175 ++#define KEY_select 176 ++#define KEY_semctl 177 ++#define KEY_semget 178 ++#define KEY_semop 179 ++#define KEY_send 180 ++#define KEY_setgrent 181 ++#define KEY_sethostent 182 ++#define KEY_setnetent 183 ++#define KEY_setpgrp 184 ++#define KEY_setpriority 185 ++#define KEY_setprotoent 186 ++#define KEY_setpwent 187 ++#define KEY_setservent 188 ++#define KEY_setsockopt 189 ++#define KEY_shift 190 ++#define KEY_shmctl 191 ++#define KEY_shmget 192 ++#define KEY_shmread 193 ++#define KEY_shmwrite 194 ++#define KEY_shutdown 195 ++#define KEY_sin 196 ++#define KEY_sleep 197 ++#define KEY_socket 198 ++#define KEY_socketpair 199 ++#define KEY_sort 200 ++#define KEY_splice 201 ++#define KEY_split 202 ++#define KEY_sprintf 203 ++#define KEY_sqrt 204 ++#define KEY_srand 205 ++#define KEY_stat 206 ++#define KEY_study 207 ++#define KEY_sub 208 ++#define KEY_substr 209 ++#define KEY_symlink 210 ++#define KEY_syscall 211 ++#define KEY_sysopen 212 ++#define KEY_sysread 213 ++#define KEY_sysseek 214 ++#define KEY_system 215 ++#define KEY_syswrite 216 ++#define KEY_tell 217 ++#define KEY_telldir 218 ++#define KEY_tie 219 ++#define KEY_tied 220 ++#define KEY_time 221 ++#define KEY_times 222 ++#define KEY_tr 223 ++#define KEY_truncate 224 ++#define KEY_uc 225 ++#define KEY_ucfirst 226 ++#define KEY_umask 227 ++#define KEY_undef 228 ++#define KEY_unless 229 ++#define KEY_unlink 230 ++#define KEY_unpack 231 ++#define KEY_unshift 232 ++#define KEY_untie 233 ++#define KEY_until 234 ++#define KEY_use 235 ++#define KEY_utime 236 ++#define KEY_values 237 ++#define KEY_vec 238 ++#define KEY_wait 239 ++#define KEY_waitpid 240 ++#define KEY_wantarray 241 ++#define KEY_warn 242 ++#define KEY_while 243 ++#define KEY_write 244 ++#define KEY_x 245 ++#define KEY_xor 246 ++#define KEY_y 247 diff --cc malloc.c index e9b200b,7c23adb..52c7eed --- a/malloc.c +++ b/malloc.c @@@ -273,20 -114,19 +273,21 @@@ malloc(nbytes MEM_SIZE size = nbytes; #endif -#ifdef MSDOS +#ifdef PERL_CORE +#ifdef HAS_64K_LIMIT if (nbytes > 0xffff) { - fprintf(stderr, "Allocation too large: %lx\n", (long)nbytes); + PerlIO_printf(PerlIO_stderr(), + "Allocation too large: %lx\n", (long)nbytes); my_exit(1); } -#endif /* MSDOS */ +#endif /* HAS_64K_LIMIT */ #ifdef DEBUGGING if ((long)nbytes < 0) - croak("panic: malloc"); + croak("panic: malloc"); #endif -#endif /* safemalloc */ +#endif /* PERL_CORE */ + MUTEX_LOCK(&malloc_mutex); /* * Convert amount of memory requested into * closest block size stored in hash buckets @@@ -317,9 -146,10 +318,10 @@@ if (nextf[bucket] == NULL) morecore(bucket); if ((p = (union overhead *)nextf[bucket]) == NULL) { + MUTEX_UNLOCK(&malloc_mutex); -#ifdef safemalloc +#ifdef PERL_CORE if (!nomemok) { - fputs("Out of memory!\n", stderr); + PerlIO_puts(PerlIO_stderr(),"Out of memory!\n"); my_exit(1); } #else @@@ -354,7 -184,8 +356,8 @@@ p->ov_rmagic = RMAGIC; *((u_int *)((caddr_t)p + nbytes - RSLOP)) = RMAGIC; #endif + MUTEX_UNLOCK(&malloc_mutex); - return ((Malloc_t)(p + 1)); + return ((Malloc_t)(p + CHUNK_SHIFT)); } /* @@@ -511,16 -283,22 +514,18 @@@ free(mp #endif return; /* sanity */ } -#endif + MUTEX_LOCK(&malloc_mutex); #ifdef RCHECK ASSERT(op->ov_rmagic == RMAGIC); - if (op->ov_index <= 13) + if (OV_INDEX(op) <= MAX_SHORT_BUCKET) ASSERT(*(u_int *)((caddr_t)op + op->ov_size + 1 - RSLOP) == RMAGIC); op->ov_rmagic = RMAGIC - 1; #endif - ASSERT(op->ov_index < NBUCKETS); - size = op->ov_index; + ASSERT(OV_INDEX(op) < NBUCKETS); + size = OV_INDEX(op); op->ov_next = nextf[size]; nextf[size] = op; -#ifdef DEBUGGING_MSTATS - nmalloc[size]--; -#endif + MUTEX_UNLOCK(&malloc_mutex); } /* @@@ -566,13 -343,13 +571,14 @@@ realloc(mp, nbytes if ((long)nbytes < 0) croak("panic: realloc"); #endif -#endif /* safemalloc */ +#endif /* PERL_CORE */ + MUTEX_LOCK(&malloc_mutex); - op = (union overhead *)((caddr_t)cp - sizeof (union overhead)); - if (op->ov_magic == MAGIC) { - was_alloced++; - i = op->ov_index; + op = (union overhead *)((caddr_t)cp + - sizeof (union overhead) * CHUNK_SHIFT); + i = OV_INDEX(op); + if (OV_MAGIC(op, i) == MAGIC) { + was_alloced = 1; } else { /* * Already free, doing "compaction". diff --cc op.c index eae012f,b86227b..08a2e7a --- a/op.c +++ b/op.c @@@ -18,33 -18,30 +18,27 @@@ #include "EXTERN.h" #include "perl.h" --#define USE_OP_MASK /* Turned on by default in 5.002beta1h */ -- --#ifdef USE_OP_MASK /* -- * In the following definition, the ", (OP *) op" is just to make the compiler ++ * In the following definition, the ", Nullop" is just to make the compiler * think the expression is of the right type: croak actually does a Siglongjmp. */ - #define CHECKOP(type,op) \ + #define CHECKOP(type,o) \ - ((op_mask && op_mask[type]) \ - ? (croak("%s trapped by operation mask", op_desc[type]), (OP*)o) \ + ((op_mask && op_mask[type]) \ - ? ( op_free((OP*)op), \ ++ ? ( op_free((OP*)o), \ + croak("%s trapped by operation mask", op_desc[type]), \ + Nullop ) \ - : (*check[type])((OP*)op)) - #else - #define CHECKOP(type,op) (*check[type])(op) - #endif /* USE_OP_MASK */ + : (*check[type])((OP*)o)) -#else -#define CHECKOP(type,o) (*check[type])(o) -#endif /* USE_OP_MASK */ - static I32 list_assignment _((OP *op)); + static I32 list_assignment _((OP *o)); -static void bad_type _((I32 n, char *t, char *name, OP *kid)); +static OP *bad_type _((I32 n, char *t, char *name, OP *kid)); - static OP *modkids _((OP *op, I32 type)); - static OP *no_fh_allowed _((OP *op)); - static bool scalar_mod_type _((OP *op, I32 type)); - static OP *scalarboolean _((OP *op)); - static OP *too_few_arguments _((OP *op, char* name)); - static OP *too_many_arguments _((OP *op, char* name)); - static void null _((OP* op)); + static OP *modkids _((OP *o, I32 type)); + static OP *no_fh_allowed _((OP *o)); ++static bool scalar_mod_type _((OP *o, I32 type)); + static OP *scalarboolean _((OP *o)); + static OP *too_few_arguments _((OP *o, char* name)); + static OP *too_many_arguments _((OP *o, char* name)); + static void null _((OP* o)); -static PADOFFSET pad_findlex _((char* name, PADOFFSET newoff, I32 seq, +static PADOFFSET pad_findlex _((char* name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix)); static char* @@@ -57,54 -54,58 +51,53 @@@ GV* gv } static OP * - no_fh_allowed(op) - OP *op; + no_fh_allowed(o) + OP *o; { - sprintf(tokenbuf,"Missing comma after first argument to %s function", - op_desc[o->op_type]); - yyerror(tokenbuf); + yyerror(form("Missing comma after first argument to %s function", + op_desc[op->op_type])); - return op; + return o; } static OP * - too_few_arguments(op, name) - OP* op; + too_few_arguments(o, name) + OP* o; char* name; { - sprintf(tokenbuf,"Not enough arguments for %s", name); - yyerror(tokenbuf); + yyerror(form("Not enough arguments for %s", name)); - return op; + return o; } static OP * - too_many_arguments(op, name) - OP *op; + too_many_arguments(o, name) + OP *o; char* name; { - sprintf(tokenbuf,"Too many arguments for %s", name); - yyerror(tokenbuf); + yyerror(form("Too many arguments for %s", name)); - return op; + return o; } - static OP * + static void bad_type(n, t, name, kid) I32 n; char *t; char *name; OP *kid; { - sprintf(tokenbuf, "Type of arg %d to %s must be %s (not %s)", - (int) n, name, t, op_desc[kid->op_type]); - yyerror(tokenbuf); + yyerror(form("Type of arg %d to %s must be %s (not %s)", + (int)n, name, t, op_desc[kid->op_type])); } void - assertref(op) - OP *op; + assertref(o) + OP *o; { - int type = op->op_type; + int type = o->op_type; if (type != OP_AELEM && type != OP_HELEM) { - sprintf(tokenbuf, "Can't use subscript on %s", op_desc[type]); - yyerror(tokenbuf); - if (type == OP_RV2HV || type == OP_ENTERSUB) + yyerror(form("Can't use subscript on %s", op_desc[type])); + if (type == OP_ENTERSUB || type == OP_RV2HV || type == OP_PADHV) warn("(Did you mean $ or @ instead of %c?)\n", - type == OP_RV2HV ? '%' : '&'); + type == OP_ENTERSUB ? '&' : '%'); } } @@@ -173,9 -151,10 +167,10 @@@ U32 seq CV* startcv; I32 cx_ix; #else -pad_findlex(char *name, PADOFFSET newoff, I32 seq, CV* startcv, I32 cx_ix) +pad_findlex(char *name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix) #endif { + dTHR; CV *cv; I32 off; SV *sv; @@@ -303,12 -238,25 +298,26 @@@ PADOFFSE pad_findmy(name) char *name; { + dTHR; I32 off; + I32 pendoff = 0; SV *sv; SV **svp = AvARRAY(comppad_name); - I32 seq = cop_seqmax; + U32 seq = cop_seqmax; + #ifdef USE_THREADS + /* + * Special case to get lexical (and hence per-thread) @_. + * XXX I need to find out how to tell at parse-time whether use + * of @_ should refer to a lexical (from a sub) or defgv (global + * scope and maybe weird sub-ish things like formats). See + * startsub in perly.y. It's possible that @_ could be lexical + * (at least from subs) even in non-threaded perl. + */ + if (strEQ(name, "@_")) + return 0; /* success. (NOT_IN_PAD indicates failure) */ + #endif /* USE_THREADS */ + /* The one we're looking for is probably just before comppad_name_fill. */ for (off = AvFILL(comppad_name); off > 0; off--) { if ((sv = svp[off]) && @@@ -326,14 -271,10 +335,13 @@@ /* See if it's in a nested scope */ off = pad_findlex(name, 0, seq, CvOUTSIDE(compcv), cxstack_ix); - if (off) + if (off) { + /* If there is a pending local definition, this new alias must die */ + if (pendoff) + SvIVX(AvARRAY(comppad_name)[off]) = seq; - return off; + return off; /* pad_findlex returns 0 for failure...*/ - + } - - return 0; + return NOT_IN_PAD; /* ...but we return NOT_IN_PAD for failure */ } void @@@ -394,7 -324,13 +403,14 @@@ U32 tmptype } SvFLAGS(sv) |= tmptype; curpad = AvARRAY(comppad); - DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad alloc %ld for %s\n", (long) retval, op_name[optype])); + #ifdef USE_THREADS - DEBUG_X(fprintf(stderr, "0x%lx Pad 0x%lx alloc %ld for %s\n", - (unsigned long) thr, (unsigned long) curpad, - (long) retval, op_name[optype])); ++ DEBUG_X(PerlIO_printf(Perl_debug_log, "0x%lx Pad 0x%lx alloc %ld for %s\n", ++ (unsigned long) thr, (unsigned long) curpad, ++ (long) retval, op_name[optype])); + #else - DEBUG_X(fprintf(stderr, "Pad alloc %ld for %s\n", (long) retval, op_name[optype])); ++ DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad alloc %ld for %s\n", ++ (long) retval, op_name[optype])); + #endif /* USE_THREADS */ return (PADOFFSET)retval; } @@@ -406,9 -342,15 +422,15 @@@ PADOFFSET po pad_sv(PADOFFSET po) #endif /* CAN_PROTOTYPE */ { + dTHR; + #ifdef USE_THREADS - DEBUG_X(fprintf(stderr, "0x%lx Pad 0x%lx sv %d\n", - (unsigned long) thr, (unsigned long) curpad, po)); ++ DEBUG_X(PerlIO_printf(Perl_debug_log, "0x%lx Pad 0x%lx sv %d\n", ++ (unsigned long) thr, (unsigned long) curpad, po)); + #else if (!po) croak("panic: pad_sv po"); - DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad sv %lu\n", (unsigned long)po)); - DEBUG_X(fprintf(stderr, "Pad sv %d\n", po)); ++ DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad sv %d\n", po)); + #endif /* USE_THREADS */ return curpad[po]; /* eventually we'll turn this into a macro */ } @@@ -426,8 -369,13 +449,13 @@@ pad_free(PADOFFSET po croak("panic: pad_free curpad"); if (!po) croak("panic: pad_free po"); - DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad free %lu\n", (unsigned long)po)); - if (curpad[po] && !SvIMMORTAL(curpad[po])) + #ifdef USE_THREADS - DEBUG_X(fprintf(stderr, "0x%lx Pad 0x%lx free %d\n", - (unsigned long) thr, (unsigned long) curpad, po)); ++ DEBUG_X(PerlIO_printf(Perl_debug_log, "0x%lx Pad 0x%lx free %d\n", ++ (unsigned long) thr, (unsigned long) curpad, po)); + #else - DEBUG_X(fprintf(stderr, "Pad free %d\n", po)); ++ DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad free %d\n", po)); + #endif /* USE_THREADS */ + if (curpad[po] && curpad[po] != &sv_undef) SvPADTMP_off(curpad[po]); if ((I32)po < padix) padix = po - 1; @@@ -445,7 -394,12 +474,12 @@@ pad_swipe(PADOFFSET po croak("panic: pad_swipe curpad"); if (!po) croak("panic: pad_swipe po"); - DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad swipe %lu\n", (unsigned long)po)); + #ifdef USE_THREADS - DEBUG_X(fprintf(stderr, "0x%lx Pad 0x%lx swipe %d\n", - (unsigned long) thr, (unsigned long) curpad, po)); ++ DEBUG_X(PerlIO_printf(Perl_debug_log, "0x%lx Pad 0x%lx swipe %d\n", ++ (unsigned long) thr, (unsigned long) curpad, po)); + #else - DEBUG_X(fprintf(stderr, "Pad swipe %d\n", po)); ++ DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad swipe %d\n", po)); + #endif /* USE_THREADS */ SvPADTMP_off(curpad[po]); curpad[po] = NEWSV(1107,0); SvPADTMP_on(curpad[po]); @@@ -460,10 -415,15 +495,15 @@@ pad_reset( if (AvARRAY(comppad) != curpad) croak("panic: pad_reset curpad"); + #ifdef USE_THREADS - DEBUG_X(fprintf(stderr, "0x%lx Pad 0x%lx reset\n", - (unsigned long) thr, (unsigned long) curpad)); ++ DEBUG_X(PerlIO_printf(Perl_debug_log, "0x%lx Pad 0x%lx reset\n", ++ (unsigned long) thr, (unsigned long) curpad)); + #else - DEBUG_X(fprintf(stderr, "Pad reset\n")); + DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad reset\n")); + #endif /* USE_THREADS */ if (!tainting) { /* Can't mix tainted and non-tainted temporaries. */ for (po = AvMAX(comppad); po > padix_floor; po--) { - if (curpad[po] && curpad[po] != &sv_undef) + if (curpad[po] && !SvIMMORTAL(curpad[po])) SvPADTMP_off(curpad[po]); } padix = padix_floor; @@@ -479,39 -439,33 +519,39 @@@ OP *o { register OP *kid, *nextkid; - if (!op || op->op_seq == (U16)-1) - if (!o) ++ if (!o || o->op_seq == (U16)-1) return; - if (op->op_flags & OPf_KIDS) { - for (kid = cUNOP->op_first; kid; kid = nextkid) { + if (o->op_flags & OPf_KIDS) { + for (kid = cUNOPo->op_first; kid; kid = nextkid) { nextkid = kid->op_sibling; /* Get before next freeing kid */ op_free(kid); } } - switch (op->op_type) { + switch (o->op_type) { case OP_NULL: - op->op_targ = 0; /* Was holding old type, if any. */ + o->op_targ = 0; /* Was holding old type, if any. */ break; case OP_ENTEREVAL: - op->op_targ = 0; /* Was holding hints. */ + o->op_targ = 0; /* Was holding hints. */ break; + default: + if (!(op->op_flags & OPf_REF) || (check[op->op_type] != ck_ftst)) + break; + /* FALL THROUGH */ case OP_GVSV: case OP_GV: + case OP_AELEMFAST: - SvREFCNT_dec(cGVOP->op_gv); + SvREFCNT_dec(cGVOPo->op_gv); break; case OP_NEXTSTATE: case OP_DBSTATE: + Safefree(cCOP->cop_label); - SvREFCNT_dec(cCOP->cop_filegv); + SvREFCNT_dec(cCOPo->cop_filegv); break; case OP_CONST: - SvREFCNT_dec(cSVOP->op_sv); + SvREFCNT_dec(cSVOPo->op_sv); break; case OP_GOTO: case OP_NEXT: @@@ -528,15 -482,17 +568,15 @@@ /* FALL THROUGH */ case OP_PUSHRE: case OP_MATCH: - pregfree(cPMOP->op_pmregexp); - SvREFCNT_dec(cPMOP->op_pmshort); + pregfree(cPMOPo->op_pmregexp); + SvREFCNT_dec(cPMOPo->op_pmshort); break; - default: - break; } - if (op->op_targ > 0) - pad_free(op->op_targ); + if (o->op_targ > 0) + pad_free(o->op_targ); - Safefree(op); + Safefree(o); } static void @@@ -614,17 -570,17 +654,17 @@@ OP *o OP *kid; /* assumes no premature commitment */ - if (!op || (op->op_flags & OPf_WANT) || error_count - || op->op_type == OP_RETURN) - return op; - if (!o || (o->op_flags & OPf_KNOW) || error_count) ++ if (!o || (o->op_flags & OPf_WANT) || error_count ++ || o->op_type == OP_RETURN) + return o; - op->op_flags = (op->op_flags & ~OPf_WANT) | OPf_WANT_SCALAR; - o->op_flags &= ~OPf_LIST; - o->op_flags |= OPf_KNOW; ++ o->op_flags = (o->op_flags & ~OPf_WANT) | OPf_WANT_SCALAR; - switch (op->op_type) { + switch (o->op_type) { case OP_REPEAT: - if (op->op_private & OPpREPEAT_DOLIST) - null(((LISTOP*)cBINOP->op_first)->op_first); - scalar(cBINOP->op_first); + if (o->op_private & OPpREPEAT_DOLIST) + null(((LISTOP*)cBINOPo->op_first)->op_first); + scalar(cBINOPo->op_first); break; case OP_OR: case OP_AND: @@@ -649,16 -605,8 +689,16 @@@ break; case OP_LEAVE: case OP_LEAVETRY: - kid = cLISTOP->op_first; - scalar(cLISTOPo->op_first); - /* FALL THROUGH */ ++ kid = cLISTOPo->op_first; + scalar(kid); + while (kid = kid->op_sibling) { + if (kid->op_sibling) + scalarvoid(kid); + else + scalar(kid); + } + curcop = &compiling; + break; case OP_SCOPE: case OP_LINESEQ: case OP_LIST: @@@ -682,20 -630,18 +722,20 @@@ OP *o char* useless = 0; SV* sv; - if (!o || error_count) - return o; - if (o->op_flags & OPf_LIST) + /* assumes no premature commitment */ - if (!op || (op->op_flags & OPf_WANT) == OPf_WANT_LIST || error_count - || op->op_type == OP_RETURN) - return op; ++ if (!o || (o->op_flags & OPf_WANT) == OPf_WANT_LIST || error_count ++ || o->op_type == OP_RETURN) + return o; - op->op_flags = (op->op_flags & ~OPf_WANT) | OPf_WANT_VOID; - o->op_flags |= OPf_KNOW; ++ o->op_flags = (o->op_flags & ~OPf_WANT) | OPf_WANT_VOID; - switch (op->op_type) { + switch (o->op_type) { default: - if (!(opargs[op->op_type] & OA_FOLDCONST)) + if (!(opargs[o->op_type] & OA_FOLDCONST)) break; + /* FALL THROUGH */ + case OP_REPEAT: - if (op->op_flags & OPf_STACKED) + if (o->op_flags & OPf_STACKED) break; /* FALL THROUGH */ case OP_GVSV: @@@ -807,47 -755,43 +847,47 @@@ break; case OP_POSTDEC: - op->op_type = OP_PREDEC; /* pre-decrement is faster */ - op->op_ppaddr = ppaddr[OP_PREDEC]; + o->op_type = OP_PREDEC; /* pre-decrement is faster */ + o->op_ppaddr = ppaddr[OP_PREDEC]; break; case OP_OR: case OP_AND: case OP_COND_EXPR: - for (kid = cUNOP->op_first->op_sibling; kid; kid = kid->op_sibling) + for (kid = cUNOPo->op_first->op_sibling; kid; kid = kid->op_sibling) scalarvoid(kid); break; + case OP_NULL: - if (op->op_targ == OP_NEXTSTATE || op->op_targ == OP_DBSTATE) - curcop = ((COP*)op); /* for warning below */ - if (op->op_flags & OPf_STACKED) + if (o->op_targ == OP_NEXTSTATE || o->op_targ == OP_DBSTATE) + curcop = ((COP*)o); /* for warning below */ + if (o->op_flags & OPf_STACKED) break; + /* FALL THROUGH */ case OP_ENTERTRY: case OP_ENTER: case OP_SCALAR: - if (!(op->op_flags & OPf_KIDS)) + if (!(o->op_flags & OPf_KIDS)) break; + /* FALL THROUGH */ case OP_SCOPE: case OP_LEAVE: case OP_LEAVETRY: case OP_LEAVELOOP: - o->op_private |= OPpLEAVE_VOID; case OP_LINESEQ: case OP_LIST: - for (kid = cLISTOP->op_first; kid; kid = kid->op_sibling) + for (kid = cLISTOPo->op_first; kid; kid = kid->op_sibling) scalarvoid(kid); break; + case OP_ENTEREVAL: + scalarkids(op); + break; + case OP_REQUIRE: + /* all requires must return a boolean value */ + op->op_flags &= ~OPf_WANT; + return scalar(op); case OP_SPLIT: - if ((kid = ((LISTOP*)op)->op_first) && kid->op_type == OP_PUSHRE) { + if ((kid = cLISTOPo->op_first) && kid->op_type == OP_PUSHRE) { if (!kPMOP->op_pmreplroot) deprecate("implicit split to @_"); } @@@ -877,16 -824,15 +917,16 @@@ OP *o OP *kid; /* assumes no premature commitment */ - if (!op || (op->op_flags & OPf_WANT) || error_count - || op->op_type == OP_RETURN) - return op; - if (!o || (o->op_flags & OPf_KNOW) || error_count) ++ if (!o || (o->op_flags & OPf_WANT) || error_count ++ || o->op_type == OP_RETURN) + return o; - op->op_flags = (op->op_flags & ~OPf_WANT) | OPf_WANT_LIST; - o->op_flags |= (OPf_KNOW | OPf_LIST); ++ o->op_flags = (o->op_flags & ~OPf_WANT) | OPf_WANT_LIST; - switch (op->op_type) { + switch (o->op_type) { case OP_FLOP: case OP_REPEAT: - list(cBINOP->op_first); + list(cBINOPo->op_first); break; case OP_OR: case OP_AND: @@@ -909,19 -855,11 +949,19 @@@ break; case OP_LEAVE: case OP_LEAVETRY: - kid = cLISTOP->op_first; - list(cLISTOPo->op_first); - /* FALL THROUGH */ ++ kid = cLISTOPo->op_first; + list(kid); + while (kid = kid->op_sibling) { + if (kid->op_sibling) + scalarvoid(kid); + else + list(kid); + } + curcop = &compiling; + break; case OP_SCOPE: case OP_LINESEQ: - for (kid = cLISTOP->op_first; kid; kid = kid->op_sibling) { + for (kid = cLISTOPo->op_first; kid; kid = kid->op_sibling) { if (kid->op_sibling) scalarvoid(kid); else @@@ -929,12 -867,8 +969,12 @@@ } curcop = &compiling; break; + case OP_REQUIRE: + /* all requires must return a boolean value */ + op->op_flags &= ~OPf_WANT; + return scalar(op); } - return op; + return o; } OP * @@@ -981,21 -915,21 +1021,22 @@@ I32 type static I32 modcount; OP * - mod(op, type) - OP *op; + mod(o, type) + OP *o; I32 type; { + dTHR; OP *kid; SV *sv; - char mtype; - if (!op || error_count) - return op; + if (!o || error_count) + return o; - switch (op->op_type) { + switch (o->op_type) { + case OP_UNDEF: - return op; ++ return o; case OP_CONST: - if (!(op->op_private & (OPpCONST_ARYBASE))) + if (!(o->op_private & (OPpCONST_ARYBASE))) goto nomod; if (eval_start && eval_start->op_type == OP_CONST) { compiling.cop_arybase = (I32)SvIV(((SVOP*)eval_start)->op_sv); @@@ -1010,17 -944,13 +1051,17 @@@ else croak("That use of $[ is unsupported"); break; + case OP_STUB: + if (op->op_flags & OPf_PARENS) + break; + goto nomod; case OP_ENTERSUB: if ((type == OP_UNDEF || type == OP_REFGEN) && - !(op->op_flags & OPf_STACKED)) { - op->op_type = OP_RV2CV; /* entersub => rv2cv */ - op->op_ppaddr = ppaddr[OP_RV2CV]; - assert(cUNOP->op_first->op_type == OP_NULL); - null(((LISTOP*)cUNOP->op_first)->op_first); /* disable pushmark */ + !(o->op_flags & OPf_STACKED)) { + o->op_type = OP_RV2CV; /* entersub => rv2cv */ + o->op_ppaddr = ppaddr[OP_RV2CV]; + assert(cUNOPo->op_first->op_type == OP_NULL); + null(((LISTOP*)cUNOPo->op_first)->op_first);/* disable pushmark */ break; } /* FALL THROUGH */ @@@ -1029,10 -959,11 +1070,10 @@@ /* grep, foreach, subcalls, refgen */ if (type == OP_GREPSTART || type == OP_ENTERSUB || type == OP_REFGEN) break; - sprintf(tokenbuf, "Can't modify %s in %s", - op_desc[o->op_type], - type ? op_desc[type] : "local"); - yyerror(tokenbuf); + yyerror(form("Can't modify %s in %s", - op_desc[op->op_type], ++ op_desc[o->op_type], + type ? op_desc[type] : "local")); - return op; + return o; case OP_PREINC: case OP_PREDEC: @@@ -1072,9 -1003,7 +1113,9 @@@ } /* FALL THROUGH */ case OP_RV2GV: - if (scalar_mod_type(op, type)) ++ if (scalar_mod_type(o, type)) + goto nomod; - ref(cUNOP->op_first, op->op_type); + ref(cUNOPo->op_first, o->op_type); /* FALL THROUGH */ case OP_AASSIGN: case OP_ASLICE: @@@ -1086,10 -1015,11 +1127,10 @@@ modcount = 10000; break; case OP_RV2SV: - if (!type && cUNOP->op_first->op_type != OP_GV) + if (!type && cUNOPo->op_first->op_type != OP_GV) croak("Can't localize a reference"); - ref(cUNOP->op_first, op->op_type); + ref(cUNOPo->op_first, o->op_type); /* FALL THROUGH */ - case OP_UNDEF: case OP_GV: case OP_AV2ARYLEN: case OP_SASSIGN: @@@ -1115,26 -1041,28 +1156,26 @@@ case OP_PUSHMARK: break; + case OP_KEYS: + if (type != OP_SASSIGN) + goto nomod; + /* FALL THROUGH */ case OP_POS: - mtype = '.'; - goto makelv; case OP_VEC: - mtype = 'v'; - goto makelv; case OP_SUBSTR: - pad_free(op->op_targ); - op->op_targ = pad_alloc(op->op_type, SVs_PADMY); - assert(SvTYPE(PAD_SV(op->op_targ)) == SVt_NULL); - if (op->op_flags & OPf_KIDS) - mod(cBINOP->op_first->op_sibling, type); - mtype = 'x'; - makelv: + pad_free(o->op_targ); + o->op_targ = pad_alloc(o->op_type, SVs_PADMY); - sv = PAD_SV(o->op_targ); - sv_upgrade(sv, SVt_PVLV); - sv_magic(sv, Nullsv, mtype, Nullch, 0); - curpad[o->op_targ] = sv; ++ assert(SvTYPE(PAD_SV(o->op_targ)) == SVt_NULL); + if (o->op_flags & OPf_KIDS) + mod(cBINOPo->op_first->op_sibling, type); break; case OP_AELEM: case OP_HELEM: - ref(cBINOP->op_first, op->op_type); + ref(cBINOPo->op_first, o->op_type); + if (type == OP_ENTERSUB && - !(op->op_private & (OPpLVAL_INTRO | OPpDEREF))) - op->op_private |= OPpLVAL_DEFER; ++ !(o->op_private & (OPpLVAL_INTRO | OPpDEREF))) ++ o->op_private |= OPpLVAL_DEFER; modcount++; break; @@@ -1158,68 -1086,22 +1199,68 @@@ mod(kid, type); break; } - op->op_flags |= OPf_MOD; + o->op_flags |= OPf_MOD; if (type == OP_AASSIGN || type == OP_SASSIGN) - op->op_flags |= OPf_SPECIAL|OPf_REF; + o->op_flags |= OPf_SPECIAL|OPf_REF; else if (!type) { - op->op_private |= OPpLVAL_INTRO; - op->op_flags &= ~OPf_SPECIAL; + o->op_private |= OPpLVAL_INTRO; + o->op_flags &= ~OPf_SPECIAL; } else if (type != OP_GREPSTART && type != OP_ENTERSUB) - op->op_flags |= OPf_REF; - return op; + o->op_flags |= OPf_REF; + return o; } +static bool +scalar_mod_type(op, type) +OP *op; +I32 type; +{ + switch (type) { + case OP_SASSIGN: + if (op->op_type == OP_RV2GV) + return FALSE; + /* FALL THROUGH */ + case OP_PREINC: + case OP_PREDEC: + case OP_POSTINC: + case OP_POSTDEC: + case OP_I_PREINC: + case OP_I_PREDEC: + case OP_I_POSTINC: + case OP_I_POSTDEC: + case OP_POW: + case OP_MULTIPLY: + case OP_DIVIDE: + case OP_MODULO: + case OP_REPEAT: + case OP_ADD: + case OP_SUBTRACT: + case OP_I_MULTIPLY: + case OP_I_DIVIDE: + case OP_I_MODULO: + case OP_I_ADD: + case OP_I_SUBTRACT: + case OP_LEFT_SHIFT: + case OP_RIGHT_SHIFT: + case OP_BIT_AND: + case OP_BIT_XOR: + case OP_BIT_OR: + case OP_CONCAT: + case OP_SUBST: + case OP_TRANS: + case OP_ANDASSIGN: /* may work later */ + case OP_ORASSIGN: /* may work later */ + return TRUE; + default: + return FALSE; + } +} + OP * - refkids(op, type) - OP *op; + refkids(o, type) + OP *o; I32 type; { OP *kid; @@@ -1257,14 -1139,12 +1298,14 @@@ I32 type ref(kid, type); break; case OP_RV2SV: - ref(cUNOP->op_first, op->op_type); + ref(cUNOPo->op_first, o->op_type); /* FALL THROUGH */ case OP_PADSV: - if (type == OP_RV2AV || type == OP_RV2HV) { - o->op_private |= (type == OP_RV2AV ? OPpDEREF_AV : OPpDEREF_HV); + if (type == OP_RV2SV || type == OP_RV2AV || type == OP_RV2HV) { - op->op_private |= (type == OP_RV2AV ? OPpDEREF_AV - : type == OP_RV2HV ? OPpDEREF_HV - : OPpDEREF_SV); - op->op_flags |= OPf_MOD; ++ o->op_private |= (type == OP_RV2AV ? OPpDEREF_AV ++ : type == OP_RV2HV ? OPpDEREF_HV ++ : OPpDEREF_SV); + o->op_flags |= OPf_MOD; } break; @@@ -1289,12 -1169,10 +1330,12 @@@ break; case OP_AELEM: case OP_HELEM: - ref(cBINOP->op_first, op->op_type); + ref(cBINOPo->op_first, o->op_type); - if (type == OP_RV2AV || type == OP_RV2HV) { - o->op_private |= (type == OP_RV2AV ? OPpDEREF_AV : OPpDEREF_HV); + if (type == OP_RV2SV || type == OP_RV2AV || type == OP_RV2HV) { - op->op_private |= (type == OP_RV2AV ? OPpDEREF_AV - : type == OP_RV2HV ? OPpDEREF_HV - : OPpDEREF_SV); - op->op_flags |= OPf_MOD; ++ o->op_private |= (type == OP_RV2AV ? OPpDEREF_AV ++ : type == OP_RV2HV ? OPpDEREF_HV ++ : OPpDEREF_SV); + o->op_flags |= OPf_MOD; } break; @@@ -1333,12 -1211,13 +1374,12 @@@ OP *o type != OP_PADHV && type != OP_PUSHMARK) { - yyerror(form("Can't declare %s in my", op_desc[op->op_type])); - return op; - sprintf(tokenbuf, "Can't declare %s in my", op_desc[o->op_type]); - yyerror(tokenbuf); ++ yyerror(form("Can't declare %s in my", op_desc[o->op_type])); + return o; } - op->op_flags |= OPf_MOD; - op->op_private |= OPpLVAL_INTRO; - return op; + o->op_flags |= OPf_MOD; + o->op_private |= OPpLVAL_INTRO; + return o; } OP * @@@ -1356,22 -1235,8 +1397,22 @@@ I32 type OP *left; OP *right; { - OP *op; + OP *o; + if (dowarn && + (left->op_type == OP_RV2AV || + left->op_type == OP_RV2HV || + left->op_type == OP_PADAV || + left->op_type == OP_PADHV)) { + char *desc = op_desc[(right->op_type == OP_SUBST || + right->op_type == OP_TRANS) + ? right->op_type : OP_MATCH]; + char *sample = ((left->op_type == OP_RV2AV || + left->op_type == OP_PADAV) + ? "@array" : "%hash"); + warn("Applying %s to %s will act on scalar(%s)", desc, sample, sample); + } + if (right->op_type == OP_MATCH || right->op_type == OP_SUBST || right->op_type == OP_TRANS) { @@@ -1430,36 -1295,34 +1471,38 @@@ OP *o } int -block_start() +block_start(full) +int full; { + dTHR; int retval = savestack_ix; - comppad_name_fill = AvFILL(comppad_name); - SAVEINT(min_intro_pending); - SAVEINT(max_intro_pending); + SAVEI32(comppad_name_floor); + if (full) { + if ((comppad_name_fill = AvFILL(comppad_name)) > 0) + comppad_name_floor = comppad_name_fill; + else + comppad_name_floor = 0; + } + SAVEI32(min_intro_pending); + SAVEI32(max_intro_pending); min_intro_pending = 0; - SAVEINT(comppad_name_fill); - SAVEINT(padix_floor); + SAVEI32(comppad_name_fill); + SAVEI32(padix_floor); padix_floor = padix; pad_reset_pending = FALSE; - SAVEINT(hints); + SAVEI32(hints); hints &= ~HINT_BLOCK_SCOPE; return retval; } OP* -block_end(line, floor, seq) -int line; -int floor; +block_end(floor, seq) +I32 floor; OP* seq; { + dTHR; int needblockscope = hints & HINT_BLOCK_SCOPE; OP* retval = scalarseq(seq); - if (copline > (line_t)line) - copline = line; LEAVE_SCOPE(floor); pad_reset_pending = FALSE; if (needblockscope) @@@ -1470,19 -1332,22 +1513,20 @@@ } void - newPROG(op) - OP *op; + newPROG(o) + OP *o; { + dTHR; if (in_eval) { - eval_root = newUNOP(OP_LEAVEEVAL, ((in_eval & 4) ? OPf_SPECIAL : 0), op); - eval_root = newUNOP(OP_LEAVEEVAL, 0, o); ++ eval_root = newUNOP(OP_LEAVEEVAL, ((in_eval & 4) ? OPf_SPECIAL : 0), o); eval_start = linklist(eval_root); eval_root->op_next = 0; peep(eval_start); } else { - if (!op) - if (!o) { - main_start = 0; ++ if (!o) return; - main_root = scope(sawparens(scalarvoid(op))); - } + main_root = scope(sawparens(scalarvoid(o))); curcop = &compiling; main_start = LINKLIST(main_root); main_root->op_next = 0; @@@ -1660,30 -1530,30 +1706,30 @@@ OP* o OP *kid; OP *last = 0; - if (!op || op->op_type != OP_LIST) - op = newLISTOP(OP_LIST, 0, op, Nullop); + if (!o || o->op_type != OP_LIST) + o = newLISTOP(OP_LIST, 0, o, Nullop); else - op->op_flags &= ~OPf_WANT; - o->op_flags &= ~(OPf_KNOW|OPf_LIST); ++ o->op_flags &= ~OPf_WANT; if (!(opargs[type] & OA_MARK)) - null(cLISTOP->op_first); + null(cLISTOPo->op_first); - op->op_type = type; - op->op_ppaddr = ppaddr[type]; - op->op_flags |= flags; + o->op_type = type; + o->op_ppaddr = ppaddr[type]; + o->op_flags |= flags; - op = CHECKOP(type, op); - if (op->op_type != type) - return op; + o = CHECKOP(type, o); + if (o->op_type != type) + return o; - if (cLISTOP->op_children < 7) { + if (cLISTOPo->op_children < 7) { /* XXX do we really need to do this if we're done appending?? */ - for (kid = cLISTOP->op_first; kid; kid = kid->op_sibling) + for (kid = cLISTOPo->op_first; kid; kid = kid->op_sibling) last = kid; - cLISTOP->op_last = last; /* in case check substituted last arg */ + cLISTOPo->op_last = last; /* in case check substituted last arg */ } - return fold_constants(op); + return fold_constants(o); } /* List constructors */ @@@ -2191,14 -2061,14 +2240,14 @@@ OP *o save_hptr(&curstash); save_item(curstname); - if (op) { + if (o) { STRLEN len; char *name; - sv = cSVOP->op_sv; + sv = cSVOPo->op_sv; name = SvPV(sv, len); - curstash = gv_stashpv(name,TRUE); + curstash = gv_stashpvn(name,len,TRUE); sv_setpvn(curstname, name, len); - op_free(op); + op_free(o); } else { sv_setpv(curstname,""); @@@ -2429,8 -2266,8 +2478,8 @@@ OP *right tmpop = ((UNOP*)tmpop)->op_first; /* to pushmark */ tmpop->op_sibling = Nullop; /* don't free split */ right->op_next = tmpop->op_next; /* fix starting loc */ - op_free(op); /* blow off assign */ + op_free(o); /* blow off assign */ - right->op_flags &= ~(OPf_KNOW|OPf_LIST); + right->op_flags &= ~OPf_WANT; /* "I don't know and I don't care." */ return right; } @@@ -2469,14 -2306,29 +2518,15 @@@ } OP * - newSTATEOP(flags, label, op) + newSTATEOP(flags, label, o) I32 flags; char *label; - OP *op; + OP *o; { + dTHR; + U32 seq = intro_my(); register COP *cop; - /* Introduce my variables. */ - if (min_intro_pending) { - SV **svp = AvARRAY(comppad_name); - I32 i; - SV *sv; - for (i = min_intro_pending; i <= max_intro_pending; i++) { - if ((sv = svp[i]) && sv != &sv_undef && !SvIVX(sv)) { - SvIVX(sv) = 999999999; /* Don't know scope end yet. */ - SvNVX(sv) = (double)cop_seqmax; - } - } - min_intro_pending = 0; - comppad_name_fill = max_intro_pending; /* Needn't search higher */ - } - Newz(1101, cop, 1, COP); if (perldb && curcop->cop_line && curstash != debstash) { cop->op_type = OP_DBSTATE; @@@ -2518,32 -2367,9 +2568,32 @@@ } } - return prepend_elem(OP_LINESEQ, (OP*)cop, op); + return prepend_elem(OP_LINESEQ, (OP*)cop, o); } +/* "Introduce" my variables to visible status. */ +U32 +intro_my() +{ + SV **svp; + SV *sv; + I32 i; + + if (! min_intro_pending) + return cop_seqmax; + + svp = AvARRAY(comppad_name); + for (i = min_intro_pending; i <= max_intro_pending; i++) { + if ((sv = svp[i]) && sv != &sv_undef && !SvIVX(sv)) { + SvIVX(sv) = 999999999; /* Don't know scope end yet. */ + SvNVX(sv) = (double)cop_seqmax; + } + } + min_intro_pending = 0; + comppad_name_fill = max_intro_pending; /* Needn't search higher */ + return cop_seqmax++; +} + OP * newLOGOP(type, flags, first, other) I32 type; @@@ -2649,19 -2446,20 +2700,20 @@@ OP* other } OP * -newCONDOP(flags, first, true, false) +newCONDOP(flags, first, trueop, falseop) I32 flags; OP* first; -OP* true; -OP* false; +OP* trueop; +OP* falseop; { + dTHR; CONDOP *condop; - OP *op; + OP *o; - if (!false) - return newLOGOP(OP_AND, 0, first, true); - if (!true) - return newLOGOP(OP_OR, 0, first, false); + if (!falseop) + return newLOGOP(OP_AND, 0, first, trueop); + if (!trueop) + return newLOGOP(OP_OR, 0, first, falseop); scalarboolean(first); if (first->op_type == OP_CONST) { @@@ -2694,14 -2492,14 +2746,14 @@@ condop->op_next = LINKLIST(first); first->op_next = (OP*)condop; - first->op_sibling = true; - true->op_sibling = false; + first->op_sibling = trueop; + trueop->op_sibling = falseop; - op = newUNOP(OP_NULL, 0, (OP*)condop); + o = newUNOP(OP_NULL, 0, (OP*)condop); - trueop->op_next = op; - falseop->op_next = op; - true->op_next = o; - false->op_next = o; ++ trueop->op_next = o; ++ falseop->op_next = o; - return op; + return o; } OP * @@@ -2975,57 -2777,11 +3046,58 @@@ CV *cv } } -CV * -cv_clone(proto) +#ifdef DEBUG_CLOSURES +static void +cv_dump(cv) +CV* cv; +{ + CV *outside = CvOUTSIDE(cv); + AV* padlist = CvPADLIST(cv); + AV* pad_name; + AV* pad; + SV** pname; + SV** ppad; + I32 ix; + + PerlIO_printf(Perl_debug_log, "\tCV=0x%p (%s), OUTSIDE=0x%p (%s)\n", + cv, + (CvANON(cv) ? "ANON" + : (cv == main_cv) ? "MAIN" + : CvUNIQUE(outside) ? "UNIQUE" + : CvGV(cv) ? GvNAME(CvGV(cv)) : "UNDEFINED"), + outside, + (!outside ? "null" + : CvANON(outside) ? "ANON" + : (outside == main_cv) ? "MAIN" + : CvUNIQUE(outside) ? "UNIQUE" + : CvGV(outside) ? GvNAME(CvGV(outside)) : "UNDEFINED")); + + if (!padlist) + return; + + pad_name = (AV*)*av_fetch(padlist, 0, FALSE); + pad = (AV*)*av_fetch(padlist, 1, FALSE); + pname = AvARRAY(pad_name); + ppad = AvARRAY(pad); + + for (ix = 1; ix <= AvFILL(pad_name); ix++) { + if (SvPOK(pname[ix])) + PerlIO_printf(Perl_debug_log, "\t%4d. 0x%p (%s\"%s\" %ld-%ld)\n", + ix, ppad[ix], + SvFAKE(pname[ix]) ? "FAKE " : "", + SvPVX(pname[ix]), + (long)I_32(SvNVX(pname[ix])), + (long)SvIVX(pname[ix])); + } +} +#endif /* DEBUG_CLOSURES */ + +static CV * +cv_clone2(proto, outside) CV* proto; +CV* outside; { + dTHR; AV* av; I32 ix; AV* protopadlist = CvPADLIST(proto); @@@ -3047,13 -2797,18 +3119,20 @@@ SAVESPTR(compcv); cv = compcv = (CV*)NEWSV(1104,0); - sv_upgrade((SV *)cv, SVt_PVCV); + sv_upgrade((SV *)cv, SvTYPE(proto)); CvCLONED_on(cv); + if (CvANON(proto)) + CvANON_on(cv); + #ifdef USE_THREADS + New(666, CvMUTEXP(cv), 1, pthread_mutex_t); + MUTEX_INIT(CvMUTEXP(cv)); + New(666, CvCONDP(cv), 1, pthread_cond_t); + COND_INIT(CvCONDP(cv)); + CvOWNER(cv) = 0; + #endif /* USE_THREADS */ CvFILEGV(cv) = CvFILEGV(proto); - CvGV(cv) = SvREFCNT_inc(CvGV(proto)); + CvGV(cv) = (GV*)SvREFCNT_inc(CvGV(proto)); CvSTASH(cv) = CvSTASH(proto); CvROOT(cv) = CvROOT(proto); CvSTART(cv) = CvSTART(proto); @@@ -3150,113 -2862,31 +3229,114 @@@ } CV * +cv_clone(proto) +CV* proto; +{ + return cv_clone2(proto, CvOUTSIDE(proto)); +} + +void +cv_ckproto(cv, gv, p) +CV* cv; +GV* gv; +char* p; +{ + if ((!p != !SvPOK(cv)) || (p && strNE(p, SvPVX(cv)))) { + SV* msg = sv_newmortal(); + SV* name = Nullsv; + + if (gv) + gv_efullname3(name = sv_newmortal(), gv, Nullch); + sv_setpv(msg, "Prototype mismatch:"); + if (name) + sv_catpvf(msg, " sub %_", name); + if (SvPOK(cv)) + sv_catpvf(msg, " (%s)", SvPVX(cv)); + sv_catpv(msg, " vs "); + if (p) + sv_catpvf(msg, "(%s)", p); + else + sv_catpv(msg, "none"); + warn("%_", msg); + } +} + +SV * +cv_const_sv(cv) +CV* cv; +{ + OP *o; + SV *sv; + + if (!cv || !SvPOK(cv) || SvCUR(cv)) + return Nullsv; + + sv = Nullsv; + for (o = CvSTART(cv); o; o = o->op_next) { + OPCODE type = o->op_type; + + if (type == OP_NEXTSTATE || type == OP_NULL || type == OP_PUSHMARK) + continue; + if (type == OP_LEAVESUB || type == OP_RETURN) + break; + if (sv) + return Nullsv; + if (type == OP_CONST) - sv = ((SVOP*)o)->op_sv; ++ sv = cSVOPo->op_sv; + else if (type == OP_PADSV) { + AV* pad = (AV*)(AvARRAY(CvPADLIST(cv))[1]); + sv = pad ? AvARRAY(pad)[o->op_targ] : Nullsv; + if (!sv || (!SvREADONLY(sv) && SvREFCNT(sv) > 1)) + return Nullsv; + } + else + return Nullsv; + } + if (sv) + SvREADONLY_on(sv); + return sv; +} + +CV * - newSUB(floor,op,proto,block) + newSUB(floor,o,proto,block) I32 floor; - OP *op; + OP *o; OP *proto; OP *block; { - char *name = op ? SvPVx(cSVOP->op_sv, na) : Nullch; + dTHR; ++ char *name = o ? SvPVx(cSVOPo->op_sv, na) : Nullch; + GV *gv = gv_fetchpv(name ? name : "__ANON__", GV_ADDMULTI, SVt_PVCV); + char *ps = proto ? SvPVx(((SVOP*)proto)->op_sv, na) : Nullch; register CV *cv; - char *name = o ? SvPVx(cSVOPo->op_sv, na) : "__ANON__"; - GV* gv = gv_fetchpv(name, GV_ADDMULTI, SVt_PVCV); - AV* av; - char *s; I32 ix; - if (op) - SAVEFREEOP(op); + if (o) - sub_generation++; - if (cv = GvCV(gv)) { - if (GvCVGEN(gv)) - cv = 0; /* just a cached method */ - else if (CvROOT(cv) || CvXSUB(cv) || GvASSUMECV(gv)) { - if (dowarn) { /* already defined (or promised)? */ ++ SAVEFREEOP(o); + if (proto) + SAVEFREEOP(proto); + + if (!name || GvCVGEN(gv)) + cv = Nullcv; + else if (cv = GvCV(gv)) { + cv_ckproto(cv, gv, ps); + /* already defined (or promised)? */ + if (CvROOT(cv) || CvXSUB(cv) || GvASSUMECV(gv)) { + SV* const_sv; + if (!block) { + /* just a "sub foo;" when &foo is already defined */ + SAVEFREESV(compcv); + goto done; + } + /* ahem, death to those who redefine active sort subs */ + if (curstack == sortstack && sortcop == CvSTART(cv)) + croak("Can't redefine active sort subroutine %s", name); + const_sv = cv_const_sv(cv); + if (const_sv || dowarn) { line_t oldline = curcop->cop_line; - curcop->cop_line = copline; - warn("Subroutine %s redefined",name); + warn(const_sv ? "Constant subroutine %s redefined" + : "Subroutine %s redefined", name); curcop->cop_line = oldline; } SvREFCNT_dec(cv); @@@ -3276,18 -2905,27 +3356,25 @@@ } else { cv = compcv; + if (name) { + GvCV(gv) = cv; + GvCVGEN(gv) = 0; + sub_generation++; + } } - GvCV(gv) = cv; - GvCVGEN(gv) = 0; + CvGV(cv) = (GV*)SvREFCNT_inc(gv); CvFILEGV(cv) = curcop->cop_filegv; - CvGV(cv) = SvREFCNT_inc(gv); CvSTASH(cv) = curstash; + #ifdef USE_THREADS + CvOWNER(cv) = 0; + New(666, CvMUTEXP(cv), 1, pthread_mutex_t); + MUTEX_INIT(CvMUTEXP(cv)); + New(666, CvCONDP(cv), 1, pthread_cond_t); + COND_INIT(CvCONDP(cv)); + #endif /* USE_THREADS */ - if (proto) { - char *p = SvPVx(((SVOP*)proto)->op_sv, na); - if (SvPOK(cv) && strNE(SvPV((SV*)cv,na), p)) - warn("Prototype mismatch: (%s) vs (%s)", SvPV((SV*)cv, na), p); - sv_setpv((SV*)cv, p); - op_free(proto); - } + if (ps) + sv_setpv((SV*)cv, ps); if (error_count) { op_free(block); @@@ -3451,19 -3029,20 +3538,20 @@@ char *name void (*subaddr) _((CV*)); char *filename; { + dTHR; + GV *gv = gv_fetchpv(name ? name : "__ANON__", GV_ADDMULTI, SVt_PVCV); register CV *cv; - GV *gv = gv_fetchpv((name ? name : "__ANON__"), GV_ADDMULTI, SVt_PVCV); - char *s; - - if (name) - sub_generation++; - if (cv = GvCV(gv)) { - if (GvCVGEN(gv)) - cv = 0; /* just a cached method */ - else if (CvROOT(cv) || CvXSUB(cv)) { /* already defined? */ + + if (cv = (name ? GvCV(gv) : Nullcv)) { + if (GvCVGEN(gv)) { + /* just a cached method */ + SvREFCNT_dec(cv); + cv = 0; + } + else if (CvROOT(cv) || CvXSUB(cv) || GvASSUMECV(gv)) { + /* already defined (or promised) */ if (dowarn) { line_t oldline = curcop->cop_line; - curcop->cop_line = copline; warn("Subroutine %s redefined",name); curcop->cop_line = oldline; @@@ -3478,44 -3058,40 +3566,51 @@@ else { cv = (CV*)NEWSV(1105,0); sv_upgrade((SV *)cv, SVt_PVCV); + if (name) { + GvCV(gv) = cv; + GvCVGEN(gv) = 0; + sub_generation++; + } } - CvGV(cv) = (GV*)SvREFCNT_inc(gv); - GvCV(gv) = cv; + CvGV(cv) = SvREFCNT_inc(gv); - GvCVGEN(gv) = 0; + #ifdef USE_THREADS + New(666, CvMUTEXP(cv), 1, pthread_mutex_t); + MUTEX_INIT(CvMUTEXP(cv)); + New(666, CvCONDP(cv), 1, pthread_cond_t); + COND_INIT(CvCONDP(cv)); + CvOWNER(cv) = 0; + #endif /* USE_THREADS */ CvFILEGV(cv) = gv_fetchfile(filename); CvXSUB(cv) = subaddr; - if (!name) - s = "__ANON__"; - else if (s = strrchr(name,':')) - s++; + + if (name) { + char *s = strrchr(name,':'); + if (s) + s++; + else + s = name; + if (strEQ(s, "BEGIN")) { + if (!beginav) + beginav = newAV(); + av_push(beginav, (SV *)cv); + GvCV(gv) = 0; + } + else if (strEQ(s, "END")) { + if (!endav) + endav = newAV(); + av_unshift(endav, 1); + av_store(endav, 0, (SV *)cv); + GvCV(gv) = 0; + } + else if (strEQ(s, "RESTART")) { + if (!restartav) + restartav = newAV(); + av_push(restartav, (SV *)cv); + } + } else - s = name; - if (strEQ(s, "BEGIN")) { - if (!beginav) - beginav = newAV(); - av_push(beginav, SvREFCNT_inc(gv)); - } - else if (strEQ(s, "END")) { - if (!endav) - endav = newAV(); - av_unshift(endav, 1); - av_store(endav, 0, SvREFCNT_inc(gv)); - } - if (!name) { - GvCV(gv) = 0; /* Will remember elsewhere instead. */ CvANON_on(cv); - } + return cv; } @@@ -3560,7 -3137,8 +3656,7 @@@ OP *block CvSTART(cv) = LINKLIST(CvROOT(cv)); CvROOT(cv)->op_next = 0; peep(CvSTART(cv)); - op_free(op); - FmLINES(cv) = 0; + op_free(o); copline = NOLINE; LEAVE_SCOPE(floor); } @@@ -3705,53 -3283,23 +3801,53 @@@ OP *o /* Check routines. */ OP * - ck_anoncode(op) - OP *op; ++ck_anoncode(o) ++OP *o; +{ + PADOFFSET ix; + SV* name; + + name = NEWSV(1106,0); + sv_upgrade(name, SVt_PVNV); + sv_setpvn(name, "&", 1); + SvIVX(name) = -1; + SvNVX(name) = 1; - ix = pad_alloc(op->op_type, SVs_PADMY); ++ ix = pad_alloc(o->op_type, SVs_PADMY); + av_store(comppad_name, ix, name); - av_store(comppad, ix, cSVOP->op_sv); - SvPADMY_on(cSVOP->op_sv); - cSVOP->op_sv = Nullsv; - cSVOP->op_targ = ix; - return op; ++ av_store(comppad, ix, cSVOPo->op_sv); ++ SvPADMY_on(cSVOPo->op_sv); ++ cSVOPo->op_sv = Nullsv; ++ cSVOPo->op_targ = ix; ++ return o; +} + +OP * - ck_bitop(op) - OP *op; ++ck_bitop(o) ++OP *o; +{ - op->op_private = hints; - return op; ++ o->op_private = hints; ++ return o; +} + +OP * - ck_concat(op) - OP *op; + ck_concat(o) + OP *o; { - if (cUNOP->op_first->op_type == OP_CONCAT) - op->op_flags |= OPf_STACKED; - return op; + if (cUNOPo->op_first->op_type == OP_CONCAT) + o->op_flags |= OPf_STACKED; + return o; } OP * - ck_spair(op) - OP *op; + ck_spair(o) + OP *o; { - if (op->op_flags & OPf_KIDS) { + if (o->op_flags & OPf_KIDS) { OP* newop; OP* kid; - OPCODE type = op->op_type; - op = modkids(ck_fun(op), type); - kid = cUNOP->op_first; - o = modkids(ck_fun(o), o->op_type); ++ OPCODE type = o->op_type; ++ o = modkids(ck_fun(o), type); + kid = cUNOPo->op_first; newop = kUNOP->op_first->op_sibling; if (newop && (newop->op_sibling || @@@ -3769,21 -3317,17 +3865,21 @@@ } OP * - ck_delete(op) - OP *op; + ck_delete(o) + OP *o; { - op = ck_fun(op); - op->op_private = 0; - if (op->op_flags & OPf_KIDS) { - OP *kid = cUNOP->op_first; + o = ck_fun(o); ++ o->op_private = 0; + if (o->op_flags & OPf_KIDS) { + OP *kid = cUNOPo->op_first; - if (kid->op_type != OP_HELEM) - croak("%s argument is not a HASH element", op_desc[o->op_type]); + if (kid->op_type == OP_HSLICE) - op->op_private |= OPpSLICE; ++ o->op_private |= OPpSLICE; + else if (kid->op_type != OP_HELEM) + croak("%s argument is not a HASH element or slice", - op_desc[op->op_type]); ++ op_desc[o->op_type]); null(kid); } - return op; + return o; } OP * @@@ -3886,38 -3416,17 +3982,39 @@@ register OP *o } OP * - ck_rvconst(op) - register OP *op; + ck_rvconst(o) + register OP *o; { - SVOP *kid = (SVOP*)cUNOP->op_first; + dTHR; + SVOP *kid = (SVOP*)cUNOPo->op_first; - op->op_private |= (hints & HINT_STRICT_REFS); + o->op_private |= (hints & HINT_STRICT_REFS); if (kid->op_type == OP_CONST) { - int iscv = (o->op_type==OP_RV2CV)*2; - GV *gv = 0; + char *name; + int iscv; + GV *gv; + + name = SvPV(kid->op_sv, na); + if ((hints & HINT_STRICT_REFS) && (kid->op_private & OPpCONST_BARE)) { + char *badthing = Nullch; - switch (op->op_type) { ++ switch (o->op_type) { + case OP_RV2SV: + badthing = "a SCALAR"; + break; + case OP_RV2AV: + badthing = "an ARRAY"; + break; + case OP_RV2HV: + badthing = "a HASH"; + break; + } + if (badthing) + croak( + "Can't use bareword (\"%s\") as %s ref while \"strict refs\" in use", + name, badthing); + } kid->op_type = OP_GV; + iscv = (op->op_type == OP_RV2CV) * 2; for (gv = 0; !gv; iscv++) { /* * This is a little tricky. We only want to add the symbol if we @@@ -3946,16 -3455,24 +4043,17 @@@ } OP * - ck_ftst(op) - OP *op; -ck_formline(o) -OP *o; -{ - return ck_fun(o); -} - -OP * + ck_ftst(o) + OP *o; { - I32 type = op->op_type; + dTHR; + I32 type = o->op_type; - if (op->op_flags & OPf_REF) - return op; + if (o->op_flags & OPf_REF) + return o; - if (op->op_flags & OPf_KIDS) { - SVOP *kid = (SVOP*)cUNOP->op_first; + if (o->op_flags & OPf_KIDS) { + SVOP *kid = (SVOP*)cUNOPo->op_first; if (kid->op_type == OP_CONST && (kid->op_private & OPpCONST_BARE)) { OP *newop = newGVOP(type, OPf_REF, @@@ -4114,33 -3632,14 +4213,33 @@@ OP *o } OP * - ck_glob(op) - OP *op; + ck_glob(o) + OP *o; { - GV *gv = newGVgen("main"); + GV *gv = gv_fetchpv("glob", FALSE, SVt_PVCV); + + if (gv && GvIMPORTED_CV(gv)) { + static int glob_index; + + append_elem(OP_GLOB, op, + newSVOP(OP_CONST, 0, newSViv(glob_index++))); + op->op_type = OP_LIST; + op->op_ppaddr = ppaddr[OP_LIST]; + ((LISTOP*)op)->op_first->op_type = OP_PUSHMARK; + ((LISTOP*)op)->op_first->op_ppaddr = ppaddr[OP_PUSHMARK]; + op = newUNOP(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, op, + scalar(newUNOP(OP_RV2CV, 0, + newGVOP(OP_GV, 0, gv))))); + return ck_subr(op); + } + if ((op->op_flags & OPf_KIDS) && !cLISTOP->op_first->op_sibling) + append_elem(OP_GLOB, op, newSVREF(newGVOP(OP_GV, 0, defgv))); + gv = newGVgen("main"); gv_IOadd(gv); - append_elem(OP_GLOB, op, newGVOP(OP_GV, 0, gv)); - scalarkids(op); - return ck_fun(op); + append_elem(OP_GLOB, o, newGVOP(OP_GV, 0, gv)); + scalarkids(o); + return ck_fun(o); } OP * @@@ -4196,15 -3695,15 +4295,15 @@@ OP *o } OP * - ck_index(op) - OP *op; + ck_index(o) + OP *o; { - if (op->op_flags & OPf_KIDS) { - OP *kid = cLISTOP->op_first->op_sibling; /* get past pushmark */ + if (o->op_flags & OPf_KIDS) { + OP *kid = cLISTOPo->op_first->op_sibling; /* get past pushmark */ if (kid && kid->op_type == OP_CONST) - fbm_compile(((SVOP*)kid)->op_sv, 0); + fbm_compile(((SVOP*)kid)->op_sv); } - return ck_fun(op); + return ck_fun(o); } OP * @@@ -4216,19 -3715,17 +4315,19 @@@ OP *o } OP * - ck_lfun(op) - OP *op; + ck_lfun(o) + OP *o; { - OPCODE type = op->op_type; - return modkids(ck_fun(op), type); - return modkids(ck_fun(o), o->op_type); ++ OPCODE type = o->op_type; ++ return modkids(ck_fun(o), type); } OP * - ck_rfun(op) - OP *op; + ck_rfun(o) + OP *o; { - OPCODE type = op->op_type; - return refkids(ck_fun(op), type); - return refkids(ck_fun(o), o->op_type); ++ OPCODE type = o->op_type; ++ return refkids(ck_fun(o), type); } OP * @@@ -4257,53 -3754,18 +4356,53 @@@ OP *o } if (!kid) - append_elem(op->op_type, op, newSVREF(newGVOP(OP_GV, 0, defgv)) ); + append_elem(o->op_type, o, newSVREF(newGVOP(OP_GV, 0, defgv)) ); - op = listkids(op); - return listkids(o); ++ o = listkids(o); + - op->op_private = 0; ++ o->op_private = 0; +#ifdef USE_LOCALE + if (hints & HINT_LOCALE) - op->op_private |= OPpLOCALE; ++ o->op_private |= OPpLOCALE; +#endif + - return op; ++ return o; +} + +OP * - ck_fun_locale(op) - OP *op; ++ck_fun_locale(o) ++OP *o; +{ - op = ck_fun(op); ++ o = ck_fun(o); + - op->op_private = 0; ++ o->op_private = 0; +#ifdef USE_LOCALE + if (hints & HINT_LOCALE) - op->op_private |= OPpLOCALE; ++ o->op_private |= OPpLOCALE; +#endif + - return op; ++ return o; +} + +OP * - ck_scmp(op) - OP *op; ++ck_scmp(o) ++OP *o; +{ - op->op_private = 0; ++ o->op_private = 0; +#ifdef USE_LOCALE + if (hints & HINT_LOCALE) - op->op_private |= OPpLOCALE; ++ o->op_private |= OPpLOCALE; +#endif + - return op; ++ return o; } OP * - ck_match(op) - OP *op; + ck_match(o) + OP *o; { - op->op_private |= OPpRUNTIME; - return op; - cPMOPo->op_pmflags |= PMf_RUNTIME; - cPMOPo->op_pmpermflags |= PMf_RUNTIME; ++ o->op_private |= OPpRUNTIME; + return o; } OP * @@@ -4379,34 -3841,27 +4478,34 @@@ OP *o } OP * - ck_shift(op) - OP *op; + ck_shift(o) + OP *o; { - I32 type = op->op_type; + I32 type = o->op_type; - if (!(op->op_flags & OPf_KIDS)) { - op_free(op); + if (!(o->op_flags & OPf_KIDS)) { + op_free(o); return newUNOP(type, 0, scalar(newUNOP(OP_RV2AV, 0, - scalar(newGVOP(OP_GV, 0, - gv_fetchpv((subline ? "_" : "ARGV"), TRUE, SVt_PVAV) ))))); + scalar(newGVOP(OP_GV, 0, subline + ? defgv + : gv_fetchpv("ARGV", TRUE, SVt_PVAV) ))))); } - return scalar(modkids(ck_fun(op), type)); + return scalar(modkids(ck_fun(o), type)); } OP * - ck_sort(op) - OP *op; + ck_sort(o) + OP *o; { - op->op_private = 0; ++ o->op_private = 0; +#ifdef USE_LOCALE + if (hints & HINT_LOCALE) - op->op_private |= OPpLOCALE; ++ o->op_private |= OPpLOCALE; +#endif + - if (op->op_flags & OPf_STACKED) { - OP *kid = cLISTOP->op_first->op_sibling; /* get past pushmark */ + if (o->op_flags & OPf_STACKED) { + OP *kid = cLISTOPo->op_first->op_sibling; /* get past pushmark */ OP *k; kid = kUNOP->op_first; /* get past rv2gv */ @@@ -4438,11 -3893,10 +4537,11 @@@ kid->op_next = kid; else kid->op_next = k; - op->op_flags |= OPf_SPECIAL; + o->op_flags |= OPf_SPECIAL; } } + - return op; + return o; } OP * @@@ -4524,21 -3978,19 +4624,21 @@@ OP *o null(cvop); /* disable rv2cv */ tmpop = (SVOP*)((UNOP*)cvop)->op_first; if (tmpop->op_type == OP_GV) { - cv = GvCV(tmpop->op_sv); - if (cv && SvPOK(cv) && !(o->op_private & OPpENTERSUB_AMPER)) - proto = SvPV((SV*)cv,na); + cv = GvCVu(tmpop->op_sv); - if (cv && SvPOK(cv) && !(op->op_private & OPpENTERSUB_AMPER)) { ++ if (cv && SvPOK(cv) && !(o->op_private & OPpENTERSUB_AMPER)) { + namegv = CvANON(cv) ? (GV*)tmpop->op_sv : CvGV(cv); + proto = SvPV((SV*)cv, na); + } } } - op->op_private |= (hints & HINT_STRICT_REFS); + o->op_private |= (hints & HINT_STRICT_REFS); if (perldb && curstash != debstash) - op->op_private |= OPpENTERSUB_DB; - while (o != cvop) { + o->op_private |= OPpENTERSUB_DB; + while (o2 != cvop) { if (proto) { switch (*proto) { case '\0': - return too_many_arguments(op, gv_ename(namegv)); - return too_many_arguments(o, CvNAME(cv)); ++ return too_many_arguments(o, gv_ename(namegv)); case ';': optional = 1; proto++; @@@ -4556,8 -4008,8 +4656,8 @@@ case '&': proto++; arg++; - if (o->op_type != OP_REFGEN && o->op_type != OP_UNDEF) - bad_type(arg, "block", gv_ename(namegv), o); + if (o2->op_type != OP_REFGEN && o2->op_type != OP_UNDEF) - bad_type(arg, "block", CvNAME(cv), o2); ++ bad_type(arg, "block", gv_ename(namegv), o2); break; case '*': proto++; @@@ -4577,29 -4029,29 +4677,29 @@@ arg++; switch (*proto++) { case '*': - if (o->op_type != OP_RV2GV) - bad_type(arg, "symbol", gv_ename(namegv), o); + if (o2->op_type != OP_RV2GV) - bad_type(arg, "symbol", CvNAME(cv), o2); ++ bad_type(arg, "symbol", gv_ename(namegv), o2); goto wrapref; case '&': - if (o->op_type != OP_RV2CV) - bad_type(arg, "sub", gv_ename(namegv), o); + if (o2->op_type != OP_RV2CV) - bad_type(arg, "sub", CvNAME(cv), o2); ++ bad_type(arg, "sub", gv_ename(namegv), o2); goto wrapref; case '$': - if (o->op_type != OP_RV2SV && o->op_type != OP_PADSV) - bad_type(arg, "scalar", gv_ename(namegv), o); + if (o2->op_type != OP_RV2SV && o2->op_type != OP_PADSV) - bad_type(arg, "scalar", CvNAME(cv), o2); ++ bad_type(arg, "scalar", gv_ename(namegv), o2); goto wrapref; case '@': - if (o->op_type != OP_RV2AV && o->op_type != OP_PADAV) - bad_type(arg, "array", gv_ename(namegv), o); + if (o2->op_type != OP_RV2AV && o2->op_type != OP_PADAV) - bad_type(arg, "array", CvNAME(cv), o2); ++ bad_type(arg, "array", gv_ename(namegv), o2); goto wrapref; case '%': - if (o->op_type != OP_RV2HV && o->op_type != OP_PADHV) - bad_type(arg, "hash", gv_ename(namegv), o); + if (o2->op_type != OP_RV2HV && o2->op_type != OP_PADHV) - bad_type(arg, "hash", CvNAME(cv), o2); ++ bad_type(arg, "hash", gv_ename(namegv), o2); wrapref: { - OP* kid = o; - o = newUNOP(OP_REFGEN, 0, kid); - o->op_sibling = kid->op_sibling; + OP* kid = o2; + o2 = newUNOP(OP_REFGEN, 0, kid); + o2->op_sibling = kid->op_sibling; kid->op_sibling = 0; prev->op_sibling = o; } @@@ -4617,14 -4066,14 +4717,14 @@@ } } else - list(o); - mod(o, OP_ENTERSUB); - prev = o; - o = o->op_sibling; + list(o2); + mod(o2, OP_ENTERSUB); + prev = o2; + o2 = o2->op_sibling; } if (proto && !optional && *proto == '$') - return too_few_arguments(op, gv_ename(namegv)); - return op; - return too_few_arguments(o, CvNAME(cv)); ++ return too_few_arguments(o, gv_ename(namegv)); + return o; } OP * diff --cc perl.c index fd99e75,27d2f61..e7600df --- a/perl.c +++ b/perl.c @@@ -72,10 -44,10 +72,12 @@@ static void init_main_stash _((void)) static void init_perllib _((void)); static void init_postdump_symbols _((int, char **, char **)); static void init_predump_symbols _((void)); - static void init_stacks _((void)); +static void my_exit_jump _((void)) __attribute__((noreturn)); +static void nuke_stacks _((void)); static void open_script _((char *, bool, SV *)); + #ifdef USE_THREADS + static void thread_destruct _((void *)); + #endif /* USE_THREADS */ static void usage _((char *)); static void validate_suid _((char *, char*)); @@@ -122,8 -111,12 +143,14 @@@ register PerlInterpreter *sv_interp nrs = newSVpv("\n", 1); rs = SvREFCNT_inc(nrs); + MUTEX_INIT(&malloc_mutex); + MUTEX_INIT(&sv_mutex); + MUTEX_INIT(&eval_mutex); + MUTEX_INIT(&nthreads_mutex); + COND_INIT(&nthreads_cond); + + pidstatus = newHV(); + #ifdef MSDOS /* * There is no way we can refer to them from Perl so close them to save @@@ -162,14 -153,18 +189,19 @@@ #endif #if defined(LOCAL_PATCH_COUNT) - Ilocalpatches = local_patches; /* For possible -v */ + localpatches = local_patches; /* For possible -v */ #endif + PerlIO_init(); /* Hook to IO system */ + fdpid = newAV(); /* for remembering popen pids by fd */ - pidstatus = newHV();/* for remembering status of dead pids */ - init_stacks(); + init_stacks(ARGS); + DEBUG( { + New(51,debname,128,char); + New(52,debdelim,128,char); + } ) + ENTER; } @@@ -384,64 -280,16 +455,69 @@@ register PerlInterpreter *sv_interp last_sv_count = sv_count; sv_clean_all(); } + SvFLAGS(strtab) &= ~SVTYPEMASK; + SvFLAGS(strtab) |= SVt_PVHV; + + /* Destruct the global string table. */ + { + /* Yell and reset the HeVAL() slots that are still holding refcounts, + * so that sv_free() won't fail on them. + */ + I32 riter; + I32 max; + HE *hent; + HE **array; + + riter = 0; + max = HvMAX(strtab); + array = HvARRAY(strtab); + hent = array[0]; + for (;;) { + if (hent) { + warn("Unbalanced string table refcount: (%d) for \"%s\"", + HeVAL(hent) - Nullsv, HeKEY(hent)); + HeVAL(hent) = Nullsv; + hent = HeNEXT(hent); + } + if (!hent) { + if (++riter > max) + break; + hent = array[riter]; + } + } + } + SvREFCNT_dec(strtab); + if (sv_count != 0) - warn("Scalars leaked: %d\n", sv_count); + warn("Scalars leaked: %ld\n", (long)sv_count); + sv_free_arenas(); + + /* No SVs have survived, need to clean out */ + linestr = NULL; + pidstatus = Nullhv; + if (origfilename) + Safefree(origfilename); + nuke_stacks(); + hints = 0; /* Reset hints. Should hints be per-interpreter ? */ DEBUG_P(debprofdump()); + #ifdef USE_THREADS + MUTEX_DESTROY(&sv_mutex); + MUTEX_DESTROY(&malloc_mutex); + MUTEX_DESTROY(&eval_mutex); + #endif /* USE_THREADS */ + + /* As the absolutely last thing, free the non-arena SV for mess() */ + + if (mess_sv) { + /* we know that type >= SVt_PV */ + SvOOK_off(mess_sv); + Safefree(SvPVX(mess_sv)); + Safefree(SvANY(mess_sv)); + Safefree(mess_sv); + mess_sv = Nullsv; + } } void @@@ -750,15 -511,26 +827,25 @@@ print \" \\@INC:\\n @INC\\n\";") if (doextract) find_beginning(); - compcv = (CV*)NEWSV(1104,0); + main_cv = compcv = (CV*)NEWSV(1104,0); sv_upgrade((SV *)compcv, SVt_PVCV); + CvUNIQUE_on(compcv); + #ifdef USE_THREADS + CvOWNER(compcv) = 0; + New(666, CvMUTEXP(compcv), 1, pthread_mutex_t); + MUTEX_INIT(CvMUTEXP(compcv)); + New(666, CvCONDP(compcv), 1, pthread_cond_t); + COND_INIT(CvCONDP(compcv)); + #endif /* USE_THREADS */ - pad = newAV(); - comppad = pad; + comppad = newAV(); av_push(comppad, Nullsv); curpad = AvARRAY(comppad); - padname = newAV(); - comppad_name = padname; + comppad_name = newAV(); comppad_name_fill = 0; + #ifdef USE_THREADS + av_store(comppad_name, 0, newSVpv("@_", 2)); + #endif /* USE_THREADS */ min_intro_pending = 0; padix = 0; @@@ -830,17 -600,10 +917,18 @@@ in perl_run(sv_interp) PerlInterpreter *sv_interp; { + dTHR; + I32 oldscope; + dJMPENV; + int ret; + if (!(curinterp = sv_interp)) return 255; - switch (Sigsetjmp(top_env,1)) { + + oldscope = scopestack_ix; + + JMPENV_PUSH(ret); + switch (ret) { case 1: cxstack_ix = -1; /* start context stack again */ break; @@@ -872,15 -630,15 +960,19 @@@ break; } + DEBUG_r(PerlIO_printf(PerlIO_stderr(), "%s $` $& $' support.\n", + sawampersand ? "Enabling" : "Omitting")); + if (!restartop) { DEBUG_x(dump_all()); - DEBUG(fprintf(stderr,"\nEXECUTING...\n\n")); + DEBUG(PerlIO_printf(Perl_debug_log, "\nEXECUTING...\n\n")); + #ifdef USE_THREADS - DEBUG_L(fprintf(stderr,"main thread is 0x%lx\n", (unsigned long) thr)); ++ DEBUG_L(PerlIO_printf(Perl_debug_log, "main thread is 0x%lx\n", ++ (unsigned long) thr)); + #endif /* USE_THREADS */ if (minus_c) { - fprintf(stderr,"%s syntax OK\n", origfilename); + PerlIO_printf(PerlIO_stderr(), "%s syntax OK\n", origfilename); my_exit(0); } if (perldb && DBsingle) @@@ -1010,16 -789,14 +1104,17 @@@ perl_call_sv(sv, flags SV* sv; I32 flags; /* See G_* flags in cop.h */ { + dTHR; LOGOP myop; /* fake syntax tree node */ SV** sp = stack_sp; - I32 oldmark = TOPMARK; + I32 oldmark; I32 retval; - Sigjmp_buf oldtop; I32 oldscope; - + static CV *DBcv; + bool oldcatch = CATCH_GET; + dJMPENV; + int ret; + if (flags & G_DISCARD) { ENTER; SAVETMPS; @@@ -1104,11 -878,9 +1199,11 @@@ goto cleanup; } } + else + CATCH_SET(TRUE); if (op == (OP*)&myop) - op = pp_entersub(); + op = pp_entersub(ARGS); if (op) runops(); retval = stack_sp - (stack_base + oldmark); @@@ -1426,12 -1214,13 +1522,13 @@@ char *s } return s; case 'M': - taint_not("-M"); /* XXX ? */ + forbid_setid("-M"); /* XXX ? */ /* FALL THROUGH */ case 'm': - taint_not("-m"); /* XXX ? */ + forbid_setid("-m"); /* XXX ? */ if (*++s) { char *start; + SV *sv; char *use = "use "; /* -M-foo == 'no foo' */ if (*s == '-') { use = "no "; ++s; } @@@ -1575,16 -1387,8 +1672,17 @@@ my_unexec( static void init_main_stash() { + dTHR; GV *gv; + + /* Note that strtab is a rather special HV. Assumptions are made + about not iterating on it, and not adding tie magic to it. + It is properly deallocated in perl_destruct() */ + strtab = newHV(); + HvSHAREKEYS_off(strtab); /* mandatory */ + Newz(506,((XPVHV*)SvANY(strtab))->xhv_array, + sizeof(HE*) * (((XPVHV*)SvANY(strtab))->xhv_max + 1), char); + curstash = defstash = newHV(); curstname = newSVpv("main",4); gv = gv_fetchpv("main::",TRUE, SVt_PVHV); @@@ -2135,18 -1898,9 +2233,19 @@@ init_ids( } static void +forbid_setid(s) +char *s; +{ + if (euid != uid) + croak("No %s allowed while running setuid", s); + if (egid != gid) + croak("No %s allowed while running setgid", s); +} + +static void init_debugger() { + dTHR; curstash = debstash; dbargs = GvAV(gv_AVadd((gv_fetchpv("args", GV_ADDMULTI, SVt_PVAV)))); AvREAL_off(dbargs); @@@ -2162,15 -1916,16 +2261,16 @@@ curstash = defstash; } - static void - init_stacks() + void + init_stacks(ARGS) + dARGS { - stack = newAV(); - mainstack = stack; /* remember in case we switch stacks */ - AvREAL_off(stack); /* not a real array */ - av_extend(stack,127); + curstack = newAV(); + mainstack = curstack; /* remember in case we switch stacks */ + AvREAL_off(curstack); /* not a real array */ + av_extend(curstack,127); - stack_base = AvARRAY(stack); + stack_base = AvARRAY(curstack); stack_sp = stack_base; stack_max = stack_base + 127; @@@ -2181,63 -1952,9 +2281,59 @@@ New(50,tmps_stack,128,SV*); tmps_ix = -1; tmps_max = 128; + - DEBUG( { - New(51,debname,128,char); - New(52,debdelim,128,char); - } ) - + /* + * The following stacks almost certainly should be per-interpreter, + * but for now they're not. XXX + */ + + if (markstack) { + markstack_ptr = markstack; + } else { + New(54,markstack,64,I32); + markstack_ptr = markstack; + markstack_max = markstack + 64; + } + + if (scopestack) { + scopestack_ix = 0; + } else { + New(54,scopestack,32,I32); + scopestack_ix = 0; + scopestack_max = 32; + } + + if (savestack) { + savestack_ix = 0; + } else { + New(54,savestack,128,ANY); + savestack_ix = 0; + savestack_max = 128; + } + + if (retstack) { + retstack_ix = 0; + } else { + New(54,retstack,16,OP*); + retstack_ix = 0; + retstack_max = 16; + } } -static FILE *tmpfp; /* moved outside init_lexer() because of UNICOS bug */ +static void +nuke_stacks() +{ + Safefree(cxstack); + Safefree(tmps_stack); + DEBUG( { + Safefree(debname); + Safefree(debdelim); + } ) ++<<<< +} + +static PerlIO *tmpfp; /* moved outside init_lexer() because of UNICOS bug */ + static void init_lexer() { @@@ -2529,14 -2130,15 +2626,15 @@@ int addsubdirs } void -calllist(list) +call_list(oldscope, list) +I32 oldscope; AV* list; { + dTHR; - Sigjmp_buf oldtop; - STRLEN len; line_t oldline = curcop->cop_line; - - Copy(top_env, oldtop, 1, Sigjmp_buf); + STRLEN len; + dJMPENV; + int ret; while (AvFILL(list) >= 0) { CV *cv = (CV*)av_shift(list); @@@ -2592,79 -2194,13 +2690,85 @@@ FREETMPS; break; } - Copy(oldtop, top_env, 1, Sigjmp_buf); + JMPENV_POP; curcop = &compiling; curcop->cop_line = oldline; - Siglongjmp(top_env, 3); + JMPENV_JUMP(3); } + JMPENV_POP; } +} - Copy(oldtop, top_env, 1, Sigjmp_buf); +void +my_exit(status) +U32 status; +{ ++ dTHR; ++ ++#ifdef USE_THREADS ++ DEBUG_L(PerlIO_printf(Perl_debug_log, "my_exit: thread 0x%lx, status %lu\n", ++ (unsigned long) thr, (unsigned long) status)); ++#endif /* USE_THREADS */ + switch (status) { + case 0: + STATUS_ALL_SUCCESS; + break; + case 1: + STATUS_ALL_FAILURE; + break; + default: + STATUS_NATIVE_SET(status); + break; + } + my_exit_jump(); } +void +my_failure_exit() +{ +#ifdef VMS + if (vaxc$errno & 1) { + if (STATUS_NATIVE & 1) /* fortuitiously includes "-1" */ + STATUS_NATIVE_SET(44); + } + else { + if (!vaxc$errno && errno) /* unlikely */ + STATUS_NATIVE_SET(44); + else + STATUS_NATIVE_SET(vaxc$errno); + } +#else + if (errno & 255) + STATUS_POSIX_SET(errno); + else if (STATUS_POSIX == 0) + STATUS_POSIX_SET(255); +#endif + my_exit_jump(); +} + +static void +my_exit_jump() +{ + register CONTEXT *cx; + I32 gimme; + SV **newsp; + + if (e_tmpname) { + if (e_fp) { + PerlIO_close(e_fp); + e_fp = Nullfp; + } + (void)UNLINK(e_tmpname); + Safefree(e_tmpname); + e_tmpname = Nullch; + } + + if (cxstack_ix >= 0) { + if (cxstack_ix > 0) + dounwind(0); + POPBLOCK(cx,curpm); + LEAVE; + } + + JMPENV_JUMP(2); +} diff --cc perl.h index 8b3996b,3095a91..744905f --- a/perl.h +++ b/perl.h @@@ -52,15 -33,14 +52,19 @@@ # endif #endif + #ifdef USE_THREADS + #include + #endif + -#include "embed.h" - -#define VOIDUSED 1 -#include "config.h" +/* + * SOFT_CAST can be used for args to prototyped functions to retain some + * type checking; it only casts if the compiler does not know prototypes. + */ +#if defined(CAN_PROTOTYPE) && defined(DEBUGGING_COMPILE) +#define SOFT_CAST(type) +#else +#define SOFT_CAST(type) (type) +#endif #ifndef BYTEORDER # define BYTEORDER 0x1234 @@@ -988,11 -611,12 +992,17 @@@ union any void (*any_dptr) _((void*)); }; + #ifdef USE_THREADS + #define ARGSproto struct thread * + #else + #define ARGSproto void + #endif /* USE_THREADS */ + +/* Work around some cygwin32 problems with importing global symbols */ +#if defined(CYGWIN32) && defined(DLLIMPORT) +# include "cw32imp.h" +#endif + #include "regexp.h" #include "sv.h" #include "util.h" @@@ -1291,20 -877,21 +1301,32 @@@ typedef Sighandler_t Sigsave_t /* global state */ EXT PerlInterpreter * curinterp; /* currently running interpreter */ + #ifdef USE_THREADS + EXT pthread_key_t thr_key; /* For per-thread struct thread ptr */ + EXT pthread_mutex_t sv_mutex; /* Mutex for allocating SVs in sv.c */ + EXT pthread_mutex_t malloc_mutex; /* Mutex for malloc */ + EXT pthread_mutex_t eval_mutex; /* Mutex for doeval */ + EXT pthread_cond_t eval_cond; /* Condition variable for doeval */ + EXT struct thread * eval_owner; /* Owner thread for doeval */ + EXT int nthreads; /* Number of threads currently */ + EXT pthread_mutex_t nthreads_mutex; /* Mutex for nthreads */ + EXT pthread_cond_t nthreads_cond; /* Condition variable for nthreads */ + #endif /* USE_THREADS */ + -#ifndef VMS /* VMS doesn't use environ array */ +/* VMS doesn't use environ array and NeXT has problems with crt0.o globals */ +#if !defined(VMS) && !(defined(NeXT) && defined(__DYNAMIC__)) +#ifndef DONT_DECLARE_STD extern char ** environ; /* environment variables supplied via exec */ #endif +#else +# if defined(NeXT) && defined(__DYNAMIC__) + +# include +EXT char *** environ_pointer; +# define environ (*environ_pointer) +# endif +#endif /* environ processing */ + EXT int uid; /* current real user id */ EXT int euid; /* current effective user id */ EXT int gid; /* current real group id */ @@@ -1976,14 -1517,9 +1999,17 @@@ EXT MGVTBL vtbl_fm = {0, magic_setfm EXT MGVTBL vtbl_uvar = {magic_getuvar, magic_setuvar, 0, 0, 0}; + #ifdef USE_THREADS + EXT MGVTBL vtbl_mutex = {0, 0, 0, 0, magic_mutexfree}; + #endif /* USE_THREADS */ +EXT MGVTBL vtbl_defelem = {magic_getdefelem,magic_setdefelem, + 0, 0, magic_freedefelem}; + +#ifdef USE_LOCALE_COLLATE +EXT MGVTBL vtbl_collxfrm = {0, + magic_setcollxfrm, + 0, 0, 0}; +#endif #ifdef OVERLOAD EXT MGVTBL vtbl_amagic = {0, magic_setamagic, @@@ -2013,14 -1547,12 +2039,19 @@@ EXT MGVTBL vtbl_substr EXT MGVTBL vtbl_vec; EXT MGVTBL vtbl_pos; EXT MGVTBL vtbl_bm; +EXT MGVTBL vtbl_fm; EXT MGVTBL vtbl_uvar; + + #ifdef USE_THREADS + EXT MGVTBL vtbl_mutex; + #endif /* USE_THREADS */ + +EXT MGVTBL vtbl_defelem; + +#ifdef USE_LOCALE_COLLATE +EXT MGVTBL vtbl_collxfrm; +#endif + #ifdef OVERLOAD EXT MGVTBL vtbl_amagic; EXT MGVTBL vtbl_amagicelem; diff --cc pp_ctl.c index bc3ebb1,ee463ea..82c59bf --- a/pp_ctl.c +++ b/pp_ctl.c @@@ -23,11 -23,8 +23,11 @@@ #define WORD_ALIGN sizeof(U16) #endif +#define DOCATCH(o) ((CATCH_GET == TRUE) ? docatch(o) : (o)) + +static OP *docatch _((OP *o)); static OP *doeval _((int gimme)); - static OP *dofindlabel _((OP *op, char *label, OP **opstack, OP **oplimit)); -static OP *dofindlabel _((OP *o, char *label, OP **opstack)); ++static OP *dofindlabel _((OP *o, char *label, OP **opstack, OP **oplimit)); static void doparseform _((SV *sv)); static I32 dopoptoeval _((I32 startingblock)); static I32 dopoptolabel _((char *label)); @@@ -888,13 -792,7 +889,14 @@@ char *label I32 dowantarray() { + I32 gimme = block_gimme(); + return (gimme == G_VOID) ? G_SCALAR : gimme; +} + +I32 +block_gimme() +{ + dTHR; I32 cxix; cxix = dopoptosub(cxstack_ix); @@@ -1226,8 -1163,9 +1233,9 @@@ sortcv(a, b const void *a; const void *b; { + dTHR; - SV **str1 = (SV **) a; - SV **str2 = (SV **) b; + SV * const *str1 = (SV * const *)a; + SV * const *str2 = (SV * const *)b; I32 oldsaveix = savestack_ix; I32 oldscopeix = scopestack_ix; I32 result; @@@ -1253,17 -1191,54 +1261,36 @@@ sortcmp(a, b const void *a; const void *b; { - register SV *str1 = *(SV **) a; - register SV *str2 = *(SV **) b; - I32 retval; - - if (!SvPOKp(str1)) { - if (!SvPOKp(str2)) - return 0; - else - return -1; - } - if (!SvPOKp(str2)) - return 1; + return sv_cmp(*(SV * const *)a, *(SV * const *)b); +} - if (SvCUR(str1) < SvCUR(str2)) { - /*SUPPRESS 560*/ - if (retval = memcmp(SvPVX(str1), SvPVX(str2), SvCUR(str1))) - return retval; - else - return -1; - } - /*SUPPRESS 560*/ - else if (retval = memcmp(SvPVX(str1), SvPVX(str2), SvCUR(str2))) - return retval; - else if (SvCUR(str1) == SvCUR(str2)) - return 0; - else - return 1; +static int +sortcmp_locale(a, b) +const void *a; +const void *b; +{ + return sv_cmp_locale(*(SV * const *)a, *(SV * const *)b); } + #ifdef USE_THREADS + static void + unlock_condpair(svv) + void *svv; + { + dTHR; + MAGIC *mg = mg_find((SV*)svv, 'm'); + + if (!mg) + croak("panic: unlock_condpair unlocking non-mutex"); + MUTEX_LOCK(MgMUTEXP(mg)); + if (MgOWNER(mg) != thr) + croak("panic: unlock_condpair unlocking mutex that we don't own"); + MgOWNER(mg) = 0; + COND_SIGNAL(MgOWNERCONDP(mg)); + MUTEX_UNLOCK(MgMUTEXP(mg)); + } + #endif /* USE_THREADS */ + PP(pp_reset) { dSP; @@@ -1634,45 -1599,40 +1688,45 @@@ PP(pp_redo static OP* lastgotoprobe; static OP * - dofindlabel(op,label,opstack,oplimit) - OP *op; -dofindlabel(o,label,opstack) ++dofindlabel(o,label,opstack,oplimit) + OP *o; char *label; OP **opstack; +OP **oplimit; { OP *kid; OP **ops = opstack; + static char too_deep[] = "Target of goto is too deeply nested"; + if (ops >= oplimit) + croak(too_deep); - if (op->op_type == OP_LEAVE || - op->op_type == OP_SCOPE || - op->op_type == OP_LEAVELOOP || - op->op_type == OP_LEAVETRY) + if (o->op_type == OP_LEAVE || + o->op_type == OP_SCOPE || + o->op_type == OP_LEAVELOOP || + o->op_type == OP_LEAVETRY) - *ops++ = cUNOPo->op_first; + { - *ops++ = cUNOP->op_first; ++ *ops++ = cUNOPo->op_first; + if (ops >= oplimit) + croak(too_deep); + } *ops = 0; - if (op->op_flags & OPf_KIDS) { + if (o->op_flags & OPf_KIDS) { /* First try all the kids at this level, since that's likeliest. */ - for (kid = cUNOP->op_first; kid; kid = kid->op_sibling) { + for (kid = cUNOPo->op_first; kid; kid = kid->op_sibling) { if ((kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) && kCOP->cop_label && strEQ(kCOP->cop_label, label)) return kid; } - for (kid = cUNOP->op_first; kid; kid = kid->op_sibling) { + for (kid = cUNOPo->op_first; kid; kid = kid->op_sibling) { if (kid == lastgotoprobe) continue; - if (kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) { - if (ops > opstack && - (ops[-1]->op_type == OP_NEXTSTATE || - ops[-1]->op_type == OP_DBSTATE)) - *ops = kid; - else - *ops++ = kid; - } - if (o = dofindlabel(kid,label,ops)) + if ((kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) && + (ops == opstack || + (ops[-1]->op_type != OP_NEXTSTATE && + ops[-1]->op_type != OP_DBSTATE))) + *ops++ = kid; - if (op = dofindlabel(kid, label, ops, oplimit)) - return op; ++ if (o = dofindlabel(kid, label, ops, oplimit)) + return o; } } *ops = 0; @@@ -2100,16 -1996,21 +2155,24 @@@ int gimme dSP; OP *saveop = op; HV *newstash; + CV *caller; AV* comppadlist; + #ifdef USE_THREADS + MUTEX_LOCK(&eval_mutex); + if (eval_owner && eval_owner != thr) + while (eval_owner) + COND_WAIT(&eval_cond, &eval_mutex); + eval_owner = thr; + MUTEX_UNLOCK(&eval_mutex); + #endif /* USE_THREADS */ in_eval = 1; + PUSHMARK(SP); + /* set up a scratch pad */ - SAVEINT(padix); + SAVEI32(padix); SAVESPTR(curpad); SAVESPTR(comppad); SAVESPTR(comppad_name); @@@ -2121,7 -2021,13 +2184,14 @@@ SAVESPTR(compcv); compcv = (CV*)NEWSV(1104,0); sv_upgrade((SV *)compcv, SVt_PVCV); + CvUNIQUE_on(compcv); + #ifdef USE_THREADS + CvOWNER(compcv) = 0; + New(666, CvMUTEXP(compcv), 1, pthread_mutex_t); + MUTEX_INIT(CvMUTEXP(compcv)); + New(666, CvCONDP(compcv), 1, pthread_cond_t); + COND_INIT(CvCONDP(compcv)); + #endif /* USE_THREADS */ comppad = newAV(); comppad_name = newAV(); @@@ -2203,23 -2100,14 +2276,29 @@@ DEBUG_x(dump_eval()); + /* Register with debugger: */ + if (perldb && saveop->op_type == OP_REQUIRE) { + CV *cv = perl_get_cv("DB::postponed", FALSE); + if (cv) { + dSP; + PUSHMARK(sp); + XPUSHs((SV*)compiling.cop_filegv); + PUTBACK; + perl_call_sv((SV*)cv, G_DISCARD); + } + } + /* compiled okay, so do it */ + CvDEPTH(compcv) = 1; - + SP = stack_base + POPMARK; /* pop original mark */ + #ifdef USE_THREADS + MUTEX_LOCK(&eval_mutex); + eval_owner = 0; + COND_SIGNAL(&eval_cond); + MUTEX_UNLOCK(&eval_mutex); + #endif /* USE_THREADS */ ++ RETURNOP(eval_start); } diff --cc pp_sys.c index 03a10fe,60a5678..1b25bf4 --- a/pp_sys.c +++ b/pp_sys.c @@@ -524,13 -415,11 +524,13 @@@ PP(pp_tie ENTER; SAVESPTR(op); op = (OP *) &myop; + if (perldb && curstash != debstash) + op->op_private |= OPpENTERSUB_DB; - XPUSHs(gv); + XPUSHs((SV*)GvCV(gv)); PUTBACK; - if (op = pp_entersub()) + if (op = pp_entersub(ARGS)) runops(); SPAGAIN; @@@ -635,10 -503,8 +635,10 @@@ PP(pp_dbmopen ENTER; SAVESPTR(op); op = (OP *) &myop; + if (perldb && curstash != debstash) + op->op_private |= OPpENTERSUB_DB; PUTBACK; - pp_pushmark(); + pp_pushmark(ARGS); EXTEND(sp, 5); PUSHs(sv); @@@ -648,10 -514,10 +648,10 @@@ else PUSHs(sv_2mortal(newSViv(O_RDWR))); PUSHs(right); - PUSHs(gv); + PUSHs((SV*)GvCV(gv)); PUTBACK; - if (op = pp_entersub()) + if (op = pp_entersub(ARGS)) runops(); SPAGAIN; @@@ -665,10 -531,10 +665,10 @@@ PUSHs(left); PUSHs(sv_2mortal(newSViv(O_RDONLY))); PUSHs(right); - PUSHs(gv); + PUSHs((SV*)GvCV(gv)); PUTBACK; - if (op = pp_entersub()) + if (op = pp_entersub(ARGS)) runops(); SPAGAIN; } @@@ -910,8 -759,9 +911,9 @@@ CV *cv GV *gv; OP *retop; { + dTHR; register CONTEXT *cx; - I32 gimme = GIMME; + I32 gimme = GIMME_V; AV* padlist = CvPADLIST(cv); SV** svp = AvARRAY(padlist); diff --cc proto.h index a20ce43,5d62d0f..28f239c --- a/proto.h +++ b/proto.h @@@ -13,18 -13,7 +13,18 @@@ bool Gv_AMupdate _((HV* stash)) OP* append_elem _((I32 optype, OP* head, OP* tail)); OP* append_list _((I32 optype, LISTOP* first, LISTOP* last)); I32 apply _((I32 type, SV** mark, SV** sp)); - void assertref _((OP* op)); + void assertref _((OP* o)); +SV* avhv_delete _((AV *ar, char* key, U32 klen, I32 flags)); +SV* avhv_delete_ent _((AV *ar, SV* keysv, I32 flags, U32 hash)); +bool avhv_exists _((AV *ar, char* key, U32 klen)); +bool avhv_exists_ent _((AV *ar, SV* keysv, U32 hash)); +SV** avhv_fetch _((AV *ar, char* key, U32 klen, I32 lval)); +SV** avhv_fetch_ent _((AV *ar, SV* keysv, I32 lval, U32 hash)); +I32 avhv_iterinit _((AV *ar)); +HE* avhv_iternext _((AV *ar)); +SV * avhv_iternextsv _((AV *ar, char** key, I32* retlen)); +SV* avhv_iterval _((AV *ar, HE* entry)); +SV** avhv_store _((AV *ar, char* key, U32 klen, SV* val, U32 hash)); void av_clear _((AV* ar)); void av_extend _((AV* ar, I32 key)); AV* av_fake _((I32 size, SV** svp)); @@@ -49,26 -36,28 +49,29 @@@ I32 cando _((I32 bit, I32 effective, st U32 cast_ulong _((double f)); #endif #if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP) -I32 chsize _((int fd, Off_t length)); +I32 my_chsize _((int fd, Off_t length)); #endif -OP * ck_gvconst _((OP * o)); -OP * ck_retarget _((OP *o)); +OP* ck_gvconst _((OP* o)); - OP* ck_retarget _((OP* op)); - OP* convert _((I32 optype, I32 flags, OP* op)); ++OP* ck_retarget _((OP* o)); + #ifdef USE_THREADS + MAGIC * condpair_magic _((SV *sv)); + #endif + OP* convert _((I32 optype, I32 flags, OP* o)); -char* cpytill _((char* to, char* from, char* fromend, int delim, I32* retlen)); -void croak _((char* pat,...)) __attribute__((format(printf,1,2),noreturn)); +void croak _((const char* pat,...)) __attribute__((noreturn)); +void cv_ckproto _((CV* cv, GV* gv, char* p)); CV* cv_clone _((CV* proto)); +SV* cv_const_sv _((CV* cv)); void cv_undef _((CV* cv)); #ifdef DEBUGGING void cx_dump _((CONTEXT* cs)); #endif -SV * filter_add _((filter_t funcp, SV *datasv)); +SV* filter_add _((filter_t funcp, SV* datasv)); void filter_del _((filter_t funcp)); -I32 filter_read _((int idx, SV *buffer, int maxlen)); +I32 filter_read _((int idx, SV* buffer, int maxlen)); I32 cxinc _((void)); -void deb _((char* pat,...)) __attribute__((format(printf,1,2))); +void deb _((const char* pat,...)) __attribute__((format(printf,1,2))); void deb_growlevel _((void)); - I32 debop _((OP* op)); + I32 debop _((OP* o)); I32 debstackptrs _((void)); #ifdef DEBUGGING void debprofdump _((void)); @@@ -128,13 -114,12 +131,13 @@@ void dump_op _((OP* arg)) void dump_pm _((PMOP* pm)); void dump_packsubs _((HV* stash)); void dump_sub _((GV* gv)); -void fbm_compile _((SV* sv, I32 iflag)); +void fbm_compile _((SV* sv)); char* fbm_instr _((unsigned char* big, unsigned char* bigend, SV* littlesv)); OP* force_list _((OP* arg)); -OP* fold_constants _((OP * arg)); +OP* fold_constants _((OP* arg)); +char* form _((const char* pat, ...)); void free_tmps _((void)); - OP* gen_constant_list _((OP* op)); + OP* gen_constant_list _((OP* o)); void gp_free _((GV* gv)); GP* gp_ref _((GP* gp)); GV* gv_AVadd _((GV* gv)); @@@ -147,39 -130,29 +150,40 @@@ void gv_efullname3 _((SV* sv, GV* gv, c GV* gv_fetchfile _((char* name)); GV* gv_fetchmeth _((HV* stash, char* name, STRLEN len, I32 level)); GV* gv_fetchmethod _((HV* stash, char* name)); +GV* gv_fetchmethod_autoload _((HV* stash, char* name, I32 autoload)); GV* gv_fetchpv _((char* name, I32 add, I32 sv_type)); void gv_fullname _((SV* sv, GV* gv)); -void gv_init _((GV *gv, HV *stash, char *name, STRLEN len, int multi)); +void gv_fullname3 _((SV* sv, GV* gv, char* prefix)); +void gv_init _((GV* gv, HV* stash, char* name, STRLEN len, int multi)); HV* gv_stashpv _((char* name, I32 create)); +HV* gv_stashpvn _((char* name, U32 namelen, I32 create)); HV* gv_stashsv _((SV* sv, I32 create)); -void he_delayfree _((HE* hent)); -void he_free _((HE* hent)); void hoistmust _((PMOP* pm)); void hv_clear _((HV* tb)); +void hv_delayfree_ent _((HV* hv, HE* entry)); SV* hv_delete _((HV* tb, char* key, U32 klen, I32 flags)); +SV* hv_delete_ent _((HV* tb, SV* key, I32 flags, U32 hash)); bool hv_exists _((HV* tb, char* key, U32 klen)); +bool hv_exists_ent _((HV* tb, SV* key, U32 hash)); SV** hv_fetch _((HV* tb, char* key, U32 klen, I32 lval)); +HE* hv_fetch_ent _((HV* tb, SV* key, I32 lval, U32 hash)); +void hv_free_ent _((HV* hv, HE* entry)); I32 hv_iterinit _((HV* tb)); char* hv_iterkey _((HE* entry, I32* retlen)); +SV* hv_iterkeysv _((HE* entry)); HE* hv_iternext _((HV* tb)); -SV * hv_iternextsv _((HV* hv, char** key, I32* retlen)); +SV* hv_iternextsv _((HV* hv, char** key, I32* retlen)); SV* hv_iterval _((HV* tb, HE* entry)); +void hv_ksplit _((HV* hv, IV newmax)); void hv_magic _((HV* hv, GV* gv, int how)); SV** hv_store _((HV* tb, char* key, U32 klen, SV* val, U32 hash)); +HE* hv_store_ent _((HV* tb, SV* key, SV* val, U32 hash)); void hv_undef _((HV* tb)); -I32 ibcmp _((U8* a, U8* b, I32 len)); +I32 ibcmp _((char* a, char* b, I32 len)); +I32 ibcmp_locale _((char* a, char* b, I32 len)); I32 ingroup _((I32 testgid, I32 effective)); + void init_stacks _((ARGSproto)); +U32 intro_my _((void)); char* instr _((char* big, char* little)); bool io_close _((IO* io)); OP* invert _((OP* cmd)); @@@ -187,8 -160,8 +191,8 @@@ OP* jmaybe _((OP* arg)) I32 keyword _((char* d, I32 len)); void leave_scope _((I32 base)); void lex_end _((void)); -void lex_start _((SV *line)); +void lex_start _((SV* line)); - OP* linklist _((OP* op)); + OP* linklist _((OP* o)); OP* list _((OP* o)); OP* listkids _((OP* o)); OP* localize _((OP* arg, I32 lexical)); @@@ -249,28 -220,25 +256,31 @@@ int mg_get _((SV* sv)) U32 mg_len _((SV* sv)); void mg_magical _((SV* sv)); int mg_set _((SV* sv)); - OP* mod _((OP* op, I32 type)); + OP* mod _((OP* o, I32 type)); char* moreswitches _((char* s)); - OP* my _((OP* op)); + #ifdef USE_THREADS + void mutex_unlock _((void *m)); + #endif /* USE_THREADS */ -OP * my _(( OP *)); ++OP* my _((OP* o)); +#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY) char* my_bcopy _((char* from, char* to, I32 len)); +#endif #if !defined(HAS_BZERO) && !defined(HAS_MEMSET) char* my_bzero _((char* loc, I32 len)); #endif void my_exit _((U32 status)) __attribute__((noreturn)); +void my_failure_exit _((void)) __attribute__((noreturn)); - I32 my_lstat _((void)); + I32 my_lstat _((ARGSproto)); -#ifndef HAS_MEMCMP -I32 my_memcmp _((unsigned char* s1, unsigned char* s2, I32 len)); +#if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP) +I32 my_memcmp _((char* s1, char* s2, I32 len)); #endif -I32 my_pclose _((FILE* ptr)); -FILE* my_popen _((char* cmd, char* mode)); +#if !defined(HAS_MEMSET) +void* my_memset _((char* loc, I32 ch, I32 len)); +#endif +I32 my_pclose _((PerlIO* ptr)); +PerlIO* my_popen _((char* cmd, char* mode)); void my_setenv _((char* nam, char* val)); - I32 my_stat _((void)); + I32 my_stat _((ARGSproto)); #ifdef MYSWAP short my_swap _((short s)); long my_htonl _((long l)); @@@ -293,10 -261,10 +303,10 @@@ void newPROG _((OP* o)) OP* newRANGE _((I32 flags, OP* left, OP* right)); OP* newSLICEOP _((I32 flags, OP* subscript, OP* list)); OP* newSTATEOP _((I32 flags, char* label, OP* o)); - CV* newSUB _((I32 floor, OP* op, OP* proto, OP* block)); + CV* newSUB _((I32 floor, OP* o, OP* proto, OP* block)); -CV* newXS _((char *name, void (*subaddr)(CV* cv), char *filename)); +CV* newXS _((char* name, void (*subaddr)(CV* cv), char* filename)); #ifdef DEPRECATED -CV* newXSUB _((char *name, I32 ix, I32 (*subaddr)(int,int,int), char *filename)); +CV* newXSUB _((char* name, I32 ix, I32 (*subaddr)(int,int,int), char* filename)); #endif AV* newAV _((void)); OP* newAVREF _((OP* o)); @@@ -326,12 -293,12 +336,12 @@@ SV* newSVpvf _((const char* pat, ...)) SV* newSVrv _((SV* rv, char* classname)); SV* newSVsv _((SV* old)); OP* newUNOP _((I32 type, I32 flags, OP* first)); -OP * newWHILEOP _((I32 flags, I32 debuggable, LOOP* loop, OP* expr, OP* block, OP* cont)); -FILE* nextargv _((GV* gv)); +OP* newWHILEOP _((I32 flags, I32 debuggable, LOOP* loop, OP* expr, OP* block, OP* cont)); +PerlIO* nextargv _((GV* gv)); char* ninstr _((char* big, char* bigend, char* little, char* lend)); -OP * oopsCV _((OP* o)); +OP* oopsCV _((OP* o)); void op_free _((OP* arg)); - void package _((OP* op)); + void package _((OP* o)); PADOFFSET pad_alloc _((I32 optype, U32 tmptype)); PADOFFSET pad_allocmy _((char* name)); PADOFFSET pad_findmy _((char* name)); @@@ -375,26 -335,34 +385,26 @@@ OP* pmtrans _((OP* o, OP* expr, OP* rep OP* pop_return _((void)); void pop_scope _((void)); OP* prepend_elem _((I32 optype, OP* head, OP* tail)); - void push_return _((OP* op)); -void provide_ref _((OP* o, SV* sv)); + void push_return _((OP* o)); void push_scope _((void)); regexp* pregcomp _((char* exp, char* xend, PMOP* pm)); - OP* ref _((OP* op, I32 type)); - OP* refkids _((OP* op, I32 type)); + OP* ref _((OP* o, I32 type)); + OP* refkids _((OP* o, I32 type)); void regdump _((regexp* r)); I32 pregexec _((regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, I32 safebase)); void pregfree _((struct regexp* r)); char* regnext _((char* p)); - void regprop _((SV* sv, char* op)); -char* regprop _((char* o)); ++void regprop _((SV* sv, char* o)); void repeatcpy _((char* to, char* from, I32 len, I32 count)); char* rninstr _((char* big, char* bigend, char* little, char* lend)); +Sighandler_t rsignal _((int, Sighandler_t)); +int rsignal_restore _((int, Sigsave_t*)); +int rsignal_save _((int, Sighandler_t, Sigsave_t*)); +Sighandler_t rsignal_state _((int)); int runops _((void)); -#ifndef safemalloc -void safefree _((char* where)); -char* safemalloc _((MEM_SIZE size)); -#ifndef MSDOS -char* saferealloc _((char* where, MEM_SIZE size)); -#else -char* saferealloc _((char* where, unsigned long size)); -#endif -#endif -#ifdef LEAKTEST -void safexfree _((char* where)); -char* safexmalloc _((I32 x, MEM_SIZE size)); -char* safexrealloc _((char* where, MEM_SIZE size)); -#endif +void rxres_free _((void** rsp)); +void rxres_restore _((void** rsp, REGEXP* rx)); +void rxres_save _((void** rsp, REGEXP* rx)); #ifndef HAS_RENAME I32 same_dirent _((char* a, char* b)); #endif @@@ -409,12 -377,10 +419,12 @@@ void save_delete _((HV* hv, char* key, void save_destructor _((void (*f)(void*), void* p)); #endif /* titan */ void save_freesv _((SV* sv)); - void save_freeop _((OP* op)); + void save_freeop _((OP* o)); void save_freepv _((char* pv)); +void save_gp _((GV* gv, I32 empty)); HV* save_hash _((GV* gv)); void save_hptr _((HV** hptr)); +void save_I16 _((I16* intp)); void save_I32 _((I32* intp)); void save_int _((int* intp)); void save_item _((SV* item)); @@@ -428,12 -393,12 +438,12 @@@ void save_sptr _((SV** sptr)) SV* save_svref _((SV** sptr)); OP* sawparens _((OP* o)); OP* scalar _((OP* o)); - OP* scalarkids _((OP* op)); + OP* scalarkids _((OP* o)); OP* scalarseq _((OP* o)); - OP* scalarvoid _((OP* op)); + OP* scalarvoid _((OP* o)); -unsigned long scan_hex _((char* start, I32 len, I32* retlen)); +UV scan_hex _((char* start, I32 len, I32* retlen)); char* scan_num _((char* s)); -unsigned long scan_oct _((char* start, I32 len, I32* retlen)); +UV scan_oct _((char* start, I32 len, I32* retlen)); OP* scope _((OP* o)); char* screaminstr _((SV* bigsv, SV* littlesv)); #ifndef VMS diff --cc regcomp.c index d3788c8,b9cb327..516cfef --- a/regcomp.c +++ b/regcomp.c @@@ -1589,15 -1501,15 +1593,15 @@@ regexp *r /* - regprop - printable representation of opcode */ -char * -regprop(o) +void - regprop(sv, op) ++regprop(sv, o) +SV *sv; - char *op; + char *o; { register char *p = 0; - (void) strcpy(buf, ":"); - + sv_setpv(sv, ":"); - switch (OP(op)) { + switch (OP(o)) { case BOL: p = "BOL"; break; @@@ -1655,23 -1564,36 +1659,23 @@@ case NBOUND: p = "NBOUND"; break; - case SPACE: - p = "SPACE"; - break; - case NSPACE: - p = "NSPACE"; - break; - case DIGIT: - p = "DIGIT"; - break; - case NDIGIT: - p = "NDIGIT"; + case NBOUNDL: + p = "NBOUNDL"; break; case CURLY: - sv_catpvf(sv, "CURLY {%d,%d}", ARG1(op), ARG2(op)); - (void)sprintf(buf+strlen(buf), "CURLY {%d,%d}", ARG1(o),ARG2(o)); - p = NULL; ++ sv_catpvf(sv, "CURLY {%d,%d}", ARG1(o), ARG2(o)); break; case CURLYX: - sv_catpvf(sv, "CURLYX {%d,%d}", ARG1(op), ARG2(op)); - (void)sprintf(buf+strlen(buf), "CURLYX {%d,%d}", ARG1(o),ARG2(o)); - p = NULL; ++ sv_catpvf(sv, "CURLYX {%d,%d}", ARG1(o), ARG2(o)); break; case REF: - sv_catpvf(sv, "REF%d", ARG1(op)); - (void)sprintf(buf+strlen(buf), "REF%d", ARG1(o)); - p = NULL; ++ sv_catpvf(sv, "REF%d", ARG1(o)); break; case OPEN: - sv_catpvf(sv, "OPEN%d", ARG1(op)); - (void)sprintf(buf+strlen(buf), "OPEN%d", ARG1(o)); - p = NULL; ++ sv_catpvf(sv, "OPEN%d", ARG1(o)); break; case CLOSE: - sv_catpvf(sv, "CLOSE%d", ARG1(op)); - (void)sprintf(buf+strlen(buf), "CLOSE%d", ARG1(o)); ++ sv_catpvf(sv, "CLOSE%d", ARG1(o)); p = NULL; break; case STAR: diff --cc regexec.c index 630b130,6c00651..e851808 --- a/regexec.c +++ b/regexec.c @@@ -107,9 -108,10 +108,10 @@@ I32 parenfloor return retval; } -char* +static char * regcppop() { + dTHR; I32 i = SSPOPINT; U32 paren = 0; char *input; diff --cc run.c index 0ce2b9f,3be9825..e416160 --- a/run.c +++ b/run.c @@@ -26,9 -27,7 +27,9 @@@ runops() SAVEI32(runlevel); runlevel++; - while ( op = (*op->op_ppaddr)() ) ; + while ( op = (*op->op_ppaddr)(ARGS) ) ; + + TAINT_NOT; return 0; } @@@ -54,29 -54,30 +56,32 @@@ runops() DEBUG_s(debstack()); DEBUG_t(debop(op)); DEBUG_P(debprof(op)); + #ifdef USE_THREADS + DEBUG_L(YIELD()); /* shake up scheduling a bit */ + #endif /* USE_THREADS */ } - } while ( op = (*op->op_ppaddr)() ); + } while ( op = (*op->op_ppaddr)(ARGS) ); + + TAINT_NOT; return 0; } I32 - debop(op) - OP *op; + debop(o) + OP *o; { SV *sv; - deb("%s", op_name[op->op_type]); - switch (op->op_type) { + deb("%s", op_name[o->op_type]); + switch (o->op_type) { case OP_CONST: - PerlIO_printf(Perl_debug_log, "(%s)", SvPEEK(cSVOP->op_sv)); - fprintf(stderr, "(%s)", SvPEEK(cSVOPo->op_sv)); ++ PerlIO_printf(Perl_debug_log, "(%s)", SvPEEK(cSVOPo->op_sv)); break; case OP_GVSV: case OP_GV: - if (cGVOP->op_gv) { + if (cGVOPo->op_gv) { sv = NEWSV(0,0); - gv_fullname3(sv, cGVOP->op_gv, Nullch); - gv_fullname(sv, cGVOPo->op_gv); - fprintf(stderr, "(%s)", SvPV(sv, na)); ++ gv_fullname3(sv, cGVOPo->op_gv, Nullch); + PerlIO_printf(Perl_debug_log, "(%s)", SvPV(sv, na)); SvREFCNT_dec(sv); } else diff --cc scope.c index 0487ebe,035a493..cf58e24 --- a/scope.c +++ b/scope.c @@@ -21,8 -21,9 +21,9 @@@ SV** sp SV** p; int n; { + dTHR; stack_sp = sp; - av_extend(stack, (p - stack_base) + (n) + 128); + av_extend(curstack, (p - stack_base) + (n) + 128); return stack_sp; } @@@ -107,14 -116,20 +116,15 @@@ free_tmps( } } -SV * -save_scalar(gv) -GV *gv; +static SV * +save_scalar_at(sptr) +SV **sptr; { + dTHR; register SV *sv; - SV *osv = GvSV(gv); - - SSCHECK(3); - SSPUSHPTR(gv); - SSPUSHPTR(osv); - SSPUSHINT(SAVEt_SV); + SV *osv = *sptr; - sv = GvSV(gv) = NEWSV(0,0); + sv = *sptr = NEWSV(0,0); if (SvTYPE(osv) >= SVt_PVMG && SvMAGIC(osv) && SvTYPE(osv) != SVt_PVGV) { sv_upgrade(sv, SvTYPE(osv)); if (SvGMAGICAL(osv)) { @@@ -138,50 -153,64 +148,52 @@@ return sv; } -#ifdef INLINED_ELSEWHERE -void -save_gp(gv) +SV * +save_scalar(gv) GV *gv; { + dTHR; - register GP *gp; - GP *ogp = GvGP(gv); - SSCHECK(3); - SSPUSHPTR(SvREFCNT_inc(gv)); - SSPUSHPTR(ogp); - SSPUSHINT(SAVEt_GP); - - Newz(602,gp, 1, GP); - GvGP(gv) = gp; - GvREFCNT(gv) = 1; - GvSV(gv) = NEWSV(72,0); - GvLINE(gv) = curcop->cop_line; - GvEGV(gv) = gv; + SSPUSHPTR(gv); + SSPUSHPTR(GvSV(gv)); + SSPUSHINT(SAVEt_SV); + return save_scalar_at(&GvSV(gv)); } -#endif SV* save_svref(sptr) SV **sptr; { + dTHR; - register SV *sv; - SV *osv = *sptr; - SSCHECK(3); - SSPUSHPTR(*sptr); SSPUSHPTR(sptr); + SSPUSHPTR(*sptr); SSPUSHINT(SAVEt_SVREF); + return save_scalar_at(sptr); +} - sv = *sptr = NEWSV(0,0); - if (SvTYPE(osv) >= SVt_PVMG && SvMAGIC(osv) && SvTYPE(osv) != SVt_PVGV) { - sv_upgrade(sv, SvTYPE(osv)); - if (SvGMAGICAL(osv)) { - MAGIC* mg; - bool oldtainted = tainted; - mg_get(osv); - if (tainting && tainted && (mg = mg_find(osv, 't'))) { - SAVESPTR(mg->mg_obj); - mg->mg_obj = osv; - } - SvFLAGS(osv) |= (SvFLAGS(osv) & - (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; - tainted = oldtainted; - } - SvMAGIC(sv) = SvMAGIC(osv); - SvFLAGS(sv) |= SvMAGICAL(osv); - localizing = 1; - SvSETMAGIC(sv); - localizing = 0; +void +save_gp(gv, empty) +GV *gv; +I32 empty; +{ + SSCHECK(3); + SSPUSHPTR(SvREFCNT_inc(gv)); + SSPUSHPTR(GvGP(gv)); + SSPUSHINT(SAVEt_GP); + + if (empty) { + register GP *gp; + Newz(602, gp, 1, GP); + GvGP(gv) = gp_ref(gp); + GvSV(gv) = NEWSV(72,0); + GvLINE(gv) = curcop->cop_line; + GvEGV(gv) = gv; + } + else { + gp_ref(GvGP(gv)); + GvINTRO_on(gv); } - return sv; } AV * @@@ -614,15 -644,16 +646,16 @@@ voi cx_dump(cx) CONTEXT* cx; { + dTHR; - fprintf(stderr, "CX %d = %s\n", cx - cxstack, block_type[cx->cx_type]); + PerlIO_printf(Perl_debug_log, "CX %d = %s\n", cx - cxstack, block_type[cx->cx_type]); if (cx->cx_type != CXt_SUBST) { - fprintf(stderr, "BLK_OLDSP = %ld\n", (long)cx->blk_oldsp); - fprintf(stderr, "BLK_OLDCOP = 0x%lx\n", (long)cx->blk_oldcop); - fprintf(stderr, "BLK_OLDMARKSP = %ld\n", (long)cx->blk_oldmarksp); - fprintf(stderr, "BLK_OLDSCOPESP = %ld\n", (long)cx->blk_oldscopesp); - fprintf(stderr, "BLK_OLDRETSP = %ld\n", (long)cx->blk_oldretsp); - fprintf(stderr, "BLK_OLDPM = 0x%lx\n", (long)cx->blk_oldpm); - fprintf(stderr, "BLK_GIMME = %s\n", cx->blk_gimme ? "LIST" : "SCALAR"); + PerlIO_printf(Perl_debug_log, "BLK_OLDSP = %ld\n", (long)cx->blk_oldsp); + PerlIO_printf(Perl_debug_log, "BLK_OLDCOP = 0x%lx\n", (long)cx->blk_oldcop); + PerlIO_printf(Perl_debug_log, "BLK_OLDMARKSP = %ld\n", (long)cx->blk_oldmarksp); + PerlIO_printf(Perl_debug_log, "BLK_OLDSCOPESP = %ld\n", (long)cx->blk_oldscopesp); + PerlIO_printf(Perl_debug_log, "BLK_OLDRETSP = %ld\n", (long)cx->blk_oldretsp); + PerlIO_printf(Perl_debug_log, "BLK_OLDPM = 0x%lx\n", (long)cx->blk_oldpm); + PerlIO_printf(Perl_debug_log, "BLK_GIMME = %s\n", cx->blk_gimme ? "LIST" : "SCALAR"); } switch (cx->cx_type) { case CXt_NULL: diff --cc sv.c index ece94b9,52e9b26..1331f89 --- a/sv.c +++ b/sv.c @@@ -156,35 -73,35 +156,37 @@@ U32 flags free(ptr); } -#else +#else /* ! PURIFY */ + +/* + * "A time to plant, and a time to uproot what was planted..." + */ + +#define plant_SV(p) \ + do { \ + SvANY(p) = (void *)sv_root; \ + SvFLAGS(p) = SVTYPEMASK; \ + sv_root = (p); \ + --sv_count; \ + } while (0) -#define new_SV() \ +#define uproot_SV(p) \ do { \ + MUTEX_LOCK(&sv_mutex); \ - if (sv_root) { \ - sv = sv_root; \ - sv_root = (SV*)SvANY(sv); \ - ++sv_count; \ - } \ - else \ - sv = more_sv(); \ + (p) = sv_root; \ + sv_root = (SV*)SvANY(p); \ + ++sv_count; \ + MUTEX_UNLOCK(&sv_mutex); \ } while (0) -static SV* -new_sv() -{ - SV* sv; - if (sv_root) { - sv = sv_root; - sv_root = (SV*)SvANY(sv); - ++sv_count; - return sv; - } - return more_sv(); -} +#define new_SV(p) \ + if (sv_root) \ + uproot_SV(p); \ + else \ + (p) = more_sv() #ifdef DEBUGGING + #define del_SV(p) \ if (debug & 32768) \ del_sv(p); \ @@@ -1120,8 -1030,11 +1122,11 @@@ IV i case SVt_PVCV: case SVt_PVFM: case SVt_PVIO: - croak("Can't coerce %s to integer in %s", sv_reftype(sv,0), - op_desc[op->op_type]); + { + dTHR; + croak("Can't coerce %s to integer in %s", sv_reftype(sv,0), - op_name[op->op_type]); ++ op_desc[op->op_type]); + } } (void)SvIOK_only(sv); /* validate number */ SvIVX(sv) = i; @@@ -1305,13 -1197,16 +1314,14 @@@ register SV *sv if (SvNVX(sv) < 0.0) SvIVX(sv) = I_V(SvNVX(sv)); else - SvIVX(sv) = (IV) U_V(SvNVX(sv)); + SvUVX(sv) = U_V(SvNVX(sv)); } else if (SvPOKp(sv) && SvLEN(sv)) { - if (dowarn && !looks_like_number(sv)) - not_a_number(sv); (void)SvIOK_on(sv); - SvIVX(sv) = (IV)atol(SvPVX(sv)); + SvIVX(sv) = asIV(sv); } else { + dTHR; if (dowarn && !localizing && !(SvFLAGS(sv) & SVs_PADTMP)) warn(warn_uninit); return 0; @@@ -1711,12 -1403,15 +1722,13 @@@ STRLEN *lp else if (SvIOKp(sv)) { if (SvTYPE(sv) < SVt_PVIV) sv_upgrade(sv, SVt_PVIV); - SvGROW(sv, 11); - s = SvPVX(sv); olderrno = errno; /* some Xenix systems wipe out errno here */ - (void)sprintf(s,"%ld",(long)SvIVX(sv)); + sv_setpvf(sv, "%Vd", SvIVX(sv)); errno = olderrno; - while (*s) s++; + s = SvEND(sv); } else { + dTHR; if (dowarn && !localizing && !(SvFLAGS(sv) & SVs_PADTMP)) warn(warn_uninit); *lp = 0; @@@ -2443,11 -2086,11 +2459,16 @@@ I32 namlen case 'l': mg->mg_virtual = &vtbl_dbline; break; + #ifdef USE_THREADS + case 'm': + mg->mg_virtual = &vtbl_mutex; + break; + #endif /* USE_THREADS */ +#ifdef USE_LOCALE_COLLATE + case 'o': + mg->mg_virtual = &vtbl_collxfrm; + break; +#endif /* USE_LOCALE_COLLATE */ case 'P': mg->mg_virtual = &vtbl_pack; break; @@@ -2660,9 -2295,12 +2681,10 @@@ register SV *sv assert(SvREFCNT(sv) == 0); if (SvOBJECT(sv)) { - dTHR; - dSP; - GV* destructor; - if (defstash) { /* Still have a symbol table? */ - destructor = gv_fetchmethod(SvSTASH(sv), "DESTROY"); ++ dTHR; + dSP; + GV* destructor; ENTER; SAVEFREESV(SvSTASH(sv)); @@@ -3413,7 -2866,8 +3435,8 @@@ register SV *sv static void sv_mortalgrow() { + dTHR; - tmps_max += 128; + tmps_max += (tmps_max < 512) ? 128 : 512; Renew(tmps_stack, tmps_max, SV*); } @@@ -3421,9 -2875,10 +3444,10 @@@ SV sv_mortalcopy(oldstr) SV *oldstr; { + dTHR; register SV *sv; - new_SV(); + new_SV(sv); SvANY(sv) = 0; SvREFCNT(sv) = 1; SvFLAGS(sv) = 0; @@@ -3438,9 -2893,10 +3462,10 @@@ SV * sv_newmortal() { + dTHR; register SV *sv; - new_SV(); + new_SV(sv); SvANY(sv) = 0; SvREFCNT(sv) = 1; SvFLAGS(sv) = SVs_TEMP; @@@ -3545,9 -2973,10 +3571,10 @@@ SV newRV(ref) SV *ref; { + dTHR; register SV *sv; - new_SV(); + new_SV(sv); SvANY(sv) = 0; SvREFCNT(sv) = 1; SvFLAGS(sv) = 0; @@@ -3960,9 -3328,10 +3989,10 @@@ newSVrv(rv, classname SV *rv; char *classname; { + dTHR; SV *sv; - new_SV(); + new_SV(sv); SvANY(sv) = 0; SvREFCNT(sv) = 0; SvFLAGS(sv) = 0; @@@ -4827,89 -3588,87 +4858,94 @@@ SV* sv sv_dump(LvTARG(sv)); break; case SVt_PVAV: - fprintf(stderr, " ARRAY = 0x%lx\n", (long)AvARRAY(sv)); - fprintf(stderr, " ALLOC = 0x%lx\n", (long)AvALLOC(sv)); - fprintf(stderr, " FILL = %ld\n", (long)AvFILL(sv)); - fprintf(stderr, " MAX = %ld\n", (long)AvMAX(sv)); - fprintf(stderr, " ARYLEN = 0x%lx\n", (long)AvARYLEN(sv)); + PerlIO_printf(Perl_debug_log, " ARRAY = 0x%lx\n", (long)AvARRAY(sv)); + PerlIO_printf(Perl_debug_log, " ALLOC = 0x%lx\n", (long)AvALLOC(sv)); + PerlIO_printf(Perl_debug_log, " FILL = %ld\n", (long)AvFILL(sv)); + PerlIO_printf(Perl_debug_log, " MAX = %ld\n", (long)AvMAX(sv)); + PerlIO_printf(Perl_debug_log, " ARYLEN = 0x%lx\n", (long)AvARYLEN(sv)); flags = AvFLAGS(sv); - d = tmpbuf; - if (flags & AVf_REAL) strcat(d, "REAL,"); - if (flags & AVf_REIFY) strcat(d, "REIFY,"); - if (flags & AVf_REUSED) strcat(d, "REUSED,"); - if (*d) - d[strlen(d)-1] = '\0'; - fprintf(stderr, " FLAGS = (%s)\n", d); + sv_setpv(d, ""); + if (flags & AVf_REAL) sv_catpv(d, ",REAL"); + if (flags & AVf_REIFY) sv_catpv(d, ",REIFY"); + if (flags & AVf_REUSED) sv_catpv(d, ",REUSED"); + PerlIO_printf(Perl_debug_log, " FLAGS = (%s)\n", + SvCUR(d) ? SvPVX(d) + 1 : ""); break; case SVt_PVHV: - fprintf(stderr, " ARRAY = 0x%lx\n",(long)HvARRAY(sv)); - fprintf(stderr, " KEYS = %ld\n", (long)HvKEYS(sv)); - fprintf(stderr, " FILL = %ld\n", (long)HvFILL(sv)); - fprintf(stderr, " MAX = %ld\n", (long)HvMAX(sv)); - fprintf(stderr, " RITER = %ld\n", (long)HvRITER(sv)); - fprintf(stderr, " EITER = 0x%lx\n",(long) HvEITER(sv)); + PerlIO_printf(Perl_debug_log, " ARRAY = 0x%lx\n",(long)HvARRAY(sv)); + PerlIO_printf(Perl_debug_log, " KEYS = %ld\n", (long)HvKEYS(sv)); + PerlIO_printf(Perl_debug_log, " FILL = %ld\n", (long)HvFILL(sv)); + PerlIO_printf(Perl_debug_log, " MAX = %ld\n", (long)HvMAX(sv)); + PerlIO_printf(Perl_debug_log, " RITER = %ld\n", (long)HvRITER(sv)); + PerlIO_printf(Perl_debug_log, " EITER = 0x%lx\n",(long) HvEITER(sv)); if (HvPMROOT(sv)) - fprintf(stderr, " PMROOT = 0x%lx\n",(long)HvPMROOT(sv)); + PerlIO_printf(Perl_debug_log, " PMROOT = 0x%lx\n",(long)HvPMROOT(sv)); if (HvNAME(sv)) - fprintf(stderr, " NAME = \"%s\"\n", HvNAME(sv)); + PerlIO_printf(Perl_debug_log, " NAME = \"%s\"\n", HvNAME(sv)); break; - case SVt_PVFM: case SVt_PVCV: - fprintf(stderr, " STASH = 0x%lx\n", (long)CvSTASH(sv)); - fprintf(stderr, " START = 0x%lx\n", (long)CvSTART(sv)); - fprintf(stderr, " ROOT = 0x%lx\n", (long)CvROOT(sv)); - fprintf(stderr, " XSUB = 0x%lx\n", (long)CvXSUB(sv)); - fprintf(stderr, " XSUBANY = %ld\n", (long)CvXSUBANY(sv).any_i32); - fprintf(stderr, " FILEGV = 0x%lx\n", (long)CvFILEGV(sv)); - fprintf(stderr, " DEPTH = %ld\n", (long)CvDEPTH(sv)); - fprintf(stderr, " PADLIST = 0x%lx\n", (long)CvPADLIST(sv)); - fprintf(stderr, " OUTSIDE = 0x%lx\n", (long)CvOUTSIDE(sv)); + if (SvPOK(sv)) + PerlIO_printf(Perl_debug_log, " PROTOTYPE = \"%s\"\n", SvPV(sv,na)); + /* FALL THROUGH */ + case SVt_PVFM: + PerlIO_printf(Perl_debug_log, " STASH = 0x%lx\n", (long)CvSTASH(sv)); + PerlIO_printf(Perl_debug_log, " START = 0x%lx\n", (long)CvSTART(sv)); + PerlIO_printf(Perl_debug_log, " ROOT = 0x%lx\n", (long)CvROOT(sv)); + PerlIO_printf(Perl_debug_log, " XSUB = 0x%lx\n", (long)CvXSUB(sv)); + PerlIO_printf(Perl_debug_log, " XSUBANY = %ld\n", (long)CvXSUBANY(sv).any_i32); + PerlIO_printf(Perl_debug_log, " GV = 0x%lx", (long)CvGV(sv)); + if (CvGV(sv) && GvNAME(CvGV(sv))) { + PerlIO_printf(Perl_debug_log, " \"%s\"\n", GvNAME(CvGV(sv))); + } else { + PerlIO_printf(Perl_debug_log, "\n"); + } + PerlIO_printf(Perl_debug_log, " FILEGV = 0x%lx\n", (long)CvFILEGV(sv)); + PerlIO_printf(Perl_debug_log, " DEPTH = %ld\n", (long)CvDEPTH(sv)); + PerlIO_printf(Perl_debug_log, " PADLIST = 0x%lx\n", (long)CvPADLIST(sv)); + PerlIO_printf(Perl_debug_log, " OUTSIDE = 0x%lx\n", (long)CvOUTSIDE(sv)); + #ifdef USE_THREADS - fprintf(stderr, " MUTEXP = 0x%lx\n", (long)CvMUTEXP(sv)); - fprintf(stderr, " CONDP = 0x%lx\n", (long)CvCONDP(sv)); - fprintf(stderr, " OWNER = 0x%lx\n", (long)CvOWNER(sv)); ++ PerlIO_printf(Perl_debug_log, " MUTEXP = 0x%lx\n", (long)CvMUTEXP(sv)); ++ PerlIO_printf(Perl_debug_log, " CONDP = 0x%lx\n", (long)CvCONDP(sv)); ++ PerlIO_printf(Perl_debug_log, " OWNER = 0x%lx\n", (long)CvOWNER(sv)); + #endif /* USE_THREADS */ if (type == SVt_PVFM) - fprintf(stderr, " LINES = %ld\n", (long)FmLINES(sv)); + PerlIO_printf(Perl_debug_log, " LINES = %ld\n", (long)FmLINES(sv)); break; case SVt_PVGV: - fprintf(stderr, " NAME = %s\n", GvNAME(sv)); - fprintf(stderr, " NAMELEN = %ld\n", (long)GvNAMELEN(sv)); - fprintf(stderr, " STASH = 0x%lx\n", (long)GvSTASH(sv)); - fprintf(stderr, " GP = 0x%lx\n", (long)GvGP(sv)); - fprintf(stderr, " SV = 0x%lx\n", (long)GvSV(sv)); - fprintf(stderr, " REFCNT = %ld\n", (long)GvREFCNT(sv)); - fprintf(stderr, " IO = 0x%lx\n", (long)GvIOp(sv)); - fprintf(stderr, " FORM = 0x%lx\n", (long)GvFORM(sv)); - fprintf(stderr, " AV = 0x%lx\n", (long)GvAV(sv)); - fprintf(stderr, " HV = 0x%lx\n", (long)GvHV(sv)); - fprintf(stderr, " CV = 0x%lx\n", (long)GvCV(sv)); - fprintf(stderr, " CVGEN = 0x%lx\n", (long)GvCVGEN(sv)); - fprintf(stderr, " LASTEXPR = %ld\n", (long)GvLASTEXPR(sv)); - fprintf(stderr, " LINE = %ld\n", (long)GvLINE(sv)); - fprintf(stderr, " FLAGS = 0x%x\n", (int)GvFLAGS(sv)); - fprintf(stderr, " STASH = 0x%lx\n", (long)GvSTASH(sv)); - fprintf(stderr, " EGV = 0x%lx\n", (long)GvEGV(sv)); + PerlIO_printf(Perl_debug_log, " NAME = \"%s\"\n", GvNAME(sv)); + PerlIO_printf(Perl_debug_log, " NAMELEN = %ld\n", (long)GvNAMELEN(sv)); + PerlIO_printf(Perl_debug_log, " STASH = \"%s\"\n", HvNAME(GvSTASH(sv))); + PerlIO_printf(Perl_debug_log, " GP = 0x%lx\n", (long)GvGP(sv)); + PerlIO_printf(Perl_debug_log, " SV = 0x%lx\n", (long)GvSV(sv)); + PerlIO_printf(Perl_debug_log, " REFCNT = %ld\n", (long)GvREFCNT(sv)); + PerlIO_printf(Perl_debug_log, " IO = 0x%lx\n", (long)GvIOp(sv)); + PerlIO_printf(Perl_debug_log, " FORM = 0x%lx\n", (long)GvFORM(sv)); + PerlIO_printf(Perl_debug_log, " AV = 0x%lx\n", (long)GvAV(sv)); + PerlIO_printf(Perl_debug_log, " HV = 0x%lx\n", (long)GvHV(sv)); + PerlIO_printf(Perl_debug_log, " CV = 0x%lx\n", (long)GvCV(sv)); + PerlIO_printf(Perl_debug_log, " CVGEN = 0x%lx\n", (long)GvCVGEN(sv)); + PerlIO_printf(Perl_debug_log, " LASTEXPR = %ld\n", (long)GvLASTEXPR(sv)); + PerlIO_printf(Perl_debug_log, " LINE = %ld\n", (long)GvLINE(sv)); + PerlIO_printf(Perl_debug_log, " FILEGV = 0x%lx\n", (long)GvFILEGV(sv)); + PerlIO_printf(Perl_debug_log, " EGV = 0x%lx\n", (long)GvEGV(sv)); break; case SVt_PVIO: - fprintf(stderr, " IFP = 0x%lx\n", (long)IoIFP(sv)); - fprintf(stderr, " OFP = 0x%lx\n", (long)IoOFP(sv)); - fprintf(stderr, " DIRP = 0x%lx\n", (long)IoDIRP(sv)); - fprintf(stderr, " LINES = %ld\n", (long)IoLINES(sv)); - fprintf(stderr, " PAGE = %ld\n", (long)IoPAGE(sv)); - fprintf(stderr, " PAGE_LEN = %ld\n", (long)IoPAGE_LEN(sv)); - fprintf(stderr, " LINES_LEFT = %ld\n", (long)IoLINES_LEFT(sv)); - fprintf(stderr, " TOP_NAME = %s\n", IoTOP_NAME(sv)); - fprintf(stderr, " TOP_GV = 0x%lx\n", (long)IoTOP_GV(sv)); - fprintf(stderr, " FMT_NAME = %s\n", IoFMT_NAME(sv)); - fprintf(stderr, " FMT_GV = 0x%lx\n", (long)IoFMT_GV(sv)); - fprintf(stderr, " BOTTOM_NAME = %s\n", IoBOTTOM_NAME(sv)); - fprintf(stderr, " BOTTOM_GV = 0x%lx\n", (long)IoBOTTOM_GV(sv)); - fprintf(stderr, " SUBPROCESS = %ld\n", (long)IoSUBPROCESS(sv)); - fprintf(stderr, " TYPE = %c\n", IoTYPE(sv)); - fprintf(stderr, " FLAGS = 0x%lx\n", (long)IoFLAGS(sv)); + PerlIO_printf(Perl_debug_log, " IFP = 0x%lx\n", (long)IoIFP(sv)); + PerlIO_printf(Perl_debug_log, " OFP = 0x%lx\n", (long)IoOFP(sv)); + PerlIO_printf(Perl_debug_log, " DIRP = 0x%lx\n", (long)IoDIRP(sv)); + PerlIO_printf(Perl_debug_log, " LINES = %ld\n", (long)IoLINES(sv)); + PerlIO_printf(Perl_debug_log, " PAGE = %ld\n", (long)IoPAGE(sv)); + PerlIO_printf(Perl_debug_log, " PAGE_LEN = %ld\n", (long)IoPAGE_LEN(sv)); + PerlIO_printf(Perl_debug_log, " LINES_LEFT = %ld\n", (long)IoLINES_LEFT(sv)); + PerlIO_printf(Perl_debug_log, " TOP_NAME = \"%s\"\n", IoTOP_NAME(sv)); + PerlIO_printf(Perl_debug_log, " TOP_GV = 0x%lx\n", (long)IoTOP_GV(sv)); + PerlIO_printf(Perl_debug_log, " FMT_NAME = \"%s\"\n", IoFMT_NAME(sv)); + PerlIO_printf(Perl_debug_log, " FMT_GV = 0x%lx\n", (long)IoFMT_GV(sv)); + PerlIO_printf(Perl_debug_log, " BOTTOM_NAME = \"%s\"\n", IoBOTTOM_NAME(sv)); + PerlIO_printf(Perl_debug_log, " BOTTOM_GV = 0x%lx\n", (long)IoBOTTOM_GV(sv)); + PerlIO_printf(Perl_debug_log, " SUBPROCESS = %ld\n", (long)IoSUBPROCESS(sv)); + PerlIO_printf(Perl_debug_log, " TYPE = %c\n", IoTYPE(sv)); + PerlIO_printf(Perl_debug_log, " FLAGS = 0x%lx\n", (long)IoFLAGS(sv)); break; } } diff --cc sv.h index cf18061,90d025f..f52c09d --- a/sv.h +++ b/sv.h @@@ -126,11 -126,18 +126,15 @@@ struct io #define SVpfm_COMPILED 0x80000000 #define SVpbm_VALID 0x80000000 -#define SVpbm_CASEFOLD 0x40000000 -#define SVpbm_TAIL 0x20000000 +#define SVpbm_TAIL 0x40000000 + +#define SVphv_SHAREKEYS 0x20000000 /* keys live on shared string table */ +#define SVphv_LAZYDEL 0x40000000 /* entry in xhv_eiter must be deleted */ + #ifdef USE_THREADS + #define SVp_SYNC 0x10000000 /* Synchronised CV or an SV lock */ + #endif /* USE_THREADS */ + -#ifdef OVERLOAD -#define SVpgv_AM 0x40000000 -/* #define SVpgv_badAM 0x20000000 */ -#endif /* OVERLOAD */ - struct xrv { SV * xrv_rv; /* pointer to another SV */ }; diff --cc toke.c index 18f7266,90576e7..7fddc3c --- a/toke.c +++ b/toke.c @@@ -531,15 -501,12 +532,15 @@@ register char *s int kind; { if (s && *s) { - OP* op = (OP*)newSVOP(OP_CONST, 0, newSVpv(s,0)); - nextval[nexttoke].opval = op; + OP* o = (OP*)newSVOP(OP_CONST, 0, newSVpv(s,0)); + nextval[nexttoke].opval = o; force_next(WORD); if (kind) { - op->op_private = OPpCONST_ENTERED; + o->op_private = OPpCONST_ENTERED; - gv_fetchpv(s, TRUE, + /* XXX see note in pp_entereval() for why we forgo typo + warnings if the symbol must be introduced in an eval. + GSAR 96-10-12 */ + gv_fetchpv(s, in_eval ? GV_ADDMULTI : TRUE, kind == '$' ? SVt_PV : kind == '@' ? SVt_PVAV : kind == '%' ? SVt_PVHV : @@@ -1231,57 -1152,6 +1233,58 @@@ yylex( register I32 tmp; STRLEN len; + if (pending_ident) { + char pit = pending_ident; + pending_ident = 0; + + if (in_my) { + if (strchr(tokenbuf,':')) + croak(no_myglob,tokenbuf); + yylval.opval = newOP(OP_PADANY, 0); + yylval.opval->op_targ = pad_allocmy(tokenbuf); + return PRIVATEREF; + } + - if (!strchr(tokenbuf,':') && (tmp = pad_findmy(tokenbuf))) { ++ if (!strchr(tokenbuf,':') ++ && (tmp = pad_findmy(tokenbuf)) != NOT_IN_PAD) { + if (last_lop_op == OP_SORT && + tokenbuf[0] == '$' && + (tokenbuf[1] == 'a' || tokenbuf[1] == 'b') + && !tokenbuf[2]) + { + for (d = in_eval ? oldoldbufptr : linestart; + d < bufend && *d != '\n'; + d++) + { + if (strnEQ(d,"<=>",3) || strnEQ(d,"cmp",3)) { + croak("Can't use \"my %s\" in sort comparison", + tokenbuf); + } + } + } + + yylval.opval = newOP(OP_PADANY, 0); + yylval.opval->op_targ = tmp; + return PRIVATEREF; + } + + /* Force them to make up their mind on "@foo". */ + if (pit == '@' && lex_state != LEX_NORMAL && !lex_brackets) { + GV *gv = gv_fetchpv(tokenbuf+1, FALSE, SVt_PVAV); + if (!gv || ((tokenbuf[0] == '@') ? !GvAV(gv) : !GvHV(gv))) + yyerror(form("In string, %s now must be written as \\%s", + tokenbuf, tokenbuf)); + } + + yylval.opval = (OP*)newSVOP(OP_CONST, 0, newSVpv(tokenbuf+1, 0)); + yylval.opval->op_private = OPpCONST_ENTERED; + gv_fetchpv(tokenbuf+1, in_eval ? GV_ADDMULTI : TRUE, + ((tokenbuf[0] == '$') ? SVt_PV + : (tokenbuf[0] == '@') ? SVt_PVAV + : SVt_PVHV)); + return WORD; + } + switch (lex_state) { #ifdef COMMENTARY case LEX_NORMAL: /* Some compilers will produce faster */ @@@ -5183,12 -4893,11 +5190,13 @@@ set_csh( #endif } -int -start_subparse() +I32 +start_subparse(is_format, flags) +I32 is_format; +U32 flags; { + dTHR; - int oldsavestack_ix = savestack_ix; + I32 oldsavestack_ix = savestack_ix; CV* outsidecv = compcv; AV* comppadlist; @@@ -5246,14 -4965,11 +5265,15 @@@ in yyerror(s) char *s; { + dTHR; - char tmpbuf[258]; - char *tname = tmpbuf; - - if (bufptr > oldoldbufptr && bufptr - oldoldbufptr < 200 && + char *where = NULL; + char *context = NULL; + int contlen = -1; + SV *msg; + + if (!yychar || (yychar == ';' && !rsfp)) + where = "at EOF"; + else if (bufptr > oldoldbufptr && bufptr - oldoldbufptr < 200 && oldoldbufptr != oldbufptr && oldbufptr != bufptr) { while (isSPACE(*oldoldbufptr)) oldoldbufptr++; diff --cc util.c index fc24583,65fa31b..0387332 --- a/util.c +++ b/util.c @@@ -1077,95 -732,123 +1077,96 @@@ register I32 len return newaddr; } -#if !defined(I_STDARG) && !defined(I_VARARGS) +/* the SV for form() and mess() is not kept in an arena */ -/* - * Fallback on the old hackers way of doing varargs - */ +static SV * +mess_alloc() +{ + SV *sv; + XPVMG *any; + + /* Create as PVMG now, to avoid any upgrading later */ + New(905, sv, 1, SV); + Newz(905, any, 1, XPVMG); + SvFLAGS(sv) = SVt_PVMG; + SvANY(sv) = (void*)any; + SvREFCNT(sv) = 1 << 30; /* practically infinite */ + return sv; +} -/*VARARGS1*/ +#ifdef I_STDARG char * -mess(pat,a1,a2,a3,a4) -char *pat; -long a1, a2, a3, a4; +form(const char* pat, ...) +#else +/*VARARGS0*/ +char * +form(pat, va_alist) + const char *pat; + va_dcl +#endif { - char *s; - char *s_start; - I32 usermess = strEQ(pat,"%s"); - SV *tmpstr; + va_list args; +#ifdef I_STDARG + va_start(args, pat); +#else + va_start(args); +#endif + if (!mess_sv) + mess_sv = mess_alloc(); + sv_vsetpvfn(mess_sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); + va_end(args); + return SvPVX(mess_sv); +} - s = s_start = buf; - if (usermess) { - tmpstr = sv_newmortal(); - sv_setpv(tmpstr, (char*)a1); - *s++ = SvPVX(tmpstr)[SvCUR(tmpstr)-1]; - } - else { - (void)sprintf(s,pat,a1,a2,a3,a4); - s += strlen(s); - } +char * +mess(pat, args) + const char *pat; + va_list *args; +{ + SV *sv; + static char dgd[] = " during global destruction.\n"; - if (s[-1] != '\n') { + if (!mess_sv) + mess_sv = mess_alloc(); + sv = mess_sv; + sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); + if (!SvCUR(sv) || *(SvEND(sv) - 1) != '\n') { if (dirty) - strcpy(s, " during global destruction.\n"); + sv_catpv(sv, dgd); else { - if (curcop->cop_line) { - (void)sprintf(s," at %s line %ld", - SvPVX(GvSV(curcop->cop_filegv)), (long)curcop->cop_line); - s += strlen(s); - } - if (GvIO(last_in_gv) && - IoLINES(GvIOp(last_in_gv)) ) { - (void)sprintf(s,", <%s> %s %ld", - last_in_gv == argvgv ? "" : GvENAME(last_in_gv), - strEQ(rs,"\n") ? "line" : "chunk", - (long)IoLINES(GvIOp(last_in_gv))); - s += strlen(s); + if (curcop->cop_line) + sv_catpvf(sv, " at %_ line %ld", + GvSV(curcop->cop_filegv), (long)curcop->cop_line); + if (GvIO(last_in_gv) && IoLINES(GvIOp(last_in_gv))) { + bool line_mode = (RsSIMPLE(rs) && + SvLEN(rs) == 1 && *SvPVX(rs) == '\n'); + sv_catpvf(sv, ", <%s> %s %ld", + last_in_gv == argvgv ? "" : GvNAME(last_in_gv), + line_mode ? "line" : "chunk", + (long)IoLINES(GvIOp(last_in_gv))); } - (void)strcpy(s,".\n"); - s += 2; + sv_catpv(sv, ".\n"); } - if (usermess) - sv_catpv(tmpstr,buf+1); } - - if (s - s_start >= sizeof(buf)) { /* Ooops! */ - if (usermess) - fputs(SvPVX(tmpstr), stderr); - else - fputs(buf, stderr); - fputs("panic: message overflow - memory corrupted!\n",stderr); - my_exit(1); - } - if (usermess) - return SvPVX(tmpstr); - else - return buf; + return SvPVX(sv); } -/*VARARGS1*/ -void croak(pat,a1,a2,a3,a4) -char *pat; -long a1, a2, a3, a4; -{ - char *tmps; - char *message; - HV *stash; - GV *gv; - CV *cv; - - message = mess(pat,a1,a2,a3,a4); - if (diehook && (cv = sv_2cv(diehook, &stash, &gv, 0)) && !CvDEPTH(cv)) { - dSP; - - PUSHMARK(sp); - EXTEND(sp, 1); - PUSHs(sv_2mortal(newSVpv(message,0))); - PUTBACK; - perl_call_sv((SV*)cv, G_DISCARD); - } - if (in_eval) { - restartop = die_where(message); - Siglongjmp(top_env, 3); - } - fputs(message,stderr); - (void)Fflush(stderr); - if (e_tmpname) { - if (e_fp) { - fclose(e_fp); - e_fp = Nullfp; - } - (void)UNLINK(e_tmpname); - Safefree(e_tmpname); - e_tmpname = Nullch; - } - statusvalue = SHIFTSTATUS(statusvalue); -#ifdef VMS - my_exit((U32)vaxc$errno?vaxc$errno:errno?errno:statusvalue?statusvalue:SS$_ABORT); +#ifdef I_STDARG +OP * +die(const char* pat, ...) #else - my_exit((U32)((errno&255)?errno:((statusvalue&255)?statusvalue:255))); +/*VARARGS0*/ +OP * +die(pat, va_alist) + const char *pat; + va_dcl #endif -} - -/*VARARGS1*/ -void warn(pat,a1,a2,a3,a4) -char *pat; -long a1, a2, a3, a4; { ++ dTHR; + va_list args; char *message; - SV *sv; + I32 oldrunlevel = runlevel; + int was_in_eval = in_eval; HV *stash; GV *gv; CV *cv; @@@ -1242,30 -975,17 +1244,34 @@@ croak(pat, va_alist #endif message = mess(pat, &args); va_end(args); + #ifdef USE_THREADS + DEBUG_L(fprintf(stderr, "croak: 0x%lx %s", (unsigned long) thr, message)); + #endif /* USE_THREADS */ - if (diehook && (cv = sv_2cv(diehook, &stash, &gv, 0)) && !CvDEPTH(cv)) { - dSP; - - PUSHMARK(sp); - EXTEND(sp, 1); - PUSHs(sv_2mortal(newSVpv(message,0))); - PUTBACK; - perl_call_sv((SV*)cv, G_DISCARD); + if (diehook) { + /* sv_2cv might call croak() */ + SV *olddiehook = diehook; + ENTER; + SAVESPTR(diehook); + diehook = Nullsv; + cv = sv_2cv(olddiehook, &stash, &gv, 0); + LEAVE; + if (cv && !CvDEPTH(cv) && (CvROOT(cv) || CvXSUB(cv))) { + dSP; + SV *msg; + + ENTER; + msg = newSVpv(message, 0); + SvREADONLY_on(msg); + SAVEFREESV(msg); + + PUSHMARK(sp); + XPUSHs(msg); + PUTBACK; + perl_call_sv((SV*)cv, G_DISCARD); ++<<<< + + LEAVE; + } } if (in_eval) { restartop = die_where(message); @@@ -1300,41 -1034,27 +1306,42 @@@ warn(pat,va_alist message = mess(pat, &args); va_end(args); - if (warnhook && (cv = sv_2cv(warnhook, &stash, &gv, 0)) && !CvDEPTH(cv)) { + if (warnhook) { + /* sv_2cv might call warn() */ + dTHR; - dSP; - - PUSHMARK(sp); - EXTEND(sp, 1); - PUSHs(sv_2mortal(newSVpv(message,0))); - PUTBACK; - perl_call_sv((SV*)cv, G_DISCARD); + SV *oldwarnhook = warnhook; + ENTER; + SAVESPTR(warnhook); + warnhook = Nullsv; + cv = sv_2cv(oldwarnhook, &stash, &gv, 0); + LEAVE; + if (cv && !CvDEPTH(cv) && (CvROOT(cv) || CvXSUB(cv))) { + dSP; + SV *msg; + + ENTER; + msg = newSVpv(message, 0); + SvREADONLY_on(msg); + SAVEFREESV(msg); + + PUSHMARK(sp); + XPUSHs(msg); + PUTBACK; + perl_call_sv((SV*)cv, G_DISCARD); + + LEAVE; + return; + } } - else { - fputs(message,stderr); + PerlIO_puts(PerlIO_stderr(),message); #ifdef LEAKTEST - DEBUG_L(xstat()); + DEBUG_L(xstat()); #endif - (void)Fflush(stderr); - } + (void)PerlIO_flush(PerlIO_stderr()); } -#endif /* !defined(I_STDARG) && !defined(I_VARARGS) */ #ifndef VMS /* VMS' my_setenv() is in VMS.c */ +#ifndef _WIN32 void my_setenv(nam,val) char *nam, *val; @@@ -2285,16 -1817,53 +2292,66 @@@ I32 *retlen return retval; } + #ifdef USE_THREADS + #ifdef OLD_PTHREADS_API + struct thread * + getTHR _((void)) + { + pthread_addr_t t; + + if (pthread_getspecific(thr_key, &t)) + croak("panic: pthread_getspecific"); + return (struct thread *) t; + } + #endif /* OLD_PTHREADS_API */ + + MAGIC * + condpair_magic(sv) + SV *sv; + { + MAGIC *mg; + + SvUPGRADE(sv, SVt_PVMG); + mg = mg_find(sv, 'm'); + if (!mg) { + condpair_t *cp; + + New(53, cp, 1, condpair_t); + MUTEX_INIT(&cp->mutex); + COND_INIT(&cp->owner_cond); + COND_INIT(&cp->cond); + cp->owner = 0; + MUTEX_LOCK(&sv_mutex); + mg = mg_find(sv, 'm'); + if (mg) { + /* someone else beat us to initialising it */ + MUTEX_UNLOCK(&sv_mutex); + MUTEX_DESTROY(&cp->mutex); + COND_DESTROY(&cp->owner_cond); + COND_DESTROY(&cp->cond); + Safefree(cp); + } + else { + sv_magic(sv, Nullsv, 'm', 0, 0); + mg = SvMAGIC(sv); + mg->mg_ptr = (char *)cp; + mg->mg_len = sizeof(cp); + MUTEX_UNLOCK(&sv_mutex); + } + } + return mg; + } + #endif /* USE_THREADS */ + +#ifdef HUGE_VAL +/* + * This hack is to force load of "huge" support from libm.a + * So it is in perl for (say) POSIX to use. + * Needed for SunOS with Sun's 'acc' for example. + */ +double +Perl_huge() +{ + return HUGE_VAL; +} +#endif