3 * Copyright (c) 1991-2001, Larry Wall
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
11 * "For the fashion of Minas Tirith was such that it was built on seven
16 #define PERL_IN_SCOPE_C
19 #if defined(PERL_FLEXIBLE_EXCEPTIONS)
21 Perl_default_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt,
22 protect_body_t body, ...)
27 ret = vdefault_protect(pcur_env, excpt, body, &args);
33 Perl_vdefault_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt,
34 protect_body_t body, va_list *args)
43 ret = CALL_FPTR(body)(aTHX_ *args);
51 Perl_stack_grow(pTHX_ SV **sp, SV **p, int n)
54 #ifndef STRESS_REALLOC
55 av_extend(PL_curstack, (p - PL_stack_base) + (n) + 128);
57 av_extend(PL_curstack, (p - PL_stack_base) + (n) + 1);
62 #ifndef STRESS_REALLOC
63 #define GROW(old) ((old) * 3 / 2)
65 #define GROW(old) ((old) + 1)
69 Perl_new_stackinfo(pTHX_ I32 stitems, I32 cxitems)
72 New(56, si, 1, PERL_SI);
73 si->si_stack = newAV();
74 AvREAL_off(si->si_stack);
75 av_extend(si->si_stack, stitems > 0 ? stitems-1 : 0);
76 AvALLOC(si->si_stack)[0] = &PL_sv_undef;
77 AvFILLp(si->si_stack) = 0;
80 si->si_cxmax = cxitems - 1;
82 si->si_type = PERLSI_UNDEF;
83 New(56, si->si_cxstack, cxitems, PERL_CONTEXT);
90 cxstack_max = GROW(cxstack_max);
91 Renew(cxstack, cxstack_max + 1, PERL_CONTEXT); /* XXX should fix CXINC macro */
92 return cxstack_ix + 1;
96 Perl_push_return(pTHX_ OP *retop)
98 if (PL_retstack_ix == PL_retstack_max) {
99 PL_retstack_max = GROW(PL_retstack_max);
100 Renew(PL_retstack, PL_retstack_max, OP*);
102 PL_retstack[PL_retstack_ix++] = retop;
106 Perl_pop_return(pTHX)
108 if (PL_retstack_ix > 0)
109 return PL_retstack[--PL_retstack_ix];
115 Perl_push_scope(pTHX)
117 if (PL_scopestack_ix == PL_scopestack_max) {
118 PL_scopestack_max = GROW(PL_scopestack_max);
119 Renew(PL_scopestack, PL_scopestack_max, I32);
121 PL_scopestack[PL_scopestack_ix++] = PL_savestack_ix;
128 I32 oldsave = PL_scopestack[--PL_scopestack_ix];
129 LEAVE_SCOPE(oldsave);
133 Perl_markstack_grow(pTHX)
135 I32 oldmax = PL_markstack_max - PL_markstack;
136 I32 newmax = GROW(oldmax);
138 Renew(PL_markstack, newmax, I32);
139 PL_markstack_ptr = PL_markstack + oldmax;
140 PL_markstack_max = PL_markstack + newmax;
144 Perl_savestack_grow(pTHX)
146 PL_savestack_max = GROW(PL_savestack_max) + 4;
147 Renew(PL_savestack, PL_savestack_max, ANY);
153 Perl_tmps_grow(pTHX_ I32 n)
155 #ifndef STRESS_REALLOC
157 n = (PL_tmps_max < 512) ? 128 : 512;
159 PL_tmps_max = PL_tmps_ix + n + 1;
160 Renew(PL_tmps_stack, PL_tmps_max, SV*);
167 /* XXX should tmps_floor live in cxstack? */
168 I32 myfloor = PL_tmps_floor;
169 while (PL_tmps_ix > myfloor) { /* clean up after last statement */
170 SV* sv = PL_tmps_stack[PL_tmps_ix];
171 PL_tmps_stack[PL_tmps_ix--] = Nullsv;
172 if (sv && sv != &PL_sv_undef) {
174 SvREFCNT_dec(sv); /* note, can modify tmps_ix!!! */
180 S_save_scalar_at(pTHX_ SV **sptr)
185 sv = *sptr = NEWSV(0,0);
186 if (SvTYPE(osv) >= SVt_PVMG && SvMAGIC(osv) && SvTYPE(osv) != SVt_PVGV) {
187 sv_upgrade(sv, SvTYPE(osv));
188 if (SvGMAGICAL(osv)) {
190 bool oldtainted = PL_tainted;
191 mg_get(osv); /* note, can croak! */
192 if (PL_tainting && PL_tainted &&
193 (mg = mg_find(osv, PERL_MAGIC_taint))) {
194 SAVESPTR(mg->mg_obj);
197 SvFLAGS(osv) |= (SvFLAGS(osv) &
198 (SVp_NOK|SVp_POK)) >> PRIVSHIFT;
199 PL_tainted = oldtainted;
201 SvMAGIC(sv) = SvMAGIC(osv);
202 SvFLAGS(sv) |= SvMAGICAL(osv);
203 /* XXX SvMAGIC() is *shared* between osv and sv. This can
204 * lead to coredumps when both SVs are destroyed without one
205 * of their SvMAGIC() slots being NULLed. */
214 Perl_save_scalar(pTHX_ GV *gv)
216 SV **sptr = &GvSV(gv);
218 SSPUSHPTR(SvREFCNT_inc(gv));
219 SSPUSHPTR(SvREFCNT_inc(*sptr));
221 return save_scalar_at(sptr);
225 Perl_save_svref(pTHX_ SV **sptr)
229 SSPUSHPTR(SvREFCNT_inc(*sptr));
230 SSPUSHINT(SAVEt_SVREF);
231 return save_scalar_at(sptr);
234 /* Like save_sptr(), but also SvREFCNT_dec()s the new value. Can be used to
235 * restore a global SV to its prior contents, freeing new value. */
237 Perl_save_generic_svref(pTHX_ SV **sptr)
241 SSPUSHPTR(SvREFCNT_inc(*sptr));
242 SSPUSHINT(SAVEt_GENERIC_SVREF);
245 /* Like save_pptr(), but also Safefree()s the new value if it is different
246 * from the old one. Can be used to restore a global char* to its prior
247 * contents, freeing new value. */
249 Perl_save_generic_pvref(pTHX_ char **str)
254 SSPUSHINT(SAVEt_GENERIC_PVREF);
257 /* Like save_generic_pvref(), but uses PerlMemShared_free() rather than Safefree().
258 * Can be used to restore a shared global char* to its prior
259 * contents, freeing new value. */
261 Perl_save_shared_pvref(pTHX_ char **str)
266 SSPUSHINT(SAVEt_SHARED_PVREF);
270 Perl_save_gp(pTHX_ GV *gv, I32 empty)
273 SSPUSHIV((IV)SvLEN(gv));
274 SvLEN(gv) = 0; /* forget that anything was allocated here */
275 SSPUSHIV((IV)SvCUR(gv));
276 SSPUSHPTR(SvPVX(gv));
278 SSPUSHPTR(SvREFCNT_inc(gv));
285 Newz(602, gp, 1, GP);
288 PL_sub_generation++; /* taking a method out of circulation */
289 if (GvIOp(gv) && (IoFLAGS(GvIOp(gv)) & IOf_ARGV)) {
291 IoFLAGS(gp->gp_io) |= IOf_ARGV|IOf_START;
293 GvGP(gv) = gp_ref(gp);
294 GvSV(gv) = NEWSV(72,0);
295 GvLINE(gv) = CopLINE(PL_curcop);
296 GvFILE(gv) = CopFILE(PL_curcop) ? CopFILE(PL_curcop) : "";
306 Perl_save_ary(pTHX_ GV *gv)
311 if (!AvREAL(oav) && AvREIFY(oav))
318 GvAV(gv) = Null(AV*);
321 SvMAGIC(av) = SvMAGIC(oav);
322 SvFLAGS((SV*)av) |= SvMAGICAL(oav);
333 Perl_save_hash(pTHX_ GV *gv)
339 SSPUSHPTR(ohv = GvHVn(gv));
342 GvHV(gv) = Null(HV*);
345 SvMAGIC(hv) = SvMAGIC(ohv);
346 SvFLAGS((SV*)hv) |= SvMAGICAL(ohv);
357 Perl_save_item(pTHX_ register SV *item)
359 register SV *sv = NEWSV(0,0);
363 SSPUSHPTR(item); /* remember the pointer */
364 SSPUSHPTR(sv); /* remember the value */
365 SSPUSHINT(SAVEt_ITEM);
369 Perl_save_int(pTHX_ int *intp)
374 SSPUSHINT(SAVEt_INT);
378 Perl_save_long(pTHX_ long int *longp)
383 SSPUSHINT(SAVEt_LONG);
387 Perl_save_I32(pTHX_ I32 *intp)
392 SSPUSHINT(SAVEt_I32);
396 Perl_save_I16(pTHX_ I16 *intp)
401 SSPUSHINT(SAVEt_I16);
405 Perl_save_I8(pTHX_ I8 *bytep)
414 Perl_save_iv(pTHX_ IV *ivp)
422 /* Cannot use save_sptr() to store a char* since the SV** cast will
423 * force word-alignment and we'll miss the pointer.
426 Perl_save_pptr(pTHX_ char **pptr)
431 SSPUSHINT(SAVEt_PPTR);
435 Perl_save_vptr(pTHX_ void *ptr)
438 SSPUSHPTR(*(char**)ptr);
440 SSPUSHINT(SAVEt_VPTR);
444 Perl_save_sptr(pTHX_ SV **sptr)
449 SSPUSHINT(SAVEt_SPTR);
453 Perl_save_padsv(pTHX_ PADOFFSET off)
456 SSPUSHPTR(PL_curpad[off]);
457 SSPUSHPTR(PL_curpad);
458 SSPUSHLONG((long)off);
459 SSPUSHINT(SAVEt_PADSV);
463 Perl_save_threadsv(pTHX_ PADOFFSET i)
465 #ifdef USE_5005THREADS
466 SV **svp = &THREADSV(i); /* XXX Change to save by offset */
467 DEBUG_S(PerlIO_printf(Perl_debug_log, "save_threadsv %"UVuf": %p %p:%s\n",
468 (UV)i, svp, *svp, SvPEEK(*svp)));
472 Perl_croak(aTHX_ "panic: save_threadsv called in non-threaded perl");
474 #endif /* USE_5005THREADS */
478 Perl_save_nogv(pTHX_ GV *gv)
482 SSPUSHINT(SAVEt_NSTAB);
486 Perl_save_hptr(pTHX_ HV **hptr)
491 SSPUSHINT(SAVEt_HPTR);
495 Perl_save_aptr(pTHX_ AV **aptr)
500 SSPUSHINT(SAVEt_APTR);
504 Perl_save_freesv(pTHX_ SV *sv)
508 SSPUSHINT(SAVEt_FREESV);
512 Perl_save_mortalizesv(pTHX_ SV *sv)
516 SSPUSHINT(SAVEt_MORTALIZESV);
520 Perl_save_freeop(pTHX_ OP *o)
524 SSPUSHINT(SAVEt_FREEOP);
528 Perl_save_freepv(pTHX_ char *pv)
532 SSPUSHINT(SAVEt_FREEPV);
536 Perl_save_clearsv(pTHX_ SV **svp)
539 SSPUSHLONG((long)(svp-PL_curpad));
540 SSPUSHINT(SAVEt_CLEARSV);
544 Perl_save_delete(pTHX_ HV *hv, char *key, I32 klen)
549 SSPUSHPTR(SvREFCNT_inc(hv));
550 SSPUSHINT(SAVEt_DELETE);
554 Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg)
559 for (i = 1; i <= maxsarg; i++) {
561 sv_setsv(sv,sarg[i]);
563 SSPUSHPTR(sarg[i]); /* remember the pointer */
564 SSPUSHPTR(sv); /* remember the value */
565 SSPUSHINT(SAVEt_ITEM);
570 Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p)
575 SSPUSHINT(SAVEt_DESTRUCTOR);
579 Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p)
584 SSPUSHINT(SAVEt_DESTRUCTOR_X);
588 Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr)
591 SSPUSHPTR(SvREFCNT_inc(av));
593 SSPUSHPTR(SvREFCNT_inc(*sptr));
594 SSPUSHINT(SAVEt_AELEM);
595 save_scalar_at(sptr);
599 Perl_save_helem(pTHX_ HV *hv, SV *key, SV **sptr)
602 SSPUSHPTR(SvREFCNT_inc(hv));
603 SSPUSHPTR(SvREFCNT_inc(key));
604 SSPUSHPTR(SvREFCNT_inc(*sptr));
605 SSPUSHINT(SAVEt_HELEM);
606 save_scalar_at(sptr);
618 Perl_save_alloc(pTHX_ I32 size, I32 pad)
620 register I32 start = pad + ((char*)&PL_savestack[PL_savestack_ix]
621 - (char*)PL_savestack);
622 register I32 elems = 1 + ((size + pad - 1) / sizeof(*PL_savestack));
624 /* SSCHECK may not be good enough */
625 while (PL_savestack_ix + elems + 2 > PL_savestack_max)
628 PL_savestack_ix += elems;
630 SSPUSHINT(SAVEt_ALLOC);
635 Perl_leave_scope(pTHX_ I32 base)
647 Perl_croak(aTHX_ "panic: corrupt saved stack index");
648 while (PL_savestack_ix > base) {
650 case SAVEt_ITEM: /* normal string */
651 value = (SV*)SSPOPPTR;
653 sv_replace(sv,value);
658 case SAVEt_SV: /* scalar reference */
659 value = (SV*)SSPOPPTR;
664 case SAVEt_GENERIC_PVREF: /* generic pv */
665 str = (char*)SSPOPPTR;
667 if (*(char**)ptr != str) {
668 Safefree(*(char**)ptr);
672 case SAVEt_SHARED_PVREF: /* shared pv */
673 str = (char*)SSPOPPTR;
675 if (*(char**)ptr != str) {
676 PerlMemShared_free(*(char**)ptr);
680 case SAVEt_GENERIC_SVREF: /* generic sv */
681 value = (SV*)SSPOPPTR;
688 case SAVEt_SVREF: /* scalar reference */
689 value = (SV*)SSPOPPTR;
693 DEBUG_S(PerlIO_printf(Perl_debug_log,
694 "restore svref: %p %p:%s -> %p:%s\n",
695 ptr, sv, SvPEEK(sv), value, SvPEEK(value)));
696 if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv) &&
697 SvTYPE(sv) != SVt_PVGV)
699 (void)SvUPGRADE(value, SvTYPE(sv));
700 SvMAGIC(value) = SvMAGIC(sv);
701 SvFLAGS(value) |= SvMAGICAL(sv);
705 /* XXX This branch is pretty bogus. This code irretrievably
706 * clears(!) the magic on the SV (either to avoid further
707 * croaking that might ensue when the SvSETMAGIC() below is
708 * called, or to avoid two different SVs pointing at the same
709 * SvMAGIC()). This needs a total rethink. --GSAR */
710 else if (SvTYPE(value) >= SVt_PVMG && SvMAGIC(value) &&
711 SvTYPE(value) != SVt_PVGV)
713 SvFLAGS(value) |= (SvFLAGS(value) &
714 (SVp_NOK|SVp_POK)) >> PRIVSHIFT;
715 SvMAGICAL_off(value);
716 /* XXX this is a leak when we get here because the
717 * mg_get() in save_scalar_at() croaked */
727 case SAVEt_AV: /* array reference */
731 AV *goner = GvAV(gv);
732 SvMAGIC(av) = SvMAGIC(goner);
733 SvFLAGS((SV*)av) |= SvMAGICAL(goner);
734 SvMAGICAL_off(goner);
745 case SAVEt_HV: /* hash reference */
749 HV *goner = GvHV(gv);
750 SvMAGIC(hv) = SvMAGIC(goner);
751 SvFLAGS(hv) |= SvMAGICAL(goner);
752 SvMAGICAL_off(goner);
763 case SAVEt_INT: /* int reference */
765 *(int*)ptr = (int)SSPOPINT;
767 case SAVEt_LONG: /* long reference */
769 *(long*)ptr = (long)SSPOPLONG;
771 case SAVEt_I32: /* I32 reference */
773 *(I32*)ptr = (I32)SSPOPINT;
775 case SAVEt_I16: /* I16 reference */
777 *(I16*)ptr = (I16)SSPOPINT;
779 case SAVEt_I8: /* I8 reference */
781 *(I8*)ptr = (I8)SSPOPINT;
783 case SAVEt_IV: /* IV reference */
785 *(IV*)ptr = (IV)SSPOPIV;
787 case SAVEt_SPTR: /* SV* reference */
789 *(SV**)ptr = (SV*)SSPOPPTR;
791 case SAVEt_VPTR: /* random* reference */
792 case SAVEt_PPTR: /* char* reference */
794 *(char**)ptr = (char*)SSPOPPTR;
796 case SAVEt_HPTR: /* HV* reference */
798 *(HV**)ptr = (HV*)SSPOPPTR;
800 case SAVEt_APTR: /* AV* reference */
802 *(AV**)ptr = (AV*)SSPOPPTR;
806 (void)sv_clear((SV*)gv);
808 case SAVEt_GP: /* scalar reference */
811 if (SvPVX(gv) && SvLEN(gv) > 0) {
814 SvPVX(gv) = (char *)SSPOPPTR;
815 SvCUR(gv) = (STRLEN)SSPOPIV;
816 SvLEN(gv) = (STRLEN)SSPOPIV;
820 PL_sub_generation++; /* putting a method back into circulation */
825 SvREFCNT_dec((SV*)ptr);
827 case SAVEt_MORTALIZESV:
829 sv_2mortal((SV*)ptr);
834 PL_curpad = AvARRAY(PL_comppad);
839 Safefree((char*)ptr);
842 ptr = (void*)&PL_curpad[SSPOPLONG];
844 /* Can clear pad variable in place? */
845 if (SvREFCNT(sv) <= 1 && !SvOBJECT(sv)) {
847 * if a my variable that was made readonly is going out of
848 * scope, we want to remove the readonlyness so that it can
849 * go out of scope quietly
851 if (SvPADMY(sv) && !SvFAKE(sv))
854 if (SvTHINKFIRST(sv))
855 sv_force_normal_flags(sv, SV_IMMEDIATE_UNREF);
859 switch (SvTYPE(sv)) {
869 Perl_croak(aTHX_ "panic: leave_scope pad code");
881 else { /* Someone has a claim on this, so abandon it. */
882 U32 padflags = SvFLAGS(sv) & (SVs_PADBUSY|SVs_PADMY|SVs_PADTMP);
883 switch (SvTYPE(sv)) { /* Console ourselves with a new value */
884 case SVt_PVAV: *(SV**)ptr = (SV*)newAV(); break;
885 case SVt_PVHV: *(SV**)ptr = (SV*)newHV(); break;
886 default: *(SV**)ptr = NEWSV(0,0); break;
888 SvREFCNT_dec(sv); /* Cast current value to the winds. */
889 SvFLAGS(*(SV**)ptr) |= padflags; /* preserve pad nature */
896 (void)hv_delete(hv, (char*)ptr, (U32)SSPOPINT, G_DISCARD);
900 case SAVEt_DESTRUCTOR:
904 case SAVEt_DESTRUCTOR_X:
906 (*SSPOPDXPTR)(aTHX_ ptr);
908 case SAVEt_REGCONTEXT:
911 PL_savestack_ix -= i; /* regexp must have croaked */
913 case SAVEt_STACK_POS: /* Position on Perl stack */
915 PL_stack_sp = PL_stack_base + i;
917 case SAVEt_AELEM: /* array element */
918 value = (SV*)SSPOPPTR;
921 ptr = av_fetch(av,i,1);
924 if (sv && sv != &PL_sv_undef) {
925 if (SvTIED_mg((SV*)av, PERL_MAGIC_tied))
926 (void)SvREFCNT_inc(sv);
934 case SAVEt_HELEM: /* hash element */
935 value = (SV*)SSPOPPTR;
938 ptr = hv_fetch_ent(hv, sv, 1, 0);
940 SV *oval = HeVAL((HE*)ptr);
941 if (oval && oval != &PL_sv_undef) {
942 ptr = &HeVAL((HE*)ptr);
943 if (SvTIED_mg((SV*)hv, PERL_MAGIC_tied))
944 (void)SvREFCNT_inc(*(SV**)ptr);
955 PL_op = (OP*)SSPOPPTR;
958 *(I32*)&PL_hints = (I32)SSPOPINT;
961 PL_comppad = (AV*)SSPOPPTR;
963 PL_curpad = AvARRAY(PL_comppad);
965 PL_curpad = Null(SV**);
969 PADOFFSET off = (PADOFFSET)SSPOPLONG;
972 ((SV**)ptr)[off] = (SV*)SSPOPPTR;
976 Perl_croak(aTHX_ "panic: leave_scope inconsistency");
982 Perl_cx_dump(pTHX_ PERL_CONTEXT *cx)
985 PerlIO_printf(Perl_debug_log, "CX %ld = %s\n", (long)(cx - cxstack), PL_block_type[CxTYPE(cx)]);
986 if (CxTYPE(cx) != CXt_SUBST) {
987 PerlIO_printf(Perl_debug_log, "BLK_OLDSP = %ld\n", (long)cx->blk_oldsp);
988 PerlIO_printf(Perl_debug_log, "BLK_OLDCOP = 0x%"UVxf"\n",
989 PTR2UV(cx->blk_oldcop));
990 PerlIO_printf(Perl_debug_log, "BLK_OLDMARKSP = %ld\n", (long)cx->blk_oldmarksp);
991 PerlIO_printf(Perl_debug_log, "BLK_OLDSCOPESP = %ld\n", (long)cx->blk_oldscopesp);
992 PerlIO_printf(Perl_debug_log, "BLK_OLDRETSP = %ld\n", (long)cx->blk_oldretsp);
993 PerlIO_printf(Perl_debug_log, "BLK_OLDPM = 0x%"UVxf"\n",
994 PTR2UV(cx->blk_oldpm));
995 PerlIO_printf(Perl_debug_log, "BLK_GIMME = %s\n", cx->blk_gimme ? "LIST" : "SCALAR");
997 switch (CxTYPE(cx)) {
1002 PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n",
1003 PTR2UV(cx->blk_sub.cv));
1004 PerlIO_printf(Perl_debug_log, "BLK_SUB.GV = 0x%"UVxf"\n",
1005 PTR2UV(cx->blk_sub.gv));
1006 PerlIO_printf(Perl_debug_log, "BLK_SUB.DFOUTGV = 0x%"UVxf"\n",
1007 PTR2UV(cx->blk_sub.dfoutgv));
1008 PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
1009 (int)cx->blk_sub.hasargs);
1012 PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n",
1013 PTR2UV(cx->blk_sub.cv));
1014 PerlIO_printf(Perl_debug_log, "BLK_SUB.OLDDEPTH = %ld\n",
1015 (long)cx->blk_sub.olddepth);
1016 PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
1017 (int)cx->blk_sub.hasargs);
1018 PerlIO_printf(Perl_debug_log, "BLK_SUB.LVAL = %d\n",
1019 (int)cx->blk_sub.lval);
1022 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_IN_EVAL = %ld\n",
1023 (long)cx->blk_eval.old_in_eval);
1024 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_OP_TYPE = %s (%s)\n",
1025 PL_op_name[cx->blk_eval.old_op_type],
1026 PL_op_desc[cx->blk_eval.old_op_type]);
1027 if (cx->blk_eval.old_namesv)
1028 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_NAME = %s\n",
1029 SvPVX(cx->blk_eval.old_namesv));
1030 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_EVAL_ROOT = 0x%"UVxf"\n",
1031 PTR2UV(cx->blk_eval.old_eval_root));
1035 PerlIO_printf(Perl_debug_log, "BLK_LOOP.LABEL = %s\n",
1036 cx->blk_loop.label);
1037 PerlIO_printf(Perl_debug_log, "BLK_LOOP.RESETSP = %ld\n",
1038 (long)cx->blk_loop.resetsp);
1039 PerlIO_printf(Perl_debug_log, "BLK_LOOP.REDO_OP = 0x%"UVxf"\n",
1040 PTR2UV(cx->blk_loop.redo_op));
1041 PerlIO_printf(Perl_debug_log, "BLK_LOOP.NEXT_OP = 0x%"UVxf"\n",
1042 PTR2UV(cx->blk_loop.next_op));
1043 PerlIO_printf(Perl_debug_log, "BLK_LOOP.LAST_OP = 0x%"UVxf"\n",
1044 PTR2UV(cx->blk_loop.last_op));
1045 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERIX = %ld\n",
1046 (long)cx->blk_loop.iterix);
1047 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERARY = 0x%"UVxf"\n",
1048 PTR2UV(cx->blk_loop.iterary));
1049 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERVAR = 0x%"UVxf"\n",
1050 PTR2UV(CxITERVAR(cx)));
1052 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERSAVE = 0x%"UVxf"\n",
1053 PTR2UV(cx->blk_loop.itersave));
1054 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERLVAL = 0x%"UVxf"\n",
1055 PTR2UV(cx->blk_loop.iterlval));
1059 PerlIO_printf(Perl_debug_log, "SB_ITERS = %ld\n",
1060 (long)cx->sb_iters);
1061 PerlIO_printf(Perl_debug_log, "SB_MAXITERS = %ld\n",
1062 (long)cx->sb_maxiters);
1063 PerlIO_printf(Perl_debug_log, "SB_RFLAGS = %ld\n",
1064 (long)cx->sb_rflags);
1065 PerlIO_printf(Perl_debug_log, "SB_ONCE = %ld\n",
1067 PerlIO_printf(Perl_debug_log, "SB_ORIG = %s\n",
1069 PerlIO_printf(Perl_debug_log, "SB_DSTR = 0x%"UVxf"\n",
1070 PTR2UV(cx->sb_dstr));
1071 PerlIO_printf(Perl_debug_log, "SB_TARG = 0x%"UVxf"\n",
1072 PTR2UV(cx->sb_targ));
1073 PerlIO_printf(Perl_debug_log, "SB_S = 0x%"UVxf"\n",
1075 PerlIO_printf(Perl_debug_log, "SB_M = 0x%"UVxf"\n",
1077 PerlIO_printf(Perl_debug_log, "SB_STREND = 0x%"UVxf"\n",
1078 PTR2UV(cx->sb_strend));
1079 PerlIO_printf(Perl_debug_log, "SB_RXRES = 0x%"UVxf"\n",
1080 PTR2UV(cx->sb_rxres));
1083 #endif /* DEBUGGING */