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;
199 mg_get(osv); /* note, can croak! */
200 if (PL_tainting && PL_tainted &&
201 (mg = mg_find(osv, PERL_MAGIC_taint))) {
202 SAVESPTR(mg->mg_obj);
205 SvFLAGS(osv) |= (SvFLAGS(osv) &
206 (SVp_NOK|SVp_POK)) >> PRIVSHIFT;
207 PL_tainted = oldtainted;
209 SvMAGIC(sv) = SvMAGIC(osv);
210 SvFLAGS(sv) |= SvMAGICAL(osv);
211 /* XXX SvMAGIC() is *shared* between osv and sv. This can
212 * lead to coredumps when both SVs are destroyed without one
213 * of their SvMAGIC() slots being NULLed. */
222 Perl_save_scalar(pTHX_ GV *gv)
224 SV **sptr = &GvSV(gv);
226 SSPUSHPTR(SvREFCNT_inc(gv));
227 SSPUSHPTR(SvREFCNT_inc(*sptr));
229 return save_scalar_at(sptr);
233 Perl_save_svref(pTHX_ SV **sptr)
237 SSPUSHPTR(SvREFCNT_inc(*sptr));
238 SSPUSHINT(SAVEt_SVREF);
239 return save_scalar_at(sptr);
242 /* Like save_sptr(), but also SvREFCNT_dec()s the new value. Can be used to
243 * restore a global SV to its prior contents, freeing new value. */
245 Perl_save_generic_svref(pTHX_ SV **sptr)
249 SSPUSHPTR(SvREFCNT_inc(*sptr));
250 SSPUSHINT(SAVEt_GENERIC_SVREF);
253 /* Like save_pptr(), but also Safefree()s the new value if it is different
254 * from the old one. Can be used to restore a global char* to its prior
255 * contents, freeing new value. */
257 Perl_save_generic_pvref(pTHX_ char **str)
262 SSPUSHINT(SAVEt_GENERIC_PVREF);
266 Perl_save_gp(pTHX_ GV *gv, I32 empty)
269 SSPUSHIV((IV)SvLEN(gv));
270 SvLEN(gv) = 0; /* forget that anything was allocated here */
271 SSPUSHIV((IV)SvCUR(gv));
272 SSPUSHPTR(SvPVX(gv));
274 SSPUSHPTR(SvREFCNT_inc(gv));
281 Newz(602, gp, 1, GP);
284 PL_sub_generation++; /* taking a method out of circulation */
285 if (GvIOp(gv) && (IoFLAGS(GvIOp(gv)) & IOf_ARGV)) {
287 IoFLAGS(gp->gp_io) |= IOf_ARGV|IOf_START;
289 GvGP(gv) = gp_ref(gp);
290 GvSV(gv) = NEWSV(72,0);
291 GvLINE(gv) = CopLINE(PL_curcop);
292 GvFILE(gv) = CopFILE(PL_curcop) ? CopFILE(PL_curcop) : "";
302 Perl_save_ary(pTHX_ GV *gv)
307 if (!AvREAL(oav) && AvREIFY(oav))
314 GvAV(gv) = Null(AV*);
317 SvMAGIC(av) = SvMAGIC(oav);
318 SvFLAGS((SV*)av) |= SvMAGICAL(oav);
329 Perl_save_hash(pTHX_ GV *gv)
335 SSPUSHPTR(ohv = GvHVn(gv));
338 GvHV(gv) = Null(HV*);
341 SvMAGIC(hv) = SvMAGIC(ohv);
342 SvFLAGS((SV*)hv) |= SvMAGICAL(ohv);
353 Perl_save_item(pTHX_ register SV *item)
355 register SV *sv = NEWSV(0,0);
359 SSPUSHPTR(item); /* remember the pointer */
360 SSPUSHPTR(sv); /* remember the value */
361 SSPUSHINT(SAVEt_ITEM);
365 Perl_save_int(pTHX_ int *intp)
370 SSPUSHINT(SAVEt_INT);
374 Perl_save_long(pTHX_ long int *longp)
379 SSPUSHINT(SAVEt_LONG);
383 Perl_save_I32(pTHX_ I32 *intp)
388 SSPUSHINT(SAVEt_I32);
392 Perl_save_I16(pTHX_ I16 *intp)
397 SSPUSHINT(SAVEt_I16);
401 Perl_save_I8(pTHX_ I8 *bytep)
410 Perl_save_iv(pTHX_ IV *ivp)
418 /* Cannot use save_sptr() to store a char* since the SV** cast will
419 * force word-alignment and we'll miss the pointer.
422 Perl_save_pptr(pTHX_ char **pptr)
427 SSPUSHINT(SAVEt_PPTR);
431 Perl_save_vptr(pTHX_ void *ptr)
434 SSPUSHPTR(*(char**)ptr);
436 SSPUSHINT(SAVEt_VPTR);
440 Perl_save_sptr(pTHX_ SV **sptr)
445 SSPUSHINT(SAVEt_SPTR);
449 Perl_save_padsv(pTHX_ PADOFFSET off)
452 SSPUSHPTR(PL_curpad[off]);
453 SSPUSHPTR(PL_curpad);
454 SSPUSHLONG((long)off);
455 SSPUSHINT(SAVEt_PADSV);
459 Perl_save_threadsv(pTHX_ PADOFFSET i)
462 SV **svp = &THREADSV(i); /* XXX Change to save by offset */
463 DEBUG_S(PerlIO_printf(Perl_debug_log, "save_threadsv %"UVuf": %p %p:%s\n",
464 (UV)i, svp, *svp, SvPEEK(*svp)));
468 Perl_croak(aTHX_ "panic: save_threadsv called in non-threaded perl");
470 #endif /* USE_THREADS */
474 Perl_save_nogv(pTHX_ GV *gv)
478 SSPUSHINT(SAVEt_NSTAB);
482 Perl_save_hptr(pTHX_ HV **hptr)
487 SSPUSHINT(SAVEt_HPTR);
491 Perl_save_aptr(pTHX_ AV **aptr)
496 SSPUSHINT(SAVEt_APTR);
500 Perl_save_freesv(pTHX_ SV *sv)
504 SSPUSHINT(SAVEt_FREESV);
508 Perl_save_mortalizesv(pTHX_ SV *sv)
512 SSPUSHINT(SAVEt_MORTALIZESV);
516 Perl_save_freeop(pTHX_ OP *o)
520 SSPUSHINT(SAVEt_FREEOP);
524 Perl_save_freepv(pTHX_ char *pv)
528 SSPUSHINT(SAVEt_FREEPV);
532 Perl_save_clearsv(pTHX_ SV **svp)
535 SSPUSHLONG((long)(svp-PL_curpad));
536 SSPUSHINT(SAVEt_CLEARSV);
540 Perl_save_delete(pTHX_ HV *hv, char *key, I32 klen)
545 SSPUSHPTR(SvREFCNT_inc(hv));
546 SSPUSHINT(SAVEt_DELETE);
550 Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg)
555 for (i = 1; i <= maxsarg; i++) {
557 sv_setsv(sv,sarg[i]);
559 SSPUSHPTR(sarg[i]); /* remember the pointer */
560 SSPUSHPTR(sv); /* remember the value */
561 SSPUSHINT(SAVEt_ITEM);
566 Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p)
571 SSPUSHINT(SAVEt_DESTRUCTOR);
575 Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p)
580 SSPUSHINT(SAVEt_DESTRUCTOR_X);
584 Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr)
587 SSPUSHPTR(SvREFCNT_inc(av));
589 SSPUSHPTR(SvREFCNT_inc(*sptr));
590 SSPUSHINT(SAVEt_AELEM);
591 save_scalar_at(sptr);
595 Perl_save_helem(pTHX_ HV *hv, SV *key, SV **sptr)
598 SSPUSHPTR(SvREFCNT_inc(hv));
599 SSPUSHPTR(SvREFCNT_inc(key));
600 SSPUSHPTR(SvREFCNT_inc(*sptr));
601 SSPUSHINT(SAVEt_HELEM);
602 save_scalar_at(sptr);
614 Perl_save_alloc(pTHX_ I32 size, I32 pad)
616 register I32 start = pad + ((char*)&PL_savestack[PL_savestack_ix]
617 - (char*)PL_savestack);
618 register I32 elems = 1 + ((size + pad - 1) / sizeof(*PL_savestack));
620 /* SSCHECK may not be good enough */
621 while (PL_savestack_ix + elems + 2 > PL_savestack_max)
624 PL_savestack_ix += elems;
626 SSPUSHINT(SAVEt_ALLOC);
631 Perl_leave_scope(pTHX_ I32 base)
643 Perl_croak(aTHX_ "panic: corrupt saved stack index");
644 while (PL_savestack_ix > base) {
646 case SAVEt_ITEM: /* normal string */
647 value = (SV*)SSPOPPTR;
649 sv_replace(sv,value);
654 case SAVEt_SV: /* scalar reference */
655 value = (SV*)SSPOPPTR;
660 case SAVEt_GENERIC_PVREF: /* generic pv */
661 str = (char*)SSPOPPTR;
663 if (*(char**)ptr != str) {
664 Safefree(*(char**)ptr);
668 case SAVEt_GENERIC_SVREF: /* generic sv */
669 value = (SV*)SSPOPPTR;
676 case SAVEt_SVREF: /* scalar reference */
677 value = (SV*)SSPOPPTR;
681 DEBUG_S(PerlIO_printf(Perl_debug_log,
682 "restore svref: %p %p:%s -> %p:%s\n",
683 ptr, sv, SvPEEK(sv), value, SvPEEK(value)));
684 if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv) &&
685 SvTYPE(sv) != SVt_PVGV)
687 (void)SvUPGRADE(value, SvTYPE(sv));
688 SvMAGIC(value) = SvMAGIC(sv);
689 SvFLAGS(value) |= SvMAGICAL(sv);
693 /* XXX This branch is pretty bogus. This code irretrievably
694 * clears(!) the magic on the SV (either to avoid further
695 * croaking that might ensue when the SvSETMAGIC() below is
696 * called, or to avoid two different SVs pointing at the same
697 * SvMAGIC()). This needs a total rethink. --GSAR */
698 else if (SvTYPE(value) >= SVt_PVMG && SvMAGIC(value) &&
699 SvTYPE(value) != SVt_PVGV)
701 SvFLAGS(value) |= (SvFLAGS(value) &
702 (SVp_NOK|SVp_POK)) >> PRIVSHIFT;
703 SvMAGICAL_off(value);
704 /* XXX this is a leak when we get here because the
705 * mg_get() in save_scalar_at() croaked */
715 case SAVEt_AV: /* array reference */
719 AV *goner = GvAV(gv);
720 SvMAGIC(av) = SvMAGIC(goner);
721 SvFLAGS((SV*)av) |= SvMAGICAL(goner);
722 SvMAGICAL_off(goner);
733 case SAVEt_HV: /* hash reference */
737 HV *goner = GvHV(gv);
738 SvMAGIC(hv) = SvMAGIC(goner);
739 SvFLAGS(hv) |= SvMAGICAL(goner);
740 SvMAGICAL_off(goner);
751 case SAVEt_INT: /* int reference */
753 *(int*)ptr = (int)SSPOPINT;
755 case SAVEt_LONG: /* long reference */
757 *(long*)ptr = (long)SSPOPLONG;
759 case SAVEt_I32: /* I32 reference */
761 *(I32*)ptr = (I32)SSPOPINT;
763 case SAVEt_I16: /* I16 reference */
765 *(I16*)ptr = (I16)SSPOPINT;
767 case SAVEt_I8: /* I8 reference */
769 *(I8*)ptr = (I8)SSPOPINT;
771 case SAVEt_IV: /* IV reference */
773 *(IV*)ptr = (IV)SSPOPIV;
775 case SAVEt_SPTR: /* SV* reference */
777 *(SV**)ptr = (SV*)SSPOPPTR;
779 case SAVEt_VPTR: /* random* reference */
780 case SAVEt_PPTR: /* char* reference */
782 *(char**)ptr = (char*)SSPOPPTR;
784 case SAVEt_HPTR: /* HV* reference */
786 *(HV**)ptr = (HV*)SSPOPPTR;
788 case SAVEt_APTR: /* AV* reference */
790 *(AV**)ptr = (AV*)SSPOPPTR;
794 (void)sv_clear((SV*)gv);
796 case SAVEt_GP: /* scalar reference */
799 if (SvPVX(gv) && SvLEN(gv) > 0) {
802 SvPVX(gv) = (char *)SSPOPPTR;
803 SvCUR(gv) = (STRLEN)SSPOPIV;
804 SvLEN(gv) = (STRLEN)SSPOPIV;
808 PL_sub_generation++; /* putting a method back into circulation */
813 SvREFCNT_dec((SV*)ptr);
815 case SAVEt_MORTALIZESV:
817 sv_2mortal((SV*)ptr);
822 PL_curpad = AvARRAY(PL_comppad);
827 Safefree((char*)ptr);
830 ptr = (void*)&PL_curpad[SSPOPLONG];
832 /* Can clear pad variable in place? */
833 if (SvREFCNT(sv) <= 1 && !SvOBJECT(sv)) {
834 if (SvTHINKFIRST(sv))
835 sv_force_normal_flags(sv, SV_IMMEDIATE_UNREF);
839 switch (SvTYPE(sv)) {
849 Perl_croak(aTHX_ "panic: leave_scope pad code");
861 else { /* Someone has a claim on this, so abandon it. */
862 U32 padflags = SvFLAGS(sv) & (SVs_PADBUSY|SVs_PADMY|SVs_PADTMP);
863 switch (SvTYPE(sv)) { /* Console ourselves with a new value */
864 case SVt_PVAV: *(SV**)ptr = (SV*)newAV(); break;
865 case SVt_PVHV: *(SV**)ptr = (SV*)newHV(); break;
866 default: *(SV**)ptr = NEWSV(0,0); break;
868 SvREFCNT_dec(sv); /* Cast current value to the winds. */
869 SvFLAGS(*(SV**)ptr) |= padflags; /* preserve pad nature */
876 (void)hv_delete(hv, (char*)ptr, (U32)SSPOPINT, G_DISCARD);
880 case SAVEt_DESTRUCTOR:
884 case SAVEt_DESTRUCTOR_X:
886 (*SSPOPDXPTR)(aTHXo_ ptr);
888 case SAVEt_REGCONTEXT:
891 PL_savestack_ix -= i; /* regexp must have croaked */
893 case SAVEt_STACK_POS: /* Position on Perl stack */
895 PL_stack_sp = PL_stack_base + i;
897 case SAVEt_AELEM: /* array element */
898 value = (SV*)SSPOPPTR;
901 ptr = av_fetch(av,i,1);
904 if (sv && sv != &PL_sv_undef) {
905 if (SvTIED_mg((SV*)av, PERL_MAGIC_tied))
906 (void)SvREFCNT_inc(sv);
914 case SAVEt_HELEM: /* hash element */
915 value = (SV*)SSPOPPTR;
918 ptr = hv_fetch_ent(hv, sv, 1, 0);
920 SV *oval = HeVAL((HE*)ptr);
921 if (oval && oval != &PL_sv_undef) {
922 ptr = &HeVAL((HE*)ptr);
923 if (SvTIED_mg((SV*)hv, PERL_MAGIC_tied))
924 (void)SvREFCNT_inc(*(SV**)ptr);
935 PL_op = (OP*)SSPOPPTR;
938 *(I32*)&PL_hints = (I32)SSPOPINT;
941 PL_comppad = (AV*)SSPOPPTR;
943 PL_curpad = AvARRAY(PL_comppad);
945 PL_curpad = Null(SV**);
949 PADOFFSET off = (PADOFFSET)SSPOPLONG;
952 ((SV**)ptr)[off] = (SV*)SSPOPPTR;
956 Perl_croak(aTHX_ "panic: leave_scope inconsistency");
962 Perl_cx_dump(pTHX_ PERL_CONTEXT *cx)
965 PerlIO_printf(Perl_debug_log, "CX %ld = %s\n", (long)(cx - cxstack), PL_block_type[CxTYPE(cx)]);
966 if (CxTYPE(cx) != CXt_SUBST) {
967 PerlIO_printf(Perl_debug_log, "BLK_OLDSP = %ld\n", (long)cx->blk_oldsp);
968 PerlIO_printf(Perl_debug_log, "BLK_OLDCOP = 0x%"UVxf"\n",
969 PTR2UV(cx->blk_oldcop));
970 PerlIO_printf(Perl_debug_log, "BLK_OLDMARKSP = %ld\n", (long)cx->blk_oldmarksp);
971 PerlIO_printf(Perl_debug_log, "BLK_OLDSCOPESP = %ld\n", (long)cx->blk_oldscopesp);
972 PerlIO_printf(Perl_debug_log, "BLK_OLDRETSP = %ld\n", (long)cx->blk_oldretsp);
973 PerlIO_printf(Perl_debug_log, "BLK_OLDPM = 0x%"UVxf"\n",
974 PTR2UV(cx->blk_oldpm));
975 PerlIO_printf(Perl_debug_log, "BLK_GIMME = %s\n", cx->blk_gimme ? "LIST" : "SCALAR");
977 switch (CxTYPE(cx)) {
982 PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n",
983 PTR2UV(cx->blk_sub.cv));
984 PerlIO_printf(Perl_debug_log, "BLK_SUB.GV = 0x%"UVxf"\n",
985 PTR2UV(cx->blk_sub.gv));
986 PerlIO_printf(Perl_debug_log, "BLK_SUB.DFOUTGV = 0x%"UVxf"\n",
987 PTR2UV(cx->blk_sub.dfoutgv));
988 PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
989 (int)cx->blk_sub.hasargs);
992 PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n",
993 PTR2UV(cx->blk_sub.cv));
994 PerlIO_printf(Perl_debug_log, "BLK_SUB.OLDDEPTH = %ld\n",
995 (long)cx->blk_sub.olddepth);
996 PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
997 (int)cx->blk_sub.hasargs);
998 PerlIO_printf(Perl_debug_log, "BLK_SUB.LVAL = %d\n",
999 (int)cx->blk_sub.lval);
1002 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_IN_EVAL = %ld\n",
1003 (long)cx->blk_eval.old_in_eval);
1004 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_OP_TYPE = %s (%s)\n",
1005 PL_op_name[cx->blk_eval.old_op_type],
1006 PL_op_desc[cx->blk_eval.old_op_type]);
1007 if (cx->blk_eval.old_namesv)
1008 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_NAME = %s\n",
1009 SvPVX(cx->blk_eval.old_namesv));
1010 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_EVAL_ROOT = 0x%"UVxf"\n",
1011 PTR2UV(cx->blk_eval.old_eval_root));
1015 PerlIO_printf(Perl_debug_log, "BLK_LOOP.LABEL = %s\n",
1016 cx->blk_loop.label);
1017 PerlIO_printf(Perl_debug_log, "BLK_LOOP.RESETSP = %ld\n",
1018 (long)cx->blk_loop.resetsp);
1019 PerlIO_printf(Perl_debug_log, "BLK_LOOP.REDO_OP = 0x%"UVxf"\n",
1020 PTR2UV(cx->blk_loop.redo_op));
1021 PerlIO_printf(Perl_debug_log, "BLK_LOOP.NEXT_OP = 0x%"UVxf"\n",
1022 PTR2UV(cx->blk_loop.next_op));
1023 PerlIO_printf(Perl_debug_log, "BLK_LOOP.LAST_OP = 0x%"UVxf"\n",
1024 PTR2UV(cx->blk_loop.last_op));
1025 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERIX = %ld\n",
1026 (long)cx->blk_loop.iterix);
1027 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERARY = 0x%"UVxf"\n",
1028 PTR2UV(cx->blk_loop.iterary));
1029 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERVAR = 0x%"UVxf"\n",
1030 PTR2UV(CxITERVAR(cx)));
1032 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERSAVE = 0x%"UVxf"\n",
1033 PTR2UV(cx->blk_loop.itersave));
1034 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERLVAL = 0x%"UVxf"\n",
1035 PTR2UV(cx->blk_loop.iterlval));
1039 PerlIO_printf(Perl_debug_log, "SB_ITERS = %ld\n",
1040 (long)cx->sb_iters);
1041 PerlIO_printf(Perl_debug_log, "SB_MAXITERS = %ld\n",
1042 (long)cx->sb_maxiters);
1043 PerlIO_printf(Perl_debug_log, "SB_RFLAGS = %ld\n",
1044 (long)cx->sb_rflags);
1045 PerlIO_printf(Perl_debug_log, "SB_ONCE = %ld\n",
1047 PerlIO_printf(Perl_debug_log, "SB_ORIG = %s\n",
1049 PerlIO_printf(Perl_debug_log, "SB_DSTR = 0x%"UVxf"\n",
1050 PTR2UV(cx->sb_dstr));
1051 PerlIO_printf(Perl_debug_log, "SB_TARG = 0x%"UVxf"\n",
1052 PTR2UV(cx->sb_targ));
1053 PerlIO_printf(Perl_debug_log, "SB_S = 0x%"UVxf"\n",
1055 PerlIO_printf(Perl_debug_log, "SB_M = 0x%"UVxf"\n",
1057 PerlIO_printf(Perl_debug_log, "SB_STREND = 0x%"UVxf"\n",
1058 PTR2UV(cx->sb_strend));
1059 PerlIO_printf(Perl_debug_log, "SB_RXRES = 0x%"UVxf"\n",
1060 PTR2UV(cx->sb_rxres));
1063 #endif /* DEBUGGING */