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;
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);
258 Perl_save_gp(pTHX_ GV *gv, I32 empty)
261 SSPUSHIV((IV)SvLEN(gv));
262 SvLEN(gv) = 0; /* forget that anything was allocated here */
263 SSPUSHIV((IV)SvCUR(gv));
264 SSPUSHPTR(SvPVX(gv));
266 SSPUSHPTR(SvREFCNT_inc(gv));
273 Newz(602, gp, 1, GP);
276 PL_sub_generation++; /* taking a method out of circulation */
277 if (GvIOp(gv) && (IoFLAGS(GvIOp(gv)) & IOf_ARGV)) {
279 IoFLAGS(gp->gp_io) |= IOf_ARGV|IOf_START;
281 GvGP(gv) = gp_ref(gp);
282 GvSV(gv) = NEWSV(72,0);
283 GvLINE(gv) = CopLINE(PL_curcop);
284 GvFILE(gv) = CopFILE(PL_curcop) ? CopFILE(PL_curcop) : "";
294 Perl_save_ary(pTHX_ GV *gv)
299 if (!AvREAL(oav) && AvREIFY(oav))
306 GvAV(gv) = Null(AV*);
309 SvMAGIC(av) = SvMAGIC(oav);
310 SvFLAGS((SV*)av) |= SvMAGICAL(oav);
321 Perl_save_hash(pTHX_ GV *gv)
327 SSPUSHPTR(ohv = GvHVn(gv));
330 GvHV(gv) = Null(HV*);
333 SvMAGIC(hv) = SvMAGIC(ohv);
334 SvFLAGS((SV*)hv) |= SvMAGICAL(ohv);
345 Perl_save_item(pTHX_ register SV *item)
347 register SV *sv = NEWSV(0,0);
351 SSPUSHPTR(item); /* remember the pointer */
352 SSPUSHPTR(sv); /* remember the value */
353 SSPUSHINT(SAVEt_ITEM);
357 Perl_save_int(pTHX_ int *intp)
362 SSPUSHINT(SAVEt_INT);
366 Perl_save_long(pTHX_ long int *longp)
371 SSPUSHINT(SAVEt_LONG);
375 Perl_save_I32(pTHX_ I32 *intp)
380 SSPUSHINT(SAVEt_I32);
384 Perl_save_I16(pTHX_ I16 *intp)
389 SSPUSHINT(SAVEt_I16);
393 Perl_save_I8(pTHX_ I8 *bytep)
402 Perl_save_iv(pTHX_ IV *ivp)
410 /* Cannot use save_sptr() to store a char* since the SV** cast will
411 * force word-alignment and we'll miss the pointer.
414 Perl_save_pptr(pTHX_ char **pptr)
419 SSPUSHINT(SAVEt_PPTR);
423 Perl_save_vptr(pTHX_ void *ptr)
426 SSPUSHPTR(*(char**)ptr);
428 SSPUSHINT(SAVEt_VPTR);
432 Perl_save_sptr(pTHX_ SV **sptr)
437 SSPUSHINT(SAVEt_SPTR);
441 Perl_save_padsv(pTHX_ PADOFFSET off)
444 SSPUSHPTR(PL_curpad[off]);
445 SSPUSHPTR(PL_curpad);
446 SSPUSHLONG((long)off);
447 SSPUSHINT(SAVEt_PADSV);
451 Perl_save_threadsv(pTHX_ PADOFFSET i)
453 #ifdef USE_5005THREADS
454 SV **svp = &THREADSV(i); /* XXX Change to save by offset */
455 DEBUG_S(PerlIO_printf(Perl_debug_log, "save_threadsv %"UVuf": %p %p:%s\n",
456 (UV)i, svp, *svp, SvPEEK(*svp)));
460 Perl_croak(aTHX_ "panic: save_threadsv called in non-threaded perl");
462 #endif /* USE_5005THREADS */
466 Perl_save_nogv(pTHX_ GV *gv)
470 SSPUSHINT(SAVEt_NSTAB);
474 Perl_save_hptr(pTHX_ HV **hptr)
479 SSPUSHINT(SAVEt_HPTR);
483 Perl_save_aptr(pTHX_ AV **aptr)
488 SSPUSHINT(SAVEt_APTR);
492 Perl_save_freesv(pTHX_ SV *sv)
496 SSPUSHINT(SAVEt_FREESV);
500 Perl_save_mortalizesv(pTHX_ SV *sv)
504 SSPUSHINT(SAVEt_MORTALIZESV);
508 Perl_save_freeop(pTHX_ OP *o)
512 SSPUSHINT(SAVEt_FREEOP);
516 Perl_save_freepv(pTHX_ char *pv)
520 SSPUSHINT(SAVEt_FREEPV);
524 Perl_save_clearsv(pTHX_ SV **svp)
527 SSPUSHLONG((long)(svp-PL_curpad));
528 SSPUSHINT(SAVEt_CLEARSV);
532 Perl_save_delete(pTHX_ HV *hv, char *key, I32 klen)
537 SSPUSHPTR(SvREFCNT_inc(hv));
538 SSPUSHINT(SAVEt_DELETE);
542 Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg)
547 for (i = 1; i <= maxsarg; i++) {
549 sv_setsv(sv,sarg[i]);
551 SSPUSHPTR(sarg[i]); /* remember the pointer */
552 SSPUSHPTR(sv); /* remember the value */
553 SSPUSHINT(SAVEt_ITEM);
558 Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p)
563 SSPUSHINT(SAVEt_DESTRUCTOR);
567 Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p)
572 SSPUSHINT(SAVEt_DESTRUCTOR_X);
576 Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr)
579 SSPUSHPTR(SvREFCNT_inc(av));
581 SSPUSHPTR(SvREFCNT_inc(*sptr));
582 SSPUSHINT(SAVEt_AELEM);
583 save_scalar_at(sptr);
587 Perl_save_helem(pTHX_ HV *hv, SV *key, SV **sptr)
590 SSPUSHPTR(SvREFCNT_inc(hv));
591 SSPUSHPTR(SvREFCNT_inc(key));
592 SSPUSHPTR(SvREFCNT_inc(*sptr));
593 SSPUSHINT(SAVEt_HELEM);
594 save_scalar_at(sptr);
606 Perl_save_alloc(pTHX_ I32 size, I32 pad)
608 register I32 start = pad + ((char*)&PL_savestack[PL_savestack_ix]
609 - (char*)PL_savestack);
610 register I32 elems = 1 + ((size + pad - 1) / sizeof(*PL_savestack));
612 /* SSCHECK may not be good enough */
613 while (PL_savestack_ix + elems + 2 > PL_savestack_max)
616 PL_savestack_ix += elems;
618 SSPUSHINT(SAVEt_ALLOC);
623 Perl_leave_scope(pTHX_ I32 base)
635 Perl_croak(aTHX_ "panic: corrupt saved stack index");
636 while (PL_savestack_ix > base) {
638 case SAVEt_ITEM: /* normal string */
639 value = (SV*)SSPOPPTR;
641 sv_replace(sv,value);
646 case SAVEt_SV: /* scalar reference */
647 value = (SV*)SSPOPPTR;
652 case SAVEt_GENERIC_PVREF: /* generic pv */
653 str = (char*)SSPOPPTR;
655 if (*(char**)ptr != str) {
656 Safefree(*(char**)ptr);
660 case SAVEt_GENERIC_SVREF: /* generic sv */
661 value = (SV*)SSPOPPTR;
668 case SAVEt_SVREF: /* scalar reference */
669 value = (SV*)SSPOPPTR;
673 DEBUG_S(PerlIO_printf(Perl_debug_log,
674 "restore svref: %p %p:%s -> %p:%s\n",
675 ptr, sv, SvPEEK(sv), value, SvPEEK(value)));
676 if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv) &&
677 SvTYPE(sv) != SVt_PVGV)
679 (void)SvUPGRADE(value, SvTYPE(sv));
680 SvMAGIC(value) = SvMAGIC(sv);
681 SvFLAGS(value) |= SvMAGICAL(sv);
685 /* XXX This branch is pretty bogus. This code irretrievably
686 * clears(!) the magic on the SV (either to avoid further
687 * croaking that might ensue when the SvSETMAGIC() below is
688 * called, or to avoid two different SVs pointing at the same
689 * SvMAGIC()). This needs a total rethink. --GSAR */
690 else if (SvTYPE(value) >= SVt_PVMG && SvMAGIC(value) &&
691 SvTYPE(value) != SVt_PVGV)
693 SvFLAGS(value) |= (SvFLAGS(value) &
694 (SVp_NOK|SVp_POK)) >> PRIVSHIFT;
695 SvMAGICAL_off(value);
696 /* XXX this is a leak when we get here because the
697 * mg_get() in save_scalar_at() croaked */
707 case SAVEt_AV: /* array reference */
711 AV *goner = GvAV(gv);
712 SvMAGIC(av) = SvMAGIC(goner);
713 SvFLAGS((SV*)av) |= SvMAGICAL(goner);
714 SvMAGICAL_off(goner);
725 case SAVEt_HV: /* hash reference */
729 HV *goner = GvHV(gv);
730 SvMAGIC(hv) = SvMAGIC(goner);
731 SvFLAGS(hv) |= SvMAGICAL(goner);
732 SvMAGICAL_off(goner);
743 case SAVEt_INT: /* int reference */
745 *(int*)ptr = (int)SSPOPINT;
747 case SAVEt_LONG: /* long reference */
749 *(long*)ptr = (long)SSPOPLONG;
751 case SAVEt_I32: /* I32 reference */
753 *(I32*)ptr = (I32)SSPOPINT;
755 case SAVEt_I16: /* I16 reference */
757 *(I16*)ptr = (I16)SSPOPINT;
759 case SAVEt_I8: /* I8 reference */
761 *(I8*)ptr = (I8)SSPOPINT;
763 case SAVEt_IV: /* IV reference */
765 *(IV*)ptr = (IV)SSPOPIV;
767 case SAVEt_SPTR: /* SV* reference */
769 *(SV**)ptr = (SV*)SSPOPPTR;
771 case SAVEt_VPTR: /* random* reference */
772 case SAVEt_PPTR: /* char* reference */
774 *(char**)ptr = (char*)SSPOPPTR;
776 case SAVEt_HPTR: /* HV* reference */
778 *(HV**)ptr = (HV*)SSPOPPTR;
780 case SAVEt_APTR: /* AV* reference */
782 *(AV**)ptr = (AV*)SSPOPPTR;
786 (void)sv_clear((SV*)gv);
788 case SAVEt_GP: /* scalar reference */
791 if (SvPVX(gv) && SvLEN(gv) > 0) {
794 SvPVX(gv) = (char *)SSPOPPTR;
795 SvCUR(gv) = (STRLEN)SSPOPIV;
796 SvLEN(gv) = (STRLEN)SSPOPIV;
800 PL_sub_generation++; /* putting a method back into circulation */
805 SvREFCNT_dec((SV*)ptr);
807 case SAVEt_MORTALIZESV:
809 sv_2mortal((SV*)ptr);
814 PL_curpad = AvARRAY(PL_comppad);
819 Safefree((char*)ptr);
822 ptr = (void*)&PL_curpad[SSPOPLONG];
824 /* Can clear pad variable in place? */
825 if (SvREFCNT(sv) <= 1 && !SvOBJECT(sv)) {
826 if (SvTHINKFIRST(sv))
827 sv_force_normal_flags(sv, SV_IMMEDIATE_UNREF);
831 switch (SvTYPE(sv)) {
841 Perl_croak(aTHX_ "panic: leave_scope pad code");
853 else { /* Someone has a claim on this, so abandon it. */
854 U32 padflags = SvFLAGS(sv) & (SVs_PADBUSY|SVs_PADMY|SVs_PADTMP);
855 switch (SvTYPE(sv)) { /* Console ourselves with a new value */
856 case SVt_PVAV: *(SV**)ptr = (SV*)newAV(); break;
857 case SVt_PVHV: *(SV**)ptr = (SV*)newHV(); break;
858 default: *(SV**)ptr = NEWSV(0,0); break;
860 SvREFCNT_dec(sv); /* Cast current value to the winds. */
861 SvFLAGS(*(SV**)ptr) |= padflags; /* preserve pad nature */
868 (void)hv_delete(hv, (char*)ptr, (U32)SSPOPINT, G_DISCARD);
872 case SAVEt_DESTRUCTOR:
876 case SAVEt_DESTRUCTOR_X:
878 (*SSPOPDXPTR)(aTHX_ ptr);
880 case SAVEt_REGCONTEXT:
883 PL_savestack_ix -= i; /* regexp must have croaked */
885 case SAVEt_STACK_POS: /* Position on Perl stack */
887 PL_stack_sp = PL_stack_base + i;
889 case SAVEt_AELEM: /* array element */
890 value = (SV*)SSPOPPTR;
893 ptr = av_fetch(av,i,1);
896 if (sv && sv != &PL_sv_undef) {
897 if (SvTIED_mg((SV*)av, PERL_MAGIC_tied))
898 (void)SvREFCNT_inc(sv);
906 case SAVEt_HELEM: /* hash element */
907 value = (SV*)SSPOPPTR;
910 ptr = hv_fetch_ent(hv, sv, 1, 0);
912 SV *oval = HeVAL((HE*)ptr);
913 if (oval && oval != &PL_sv_undef) {
914 ptr = &HeVAL((HE*)ptr);
915 if (SvTIED_mg((SV*)hv, PERL_MAGIC_tied))
916 (void)SvREFCNT_inc(*(SV**)ptr);
927 PL_op = (OP*)SSPOPPTR;
930 *(I32*)&PL_hints = (I32)SSPOPINT;
933 PL_comppad = (AV*)SSPOPPTR;
935 PL_curpad = AvARRAY(PL_comppad);
937 PL_curpad = Null(SV**);
941 PADOFFSET off = (PADOFFSET)SSPOPLONG;
944 ((SV**)ptr)[off] = (SV*)SSPOPPTR;
948 Perl_croak(aTHX_ "panic: leave_scope inconsistency");
954 Perl_cx_dump(pTHX_ PERL_CONTEXT *cx)
957 PerlIO_printf(Perl_debug_log, "CX %ld = %s\n", (long)(cx - cxstack), PL_block_type[CxTYPE(cx)]);
958 if (CxTYPE(cx) != CXt_SUBST) {
959 PerlIO_printf(Perl_debug_log, "BLK_OLDSP = %ld\n", (long)cx->blk_oldsp);
960 PerlIO_printf(Perl_debug_log, "BLK_OLDCOP = 0x%"UVxf"\n",
961 PTR2UV(cx->blk_oldcop));
962 PerlIO_printf(Perl_debug_log, "BLK_OLDMARKSP = %ld\n", (long)cx->blk_oldmarksp);
963 PerlIO_printf(Perl_debug_log, "BLK_OLDSCOPESP = %ld\n", (long)cx->blk_oldscopesp);
964 PerlIO_printf(Perl_debug_log, "BLK_OLDRETSP = %ld\n", (long)cx->blk_oldretsp);
965 PerlIO_printf(Perl_debug_log, "BLK_OLDPM = 0x%"UVxf"\n",
966 PTR2UV(cx->blk_oldpm));
967 PerlIO_printf(Perl_debug_log, "BLK_GIMME = %s\n", cx->blk_gimme ? "LIST" : "SCALAR");
969 switch (CxTYPE(cx)) {
974 PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n",
975 PTR2UV(cx->blk_sub.cv));
976 PerlIO_printf(Perl_debug_log, "BLK_SUB.GV = 0x%"UVxf"\n",
977 PTR2UV(cx->blk_sub.gv));
978 PerlIO_printf(Perl_debug_log, "BLK_SUB.DFOUTGV = 0x%"UVxf"\n",
979 PTR2UV(cx->blk_sub.dfoutgv));
980 PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
981 (int)cx->blk_sub.hasargs);
984 PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n",
985 PTR2UV(cx->blk_sub.cv));
986 PerlIO_printf(Perl_debug_log, "BLK_SUB.OLDDEPTH = %ld\n",
987 (long)cx->blk_sub.olddepth);
988 PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
989 (int)cx->blk_sub.hasargs);
990 PerlIO_printf(Perl_debug_log, "BLK_SUB.LVAL = %d\n",
991 (int)cx->blk_sub.lval);
994 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_IN_EVAL = %ld\n",
995 (long)cx->blk_eval.old_in_eval);
996 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_OP_TYPE = %s (%s)\n",
997 PL_op_name[cx->blk_eval.old_op_type],
998 PL_op_desc[cx->blk_eval.old_op_type]);
999 if (cx->blk_eval.old_namesv)
1000 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_NAME = %s\n",
1001 SvPVX(cx->blk_eval.old_namesv));
1002 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_EVAL_ROOT = 0x%"UVxf"\n",
1003 PTR2UV(cx->blk_eval.old_eval_root));
1007 PerlIO_printf(Perl_debug_log, "BLK_LOOP.LABEL = %s\n",
1008 cx->blk_loop.label);
1009 PerlIO_printf(Perl_debug_log, "BLK_LOOP.RESETSP = %ld\n",
1010 (long)cx->blk_loop.resetsp);
1011 PerlIO_printf(Perl_debug_log, "BLK_LOOP.REDO_OP = 0x%"UVxf"\n",
1012 PTR2UV(cx->blk_loop.redo_op));
1013 PerlIO_printf(Perl_debug_log, "BLK_LOOP.NEXT_OP = 0x%"UVxf"\n",
1014 PTR2UV(cx->blk_loop.next_op));
1015 PerlIO_printf(Perl_debug_log, "BLK_LOOP.LAST_OP = 0x%"UVxf"\n",
1016 PTR2UV(cx->blk_loop.last_op));
1017 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERIX = %ld\n",
1018 (long)cx->blk_loop.iterix);
1019 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERARY = 0x%"UVxf"\n",
1020 PTR2UV(cx->blk_loop.iterary));
1021 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERVAR = 0x%"UVxf"\n",
1022 PTR2UV(CxITERVAR(cx)));
1024 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERSAVE = 0x%"UVxf"\n",
1025 PTR2UV(cx->blk_loop.itersave));
1026 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERLVAL = 0x%"UVxf"\n",
1027 PTR2UV(cx->blk_loop.iterlval));
1031 PerlIO_printf(Perl_debug_log, "SB_ITERS = %ld\n",
1032 (long)cx->sb_iters);
1033 PerlIO_printf(Perl_debug_log, "SB_MAXITERS = %ld\n",
1034 (long)cx->sb_maxiters);
1035 PerlIO_printf(Perl_debug_log, "SB_RFLAGS = %ld\n",
1036 (long)cx->sb_rflags);
1037 PerlIO_printf(Perl_debug_log, "SB_ONCE = %ld\n",
1039 PerlIO_printf(Perl_debug_log, "SB_ORIG = %s\n",
1041 PerlIO_printf(Perl_debug_log, "SB_DSTR = 0x%"UVxf"\n",
1042 PTR2UV(cx->sb_dstr));
1043 PerlIO_printf(Perl_debug_log, "SB_TARG = 0x%"UVxf"\n",
1044 PTR2UV(cx->sb_targ));
1045 PerlIO_printf(Perl_debug_log, "SB_S = 0x%"UVxf"\n",
1047 PerlIO_printf(Perl_debug_log, "SB_M = 0x%"UVxf"\n",
1049 PerlIO_printf(Perl_debug_log, "SB_STREND = 0x%"UVxf"\n",
1050 PTR2UV(cx->sb_strend));
1051 PerlIO_printf(Perl_debug_log, "SB_RXRES = 0x%"UVxf"\n",
1052 PTR2UV(cx->sb_rxres));
1055 #endif /* DEBUGGING */