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)
53 #if defined(DEBUGGING) && !defined(USE_THREADS)
54 static int growing = 0;
59 #ifndef STRESS_REALLOC
60 av_extend(PL_curstack, (p - PL_stack_base) + (n) + 128);
62 av_extend(PL_curstack, (p - PL_stack_base) + (n) + 1);
64 #if defined(DEBUGGING) && !defined(USE_THREADS)
70 #ifndef STRESS_REALLOC
71 #define GROW(old) ((old) * 3 / 2)
73 #define GROW(old) ((old) + 1)
77 Perl_new_stackinfo(pTHX_ I32 stitems, I32 cxitems)
80 New(56, si, 1, PERL_SI);
81 si->si_stack = newAV();
82 AvREAL_off(si->si_stack);
83 av_extend(si->si_stack, stitems > 0 ? stitems-1 : 0);
84 AvALLOC(si->si_stack)[0] = &PL_sv_undef;
85 AvFILLp(si->si_stack) = 0;
88 si->si_cxmax = cxitems - 1;
90 si->si_type = PERLSI_UNDEF;
91 New(56, si->si_cxstack, cxitems, PERL_CONTEXT);
98 cxstack_max = GROW(cxstack_max);
99 Renew(cxstack, cxstack_max + 1, PERL_CONTEXT); /* XXX should fix CXINC macro */
100 return cxstack_ix + 1;
104 Perl_push_return(pTHX_ OP *retop)
106 if (PL_retstack_ix == PL_retstack_max) {
107 PL_retstack_max = GROW(PL_retstack_max);
108 Renew(PL_retstack, PL_retstack_max, OP*);
110 PL_retstack[PL_retstack_ix++] = retop;
114 Perl_pop_return(pTHX)
116 if (PL_retstack_ix > 0)
117 return PL_retstack[--PL_retstack_ix];
123 Perl_push_scope(pTHX)
125 if (PL_scopestack_ix == PL_scopestack_max) {
126 PL_scopestack_max = GROW(PL_scopestack_max);
127 Renew(PL_scopestack, PL_scopestack_max, I32);
129 PL_scopestack[PL_scopestack_ix++] = PL_savestack_ix;
136 I32 oldsave = PL_scopestack[--PL_scopestack_ix];
137 LEAVE_SCOPE(oldsave);
141 Perl_markstack_grow(pTHX)
143 I32 oldmax = PL_markstack_max - PL_markstack;
144 I32 newmax = GROW(oldmax);
146 Renew(PL_markstack, newmax, I32);
147 PL_markstack_ptr = PL_markstack + oldmax;
148 PL_markstack_max = PL_markstack + newmax;
152 Perl_savestack_grow(pTHX)
154 PL_savestack_max = GROW(PL_savestack_max) + 4;
155 Renew(PL_savestack, PL_savestack_max, ANY);
161 Perl_tmps_grow(pTHX_ I32 n)
163 #ifndef STRESS_REALLOC
165 n = (PL_tmps_max < 512) ? 128 : 512;
167 PL_tmps_max = PL_tmps_ix + n + 1;
168 Renew(PL_tmps_stack, PL_tmps_max, SV*);
175 /* XXX should tmps_floor live in cxstack? */
176 I32 myfloor = PL_tmps_floor;
177 while (PL_tmps_ix > myfloor) { /* clean up after last statement */
178 SV* sv = PL_tmps_stack[PL_tmps_ix];
179 PL_tmps_stack[PL_tmps_ix--] = Nullsv;
182 SvREFCNT_dec(sv); /* note, can modify tmps_ix!!! */
188 S_save_scalar_at(pTHX_ SV **sptr)
193 sv = *sptr = NEWSV(0,0);
194 if (SvTYPE(osv) >= SVt_PVMG && SvMAGIC(osv) && SvTYPE(osv) != SVt_PVGV) {
195 sv_upgrade(sv, SvTYPE(osv));
196 if (SvGMAGICAL(osv)) {
198 bool oldtainted = PL_tainted;
200 if (PL_tainting && PL_tainted && (mg = mg_find(osv, 't'))) {
201 SAVESPTR(mg->mg_obj);
204 SvFLAGS(osv) |= (SvFLAGS(osv) &
205 (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT;
206 PL_tainted = oldtainted;
208 SvMAGIC(sv) = SvMAGIC(osv);
209 SvFLAGS(sv) |= SvMAGICAL(osv);
218 Perl_save_scalar(pTHX_ GV *gv)
220 SV **sptr = &GvSV(gv);
222 SSPUSHPTR(SvREFCNT_inc(gv));
223 SSPUSHPTR(SvREFCNT_inc(*sptr));
225 return save_scalar_at(sptr);
229 Perl_save_svref(pTHX_ SV **sptr)
233 SSPUSHPTR(SvREFCNT_inc(*sptr));
234 SSPUSHINT(SAVEt_SVREF);
235 return save_scalar_at(sptr);
238 /* Like save_sptr(), but also SvREFCNT_dec()s the new value. Can be used to
239 * restore a global SV to its prior contents, freeing new value. */
241 Perl_save_generic_svref(pTHX_ SV **sptr)
245 SSPUSHPTR(SvREFCNT_inc(*sptr));
246 SSPUSHINT(SAVEt_GENERIC_SVREF);
249 /* Like save_pptr(), but also Safefree()s the new value if it is different
250 * from the old one. Can be used to restore a global char* to its prior
251 * contents, freeing new value. */
253 Perl_save_generic_pvref(pTHX_ char **str)
258 SSPUSHINT(SAVEt_GENERIC_PVREF);
262 Perl_save_gp(pTHX_ GV *gv, I32 empty)
265 SSPUSHIV((IV)SvLEN(gv));
266 SvLEN(gv) = 0; /* forget that anything was allocated here */
267 SSPUSHIV((IV)SvCUR(gv));
268 SSPUSHPTR(SvPVX(gv));
270 SSPUSHPTR(SvREFCNT_inc(gv));
277 Newz(602, gp, 1, GP);
280 PL_sub_generation++; /* taking a method out of circulation */
281 if (GvIOp(gv) && (IoFLAGS(GvIOp(gv)) & IOf_ARGV)) {
283 IoFLAGS(gp->gp_io) |= IOf_ARGV|IOf_START;
285 GvGP(gv) = gp_ref(gp);
286 GvSV(gv) = NEWSV(72,0);
287 GvLINE(gv) = CopLINE(PL_curcop);
288 GvFILE(gv) = CopFILE(PL_curcop) ? CopFILE(PL_curcop) : "";
298 Perl_save_ary(pTHX_ GV *gv)
303 if (!AvREAL(oav) && AvREIFY(oav))
310 GvAV(gv) = Null(AV*);
313 SvMAGIC(av) = SvMAGIC(oav);
314 SvFLAGS((SV*)av) |= SvMAGICAL(oav);
325 Perl_save_hash(pTHX_ GV *gv)
331 SSPUSHPTR(ohv = GvHVn(gv));
334 GvHV(gv) = Null(HV*);
337 SvMAGIC(hv) = SvMAGIC(ohv);
338 SvFLAGS((SV*)hv) |= SvMAGICAL(ohv);
349 Perl_save_item(pTHX_ register SV *item)
351 register SV *sv = NEWSV(0,0);
355 SSPUSHPTR(item); /* remember the pointer */
356 SSPUSHPTR(sv); /* remember the value */
357 SSPUSHINT(SAVEt_ITEM);
361 Perl_save_int(pTHX_ int *intp)
366 SSPUSHINT(SAVEt_INT);
370 Perl_save_long(pTHX_ long int *longp)
375 SSPUSHINT(SAVEt_LONG);
379 Perl_save_I32(pTHX_ I32 *intp)
384 SSPUSHINT(SAVEt_I32);
388 Perl_save_I16(pTHX_ I16 *intp)
393 SSPUSHINT(SAVEt_I16);
397 Perl_save_I8(pTHX_ I8 *bytep)
406 Perl_save_iv(pTHX_ IV *ivp)
414 /* Cannot use save_sptr() to store a char* since the SV** cast will
415 * force word-alignment and we'll miss the pointer.
418 Perl_save_pptr(pTHX_ char **pptr)
423 SSPUSHINT(SAVEt_PPTR);
427 Perl_save_vptr(pTHX_ void *ptr)
430 SSPUSHPTR(*(char**)ptr);
432 SSPUSHINT(SAVEt_VPTR);
436 Perl_save_sptr(pTHX_ SV **sptr)
441 SSPUSHINT(SAVEt_SPTR);
445 Perl_save_padsv(pTHX_ PADOFFSET off)
448 SSPUSHPTR(PL_curpad[off]);
449 SSPUSHPTR(PL_curpad);
450 SSPUSHLONG((long)off);
451 SSPUSHINT(SAVEt_PADSV);
455 Perl_save_threadsv(pTHX_ PADOFFSET i)
458 SV **svp = &THREADSV(i); /* XXX Change to save by offset */
459 DEBUG_S(PerlIO_printf(Perl_debug_log, "save_threadsv %"UVuf": %p %p:%s\n",
460 (UV)i, svp, *svp, SvPEEK(*svp)));
464 Perl_croak(aTHX_ "panic: save_threadsv called in non-threaded perl");
466 #endif /* USE_THREADS */
470 Perl_save_nogv(pTHX_ GV *gv)
474 SSPUSHINT(SAVEt_NSTAB);
478 Perl_save_hptr(pTHX_ HV **hptr)
483 SSPUSHINT(SAVEt_HPTR);
487 Perl_save_aptr(pTHX_ AV **aptr)
492 SSPUSHINT(SAVEt_APTR);
496 Perl_save_freesv(pTHX_ SV *sv)
500 SSPUSHINT(SAVEt_FREESV);
504 Perl_save_freeop(pTHX_ OP *o)
508 SSPUSHINT(SAVEt_FREEOP);
512 Perl_save_freepv(pTHX_ char *pv)
516 SSPUSHINT(SAVEt_FREEPV);
520 Perl_save_clearsv(pTHX_ SV **svp)
523 SSPUSHLONG((long)(svp-PL_curpad));
524 SSPUSHINT(SAVEt_CLEARSV);
528 Perl_save_delete(pTHX_ HV *hv, char *key, I32 klen)
533 SSPUSHPTR(SvREFCNT_inc(hv));
534 SSPUSHINT(SAVEt_DELETE);
538 Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg)
543 for (i = 1; i <= maxsarg; i++) {
545 sv_setsv(sv,sarg[i]);
547 SSPUSHPTR(sarg[i]); /* remember the pointer */
548 SSPUSHPTR(sv); /* remember the value */
549 SSPUSHINT(SAVEt_ITEM);
554 Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p)
559 SSPUSHINT(SAVEt_DESTRUCTOR);
563 Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p)
568 SSPUSHINT(SAVEt_DESTRUCTOR_X);
572 Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr)
575 SSPUSHPTR(SvREFCNT_inc(av));
577 SSPUSHPTR(SvREFCNT_inc(*sptr));
578 SSPUSHINT(SAVEt_AELEM);
579 save_scalar_at(sptr);
583 Perl_save_helem(pTHX_ HV *hv, SV *key, SV **sptr)
586 SSPUSHPTR(SvREFCNT_inc(hv));
587 SSPUSHPTR(SvREFCNT_inc(key));
588 SSPUSHPTR(SvREFCNT_inc(*sptr));
589 SSPUSHINT(SAVEt_HELEM);
590 save_scalar_at(sptr);
602 Perl_save_alloc(pTHX_ I32 size, I32 pad)
604 register I32 start = pad + ((char*)&PL_savestack[PL_savestack_ix]
605 - (char*)PL_savestack);
606 register I32 elems = 1 + ((size + pad - 1) / sizeof(*PL_savestack));
608 /* SSCHECK may not be good enough */
609 while (PL_savestack_ix + elems + 2 > PL_savestack_max)
612 PL_savestack_ix += elems;
614 SSPUSHINT(SAVEt_ALLOC);
619 Perl_leave_scope(pTHX_ I32 base)
631 Perl_croak(aTHX_ "panic: corrupt saved stack index");
632 while (PL_savestack_ix > base) {
634 case SAVEt_ITEM: /* normal string */
635 value = (SV*)SSPOPPTR;
637 sv_replace(sv,value);
642 case SAVEt_SV: /* scalar reference */
643 value = (SV*)SSPOPPTR;
648 case SAVEt_GENERIC_PVREF: /* generic pv */
649 str = (char*)SSPOPPTR;
651 if (*(char**)ptr != str) {
652 Safefree(*(char**)ptr);
656 case SAVEt_GENERIC_SVREF: /* generic sv */
657 value = (SV*)SSPOPPTR;
664 case SAVEt_SVREF: /* scalar reference */
665 value = (SV*)SSPOPPTR;
669 DEBUG_S(PerlIO_printf(Perl_debug_log,
670 "restore svref: %p %p:%s -> %p:%s\n",
671 ptr, sv, SvPEEK(sv), value, SvPEEK(value)));
672 if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv) &&
673 SvTYPE(sv) != SVt_PVGV)
675 (void)SvUPGRADE(value, SvTYPE(sv));
676 SvMAGIC(value) = SvMAGIC(sv);
677 SvFLAGS(value) |= SvMAGICAL(sv);
681 else if (SvTYPE(value) >= SVt_PVMG && SvMAGIC(value) &&
682 SvTYPE(value) != SVt_PVGV)
684 SvFLAGS(value) |= (SvFLAGS(value) &
685 (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT;
686 SvMAGICAL_off(value);
696 case SAVEt_AV: /* array reference */
700 AV *goner = GvAV(gv);
701 SvMAGIC(av) = SvMAGIC(goner);
702 SvFLAGS((SV*)av) |= SvMAGICAL(goner);
703 SvMAGICAL_off(goner);
714 case SAVEt_HV: /* hash reference */
718 HV *goner = GvHV(gv);
719 SvMAGIC(hv) = SvMAGIC(goner);
720 SvFLAGS(hv) |= SvMAGICAL(goner);
721 SvMAGICAL_off(goner);
732 case SAVEt_INT: /* int reference */
734 *(int*)ptr = (int)SSPOPINT;
736 case SAVEt_LONG: /* long reference */
738 *(long*)ptr = (long)SSPOPLONG;
740 case SAVEt_I32: /* I32 reference */
742 *(I32*)ptr = (I32)SSPOPINT;
744 case SAVEt_I16: /* I16 reference */
746 *(I16*)ptr = (I16)SSPOPINT;
748 case SAVEt_I8: /* I8 reference */
750 *(I8*)ptr = (I8)SSPOPINT;
752 case SAVEt_IV: /* IV reference */
754 *(IV*)ptr = (IV)SSPOPIV;
756 case SAVEt_SPTR: /* SV* reference */
758 *(SV**)ptr = (SV*)SSPOPPTR;
760 case SAVEt_VPTR: /* random* reference */
761 case SAVEt_PPTR: /* char* reference */
763 *(char**)ptr = (char*)SSPOPPTR;
765 case SAVEt_HPTR: /* HV* reference */
767 *(HV**)ptr = (HV*)SSPOPPTR;
769 case SAVEt_APTR: /* AV* reference */
771 *(AV**)ptr = (AV*)SSPOPPTR;
775 (void)sv_clear((SV*)gv);
777 case SAVEt_GP: /* scalar reference */
780 if (SvPVX(gv) && SvLEN(gv) > 0) {
783 SvPVX(gv) = (char *)SSPOPPTR;
784 SvCUR(gv) = (STRLEN)SSPOPIV;
785 SvLEN(gv) = (STRLEN)SSPOPIV;
789 PL_sub_generation++; /* putting a method back into circulation */
794 SvREFCNT_dec((SV*)ptr);
799 PL_curpad = AvARRAY(PL_comppad);
804 Safefree((char*)ptr);
807 ptr = (void*)&PL_curpad[SSPOPLONG];
809 /* Can clear pad variable in place? */
810 if (SvREFCNT(sv) <= 1 && !SvOBJECT(sv)) {
811 if (SvTHINKFIRST(sv))
812 sv_force_normal_flags(sv, SV_IMMEDIATE_UNREF);
816 switch (SvTYPE(sv)) {
826 Perl_croak(aTHX_ "panic: leave_scope pad code");
838 else { /* Someone has a claim on this, so abandon it. */
839 U32 padflags = SvFLAGS(sv) & (SVs_PADBUSY|SVs_PADMY|SVs_PADTMP);
840 switch (SvTYPE(sv)) { /* Console ourselves with a new value */
841 case SVt_PVAV: *(SV**)ptr = (SV*)newAV(); break;
842 case SVt_PVHV: *(SV**)ptr = (SV*)newHV(); break;
843 default: *(SV**)ptr = NEWSV(0,0); break;
845 SvREFCNT_dec(sv); /* Cast current value to the winds. */
846 SvFLAGS(*(SV**)ptr) |= padflags; /* preserve pad nature */
853 (void)hv_delete(hv, (char*)ptr, (U32)SSPOPINT, G_DISCARD);
857 case SAVEt_DESTRUCTOR:
861 case SAVEt_DESTRUCTOR_X:
863 (*SSPOPDXPTR)(aTHXo_ ptr);
865 case SAVEt_REGCONTEXT:
868 PL_savestack_ix -= i; /* regexp must have croaked */
870 case SAVEt_STACK_POS: /* Position on Perl stack */
872 PL_stack_sp = PL_stack_base + i;
874 case SAVEt_AELEM: /* array element */
875 value = (SV*)SSPOPPTR;
878 ptr = av_fetch(av,i,1);
881 if (sv && sv != &PL_sv_undef) {
882 if (SvTIED_mg((SV*)av, 'P'))
883 (void)SvREFCNT_inc(sv);
891 case SAVEt_HELEM: /* hash element */
892 value = (SV*)SSPOPPTR;
895 ptr = hv_fetch_ent(hv, sv, 1, 0);
897 SV *oval = HeVAL((HE*)ptr);
898 if (oval && oval != &PL_sv_undef) {
899 ptr = &HeVAL((HE*)ptr);
900 if (SvTIED_mg((SV*)hv, 'P'))
901 (void)SvREFCNT_inc(*(SV**)ptr);
912 PL_op = (OP*)SSPOPPTR;
915 if (GvHV(PL_hintgv)) {
916 SvREFCNT_dec((SV*)GvHV(PL_hintgv));
917 GvHV(PL_hintgv) = NULL;
919 *(I32*)&PL_hints = (I32)SSPOPINT;
922 PL_comppad = (AV*)SSPOPPTR;
924 PL_curpad = AvARRAY(PL_comppad);
926 PL_curpad = Null(SV**);
930 PADOFFSET off = (PADOFFSET)SSPOPLONG;
933 ((SV**)ptr)[off] = (SV*)SSPOPPTR;
937 Perl_croak(aTHX_ "panic: leave_scope inconsistency");
943 Perl_cx_dump(pTHX_ PERL_CONTEXT *cx)
946 PerlIO_printf(Perl_debug_log, "CX %ld = %s\n", (long)(cx - cxstack), PL_block_type[CxTYPE(cx)]);
947 if (CxTYPE(cx) != CXt_SUBST) {
948 PerlIO_printf(Perl_debug_log, "BLK_OLDSP = %ld\n", (long)cx->blk_oldsp);
949 PerlIO_printf(Perl_debug_log, "BLK_OLDCOP = 0x%"UVxf"\n",
950 PTR2UV(cx->blk_oldcop));
951 PerlIO_printf(Perl_debug_log, "BLK_OLDMARKSP = %ld\n", (long)cx->blk_oldmarksp);
952 PerlIO_printf(Perl_debug_log, "BLK_OLDSCOPESP = %ld\n", (long)cx->blk_oldscopesp);
953 PerlIO_printf(Perl_debug_log, "BLK_OLDRETSP = %ld\n", (long)cx->blk_oldretsp);
954 PerlIO_printf(Perl_debug_log, "BLK_OLDPM = 0x%"UVxf"\n",
955 PTR2UV(cx->blk_oldpm));
956 PerlIO_printf(Perl_debug_log, "BLK_GIMME = %s\n", cx->blk_gimme ? "LIST" : "SCALAR");
958 switch (CxTYPE(cx)) {
963 PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n",
964 PTR2UV(cx->blk_sub.cv));
965 PerlIO_printf(Perl_debug_log, "BLK_SUB.GV = 0x%"UVxf"\n",
966 PTR2UV(cx->blk_sub.gv));
967 PerlIO_printf(Perl_debug_log, "BLK_SUB.DFOUTGV = 0x%"UVxf"\n",
968 PTR2UV(cx->blk_sub.dfoutgv));
969 PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
970 (int)cx->blk_sub.hasargs);
973 PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n",
974 PTR2UV(cx->blk_sub.cv));
975 PerlIO_printf(Perl_debug_log, "BLK_SUB.OLDDEPTH = %ld\n",
976 (long)cx->blk_sub.olddepth);
977 PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
978 (int)cx->blk_sub.hasargs);
979 PerlIO_printf(Perl_debug_log, "BLK_SUB.LVAL = %d\n",
980 (int)cx->blk_sub.lval);
983 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_IN_EVAL = %ld\n",
984 (long)cx->blk_eval.old_in_eval);
985 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_OP_TYPE = %s (%s)\n",
986 PL_op_name[cx->blk_eval.old_op_type],
987 PL_op_desc[cx->blk_eval.old_op_type]);
988 if (cx->blk_eval.old_namesv)
989 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_NAME = %s\n",
990 SvPVX(cx->blk_eval.old_namesv));
991 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_EVAL_ROOT = 0x%"UVxf"\n",
992 PTR2UV(cx->blk_eval.old_eval_root));
996 PerlIO_printf(Perl_debug_log, "BLK_LOOP.LABEL = %s\n",
998 PerlIO_printf(Perl_debug_log, "BLK_LOOP.RESETSP = %ld\n",
999 (long)cx->blk_loop.resetsp);
1000 PerlIO_printf(Perl_debug_log, "BLK_LOOP.REDO_OP = 0x%"UVxf"\n",
1001 PTR2UV(cx->blk_loop.redo_op));
1002 PerlIO_printf(Perl_debug_log, "BLK_LOOP.NEXT_OP = 0x%"UVxf"\n",
1003 PTR2UV(cx->blk_loop.next_op));
1004 PerlIO_printf(Perl_debug_log, "BLK_LOOP.LAST_OP = 0x%"UVxf"\n",
1005 PTR2UV(cx->blk_loop.last_op));
1006 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERIX = %ld\n",
1007 (long)cx->blk_loop.iterix);
1008 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERARY = 0x%"UVxf"\n",
1009 PTR2UV(cx->blk_loop.iterary));
1010 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERVAR = 0x%"UVxf"\n",
1011 PTR2UV(CxITERVAR(cx)));
1013 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERSAVE = 0x%"UVxf"\n",
1014 PTR2UV(cx->blk_loop.itersave));
1015 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERLVAL = 0x%"UVxf"\n",
1016 PTR2UV(cx->blk_loop.iterlval));
1020 PerlIO_printf(Perl_debug_log, "SB_ITERS = %ld\n",
1021 (long)cx->sb_iters);
1022 PerlIO_printf(Perl_debug_log, "SB_MAXITERS = %ld\n",
1023 (long)cx->sb_maxiters);
1024 PerlIO_printf(Perl_debug_log, "SB_RFLAGS = %ld\n",
1025 (long)cx->sb_rflags);
1026 PerlIO_printf(Perl_debug_log, "SB_ONCE = %ld\n",
1028 PerlIO_printf(Perl_debug_log, "SB_ORIG = %s\n",
1030 PerlIO_printf(Perl_debug_log, "SB_DSTR = 0x%"UVxf"\n",
1031 PTR2UV(cx->sb_dstr));
1032 PerlIO_printf(Perl_debug_log, "SB_TARG = 0x%"UVxf"\n",
1033 PTR2UV(cx->sb_targ));
1034 PerlIO_printf(Perl_debug_log, "SB_S = 0x%"UVxf"\n",
1036 PerlIO_printf(Perl_debug_log, "SB_M = 0x%"UVxf"\n",
1038 PerlIO_printf(Perl_debug_log, "SB_STREND = 0x%"UVxf"\n",
1039 PTR2UV(cx->sb_strend));
1040 PerlIO_printf(Perl_debug_log, "SB_RXRES = 0x%"UVxf"\n",
1041 PTR2UV(cx->sb_rxres));
1044 #endif /* DEBUGGING */