3 * Copyright (c) 1991-1994, 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 * Now far ahead the Road has gone,
12 * And I must follow, if I can,
13 * Pursuing it with eager feet,
14 * Until it joins some larger way
15 * Where many paths and errands meet.
16 * And whither then? I cannot say.
23 #define WORD_ALIGN sizeof(U16)
26 #define DOCATCH(o) (mustcatch ? docatch(o) : (o))
28 static OP *docatch _((OP *o));
29 static OP *doeval _((int gimme));
30 static OP *dofindlabel _((OP *op, char *label, OP **opstack));
31 static void doparseform _((SV *sv));
32 static I32 dopoptoeval _((I32 startingblock));
33 static I32 dopoptolabel _((char *label));
34 static I32 dopoptoloop _((I32 startingblock));
35 static I32 dopoptosub _((I32 startingblock));
36 static void save_lines _((AV *array, SV *sv));
37 static int sortcv _((const void *, const void *));
38 static int sortcmp _((const void *, const void *));
39 static int sortcmp_locale _((const void *, const void *));
49 cxix = dopoptosub(cxstack_ix);
53 if (cxstack[cxix].blk_gimme == G_ARRAY)
66 register PMOP *pm = (PMOP*)cLOGOP->op_other;
72 t = SvPV(tmpstr, len);
74 /* JMR: Check against the last compiled regexp */
75 if ( ! pm->op_pmregexp || ! pm->op_pmregexp->precomp
76 || strnNE(pm->op_pmregexp->precomp, t, len)
77 || pm->op_pmregexp->precomp[len]) {
78 if (pm->op_pmregexp) {
79 pregfree(pm->op_pmregexp);
80 pm->op_pmregexp = Null(REGEXP*); /* crucial if regcomp aborts */
83 pm->op_pmflags = pm->op_pmpermflags; /* reset case sensitivity */
84 pm->op_pmregexp = pregcomp(t, t + len, pm);
87 if (!pm->op_pmregexp->prelen && curpm)
89 else if (strEQ("\\s+", pm->op_pmregexp->precomp))
90 pm->op_pmflags |= PMf_WHITE;
92 if (pm->op_pmflags & PMf_KEEP) {
93 pm->op_pmflags &= ~PMf_RUNTIME; /* no point compiling again */
95 cLOGOP->op_first->op_next = op->op_next;
103 register PMOP *pm = (PMOP*) cLOGOP->op_other;
104 register CONTEXT *cx = &cxstack[cxstack_ix];
105 register SV *dstr = cx->sb_dstr;
106 register char *s = cx->sb_s;
107 register char *m = cx->sb_m;
108 char *orig = cx->sb_orig;
109 register REGEXP *rx = cx->sb_rx;
111 if (cx->sb_iters++) {
112 if (cx->sb_iters > cx->sb_maxiters)
113 DIE("Substitution loop");
115 if (!cx->sb_rxtainted)
116 cx->sb_rxtainted = SvTAINTED(TOPs);
117 sv_catsv(dstr, POPs);
119 Safefree(rx->subbase);
120 rx->subbase = cx->sb_subbase;
123 if (cx->sb_once || !pregexec(rx, s, cx->sb_strend, orig,
124 s == m, Nullsv, cx->sb_safebase))
126 SV *targ = cx->sb_targ;
127 sv_catpvn(dstr, s, cx->sb_strend - s);
129 TAINT_IF(cx->sb_rxtainted || rx->exec_tainted);
131 (void)SvOOK_off(targ);
132 Safefree(SvPVX(targ));
133 SvPVX(targ) = SvPVX(dstr);
134 SvCUR_set(targ, SvCUR(dstr));
135 SvLEN_set(targ, SvLEN(dstr));
139 (void)SvPOK_only(targ);
142 PUSHs(sv_2mortal(newSViv((I32)cx->sb_iters - 1)));
143 LEAVE_SCOPE(cx->sb_oldsave);
145 RETURNOP(pm->op_next);
148 if (rx->subbase && rx->subbase != orig) {
151 cx->sb_orig = orig = rx->subbase;
153 cx->sb_strend = s + (cx->sb_strend - m);
155 cx->sb_m = m = rx->startp[0];
156 sv_catpvn(dstr, s, m-s);
157 cx->sb_s = rx->endp[0];
158 cx->sb_subbase = rx->subbase;
159 cx->sb_rxtainted |= rx->exec_tainted;
161 rx->subbase = Nullch; /* so recursion works */
162 RETURNOP(pm->op_pmreplstart);
167 dSP; dMARK; dORIGMARK;
168 register SV *form = *++MARK;
180 bool chopspace = (strchr(chopset, ' ') != Nullch);
187 if (!SvMAGICAL(form) || !SvCOMPILED(form)) {
188 SvREADONLY_off(form);
192 SvPV_force(formtarget, len);
193 t = SvGROW(formtarget, len + SvCUR(form) + 1); /* XXX SvCUR bad */
196 /* need to jump to the next word */
197 s = f + len + WORD_ALIGN - SvCUR(form) % WORD_ALIGN;
206 case FF_LITERAL: arg = fpc[1]; name = "LITERAL"; break;
207 case FF_BLANK: arg = fpc[1]; name = "BLANK"; break;
208 case FF_SKIP: arg = fpc[1]; name = "SKIP"; break;
209 case FF_FETCH: arg = fpc[1]; name = "FETCH"; break;
210 case FF_DECIMAL: arg = fpc[1]; name = "DECIMAL"; break;
212 case FF_CHECKNL: name = "CHECKNL"; break;
213 case FF_CHECKCHOP: name = "CHECKCHOP"; break;
214 case FF_SPACE: name = "SPACE"; break;
215 case FF_HALFSPACE: name = "HALFSPACE"; break;
216 case FF_ITEM: name = "ITEM"; break;
217 case FF_CHOP: name = "CHOP"; break;
218 case FF_LINEGLOB: name = "LINEGLOB"; break;
219 case FF_NEWLINE: name = "NEWLINE"; break;
220 case FF_MORE: name = "MORE"; break;
221 case FF_LINEMARK: name = "LINEMARK"; break;
222 case FF_END: name = "END"; break;
225 PerlIO_printf(PerlIO_stderr(), "%-16s%ld\n", name, (long) arg);
227 PerlIO_printf(PerlIO_stderr(), "%-16s\n", name);
256 warn("Not enough format arguments");
261 item = s = SvPV(sv, len);
263 if (itemsize > fieldsize)
264 itemsize = fieldsize;
265 send = chophere = s + itemsize;
277 item = s = SvPV(sv, len);
279 if (itemsize <= fieldsize) {
280 send = chophere = s + itemsize;
291 itemsize = fieldsize;
292 send = chophere = s + itemsize;
293 while (s < send || (s == send && isSPACE(*s))) {
303 if (strchr(chopset, *s))
308 itemsize = chophere - item;
313 arg = fieldsize - itemsize;
322 arg = fieldsize - itemsize;
336 int ch = *t++ = *s++;
340 if ( !((*t++ = *s++) & ~31) )
350 while (*s && isSPACE(*s))
357 item = s = SvPV(sv, len);
370 SvCUR_set(formtarget, t - SvPVX(formtarget));
371 sv_catpvn(formtarget, item, itemsize);
372 SvGROW(formtarget, SvCUR(formtarget) + SvCUR(form) + 1);
373 t = SvPVX(formtarget) + SvCUR(formtarget);
378 /* If the field is marked with ^ and the value is undefined,
381 if ((arg & 512) && !SvOK(sv)) {
389 /* Formats aren't yet marked for locales, so assume "yes". */
392 sprintf(t, "%#*.*f", (int) fieldsize, (int) arg & 255, value);
394 sprintf(t, "%*.0f", (int) fieldsize, value);
401 while (t-- > linemark && *t == ' ') ;
409 if (arg) { /* repeat until fields exhausted? */
411 SvCUR_set(formtarget, t - SvPVX(formtarget));
412 lines += FmLINES(formtarget);
415 if (strnEQ(linemark, linemark - arg, arg))
416 DIE("Runaway format");
418 FmLINES(formtarget) = lines;
420 RETURNOP(cLISTOP->op_first);
431 arg = fieldsize - itemsize;
438 if (strnEQ(s," ",3)) {
439 while (s > SvPVX(formtarget) && isSPACE(s[-1]))
450 SvCUR_set(formtarget, t - SvPVX(formtarget));
451 FmLINES(formtarget) += lines;
463 if (stack_base + *markstack_ptr == sp) {
465 if (GIMME != G_ARRAY)
467 RETURNOP(op->op_next->op_next);
469 stack_sp = stack_base + *markstack_ptr + 1;
470 pp_pushmark(); /* push dst */
471 pp_pushmark(); /* push src */
472 ENTER; /* enter outer scope */
475 SAVESPTR(GvSV(defgv));
477 ENTER; /* enter inner scope */
480 src = stack_base[*markstack_ptr];
485 if (op->op_type == OP_MAPSTART)
486 pp_pushmark(); /* push top */
487 return ((LOGOP*)op->op_next)->op_other;
492 DIE("panic: mapstart"); /* uses grepstart */
498 I32 diff = (sp - stack_base) - *markstack_ptr;
506 if (diff > markstack_ptr[-1] - markstack_ptr[-2]) {
507 shift = diff - (markstack_ptr[-1] - markstack_ptr[-2]);
508 count = (sp - stack_base) - markstack_ptr[-1] + 2;
513 markstack_ptr[-1] += shift;
514 *markstack_ptr += shift;
518 dst = stack_base + (markstack_ptr[-2] += diff) - 1;
521 *dst-- = SvTEMP(TOPs) ? POPs : sv_mortalcopy(POPs);
523 LEAVE; /* exit inner scope */
526 if (markstack_ptr[-1] > *markstack_ptr) {
529 (void)POPMARK; /* pop top */
530 LEAVE; /* exit outer scope */
531 (void)POPMARK; /* pop src */
532 items = --*markstack_ptr - markstack_ptr[-1];
533 (void)POPMARK; /* pop dst */
534 SP = stack_base + POPMARK; /* pop original mark */
535 if (GIMME != G_ARRAY) {
546 ENTER; /* enter inner scope */
549 src = stack_base[markstack_ptr[-1]];
553 RETURNOP(cLOGOP->op_other);
560 dSP; dMARK; dORIGMARK;
562 SV **myorigmark = ORIGMARK;
568 OP* nextop = op->op_next;
570 if (gimme != G_ARRAY) {
575 if (op->op_flags & OPf_STACKED) {
577 if (op->op_flags & OPf_SPECIAL) {
578 OP *kid = cLISTOP->op_first->op_sibling; /* pass pushmark */
579 kid = kUNOP->op_first; /* pass rv2gv */
580 kid = kUNOP->op_first; /* pass leave */
581 sortcop = kid->op_next;
582 stash = curcop->cop_stash;
585 cv = sv_2cv(*++MARK, &stash, &gv, 0);
586 if (!(cv && CvROOT(cv))) {
588 SV *tmpstr = sv_newmortal();
589 gv_efullname3(tmpstr, gv, Nullch);
590 if (cv && CvXSUB(cv))
591 DIE("Xsub \"%s\" called in sort", SvPVX(tmpstr));
592 DIE("Undefined sort subroutine \"%s\" called",
597 DIE("Xsub called in sort");
598 DIE("Undefined subroutine in sort");
600 DIE("Not a CODE reference in sort");
602 sortcop = CvSTART(cv);
603 SAVESPTR(CvROOT(cv)->op_ppaddr);
604 CvROOT(cv)->op_ppaddr = ppaddr[OP_NULL];
607 curpad = AvARRAY((AV*)AvARRAY(CvPADLIST(cv))[1]);
612 stash = curcop->cop_stash;
616 while (MARK < SP) { /* This may or may not shift down one here. */
618 if (*up = *++MARK) { /* Weed out nulls. */
620 if (!sortcop && !SvPOK(*up))
621 (void)sv_2pv(*up, &na);
625 max = --up - myorigmark;
631 bool oldmustcatch = mustcatch;
639 AvREAL_off(sortstack);
640 av_extend(sortstack, 32);
643 SWITCHSTACK(curstack, sortstack);
644 if (sortstash != stash) {
645 firstgv = gv_fetchpv("a", TRUE, SVt_PV);
646 secondgv = gv_fetchpv("b", TRUE, SVt_PV);
650 SAVESPTR(GvSV(firstgv));
651 SAVESPTR(GvSV(secondgv));
652 PUSHBLOCK(cx, CXt_NULL, stack_base);
653 sortcxix = cxstack_ix;
655 qsort((char*)(myorigmark+1), max, sizeof(SV*), sortcv);
658 SWITCHSTACK(sortstack, oldstack);
659 mustcatch = oldmustcatch;
665 MEXTEND(SP, 20); /* Can't afford stack realloc on signal. */
666 qsort((char*)(ORIGMARK+1), max, sizeof(SV*),
667 (op->op_private & OPpLOCALE) ? sortcmp_locale : sortcmp);
670 stack_sp = ORIGMARK + max;
678 if (GIMME == G_ARRAY)
679 return cCONDOP->op_true;
680 return SvTRUEx(PAD_SV(op->op_targ)) ? cCONDOP->op_false : cCONDOP->op_true;
687 if (GIMME == G_ARRAY) {
688 RETURNOP(((CONDOP*)cUNOP->op_first)->op_false);
692 SV *targ = PAD_SV(op->op_targ);
694 if ((op->op_private & OPpFLIP_LINENUM)
695 ? last_in_gv && SvIV(sv) == IoLINES(GvIOp(last_in_gv))
697 sv_setiv(PAD_SV(cUNOP->op_first->op_targ), 1);
698 if (op->op_flags & OPf_SPECIAL) {
705 RETURNOP(((CONDOP*)cUNOP->op_first)->op_false);
718 if (GIMME == G_ARRAY) {
724 if (SvNIOKp(left) || !SvPOKp(left) ||
725 (looks_like_number(left) && *SvPVX(left) != '0') )
730 EXTEND_MORTAL(max - i + 1);
731 EXTEND(SP, max - i + 1);
734 sv = sv_2mortal(newSViv(i++));
739 SV *final = sv_mortalcopy(right);
741 char *tmps = SvPV(final, len);
743 sv = sv_mortalcopy(left);
744 while (!SvNIOKp(sv) && SvCUR(sv) <= len &&
745 strNE(SvPVX(sv),tmps) ) {
747 sv = sv_2mortal(newSVsv(sv));
750 if (strEQ(SvPVX(sv),tmps))
756 SV *targ = PAD_SV(cUNOP->op_first->op_targ);
758 if ((op->op_private & OPpFLIP_LINENUM)
759 ? last_in_gv && SvIV(sv) == IoLINES(GvIOp(last_in_gv))
761 sv_setiv(PAD_SV(((UNOP*)cUNOP->op_first)->op_first->op_targ), 0);
762 sv_catpv(targ, "E0");
777 register CONTEXT *cx;
779 for (i = cxstack_ix; i >= 0; i--) {
781 switch (cx->cx_type) {
784 warn("Exiting substitution via %s", op_name[op->op_type]);
788 warn("Exiting subroutine via %s", op_name[op->op_type]);
792 warn("Exiting eval via %s", op_name[op->op_type]);
796 warn("Exiting pseudo-block via %s", op_name[op->op_type]);
799 if (!cx->blk_loop.label ||
800 strNE(label, cx->blk_loop.label) ) {
801 DEBUG_l(deb("(Skipping label #%d %s)\n",
802 i, cx->blk_loop.label));
805 DEBUG_l( deb("(Found label #%d %s)\n", i, label));
817 cxix = dopoptosub(cxstack_ix);
821 if (cxstack[cxix].blk_gimme == G_ARRAY)
828 dopoptosub(startingblock)
832 register CONTEXT *cx;
833 for (i = startingblock; i >= 0; i--) {
835 switch (cx->cx_type) {
840 DEBUG_l( deb("(Found sub #%d)\n", i));
848 dopoptoeval(startingblock)
852 register CONTEXT *cx;
853 for (i = startingblock; i >= 0; i--) {
855 switch (cx->cx_type) {
859 DEBUG_l( deb("(Found eval #%d)\n", i));
867 dopoptoloop(startingblock)
871 register CONTEXT *cx;
872 for (i = startingblock; i >= 0; i--) {
874 switch (cx->cx_type) {
877 warn("Exiting substitution via %s", op_name[op->op_type]);
881 warn("Exiting subroutine via %s", op_name[op->op_type]);
885 warn("Exiting eval via %s", op_name[op->op_type]);
889 warn("Exiting pseudo-block via %s", op_name[op->op_type]);
892 DEBUG_l( deb("(Found loop #%d)\n", i));
903 register CONTEXT *cx;
907 while (cxstack_ix > cxix) {
908 cx = &cxstack[cxstack_ix--];
909 DEBUG_l(PerlIO_printf(Perl_debug_log, "Unwinding block %ld, type %s\n", (long) cxstack_ix+1,
910 block_type[cx->cx_type]));
911 /* Note: we don't need to restore the base context info till the end. */
912 switch (cx->cx_type) {
935 register CONTEXT *cx;
941 STRLEN klen = strlen(message);
943 svp = hv_fetch(GvHV(errgv), message, klen, TRUE);
946 static char prefix[] = "\t(in cleanup) ";
947 sv_upgrade(*svp, SVt_IV);
948 (void)SvIOK_only(*svp);
949 SvGROW(GvSV(errgv), SvCUR(GvSV(errgv))+sizeof(prefix)+klen);
950 sv_catpvn(GvSV(errgv), prefix, sizeof(prefix)-1);
951 sv_catpvn(GvSV(errgv), message, klen);
957 sv_setpv(GvSV(errgv), message);
959 cxix = dopoptoeval(cxstack_ix);
963 if (cxix < cxstack_ix)
967 if (cx->cx_type != CXt_EVAL) {
968 PerlIO_printf(PerlIO_stderr(), "panic: die %s", message);
973 if (gimme == G_SCALAR)
974 *++newsp = &sv_undef;
979 if (optype == OP_REQUIRE)
980 DIE("%s", SvPVx(GvSV(errgv), na));
984 PerlIO_printf(PerlIO_stderr(), "%s",message);
985 PerlIO_flush(PerlIO_stderr());
994 if (SvTRUE(left) != SvTRUE(right))
1006 RETURNOP(cLOGOP->op_other);
1015 RETURNOP(cLOGOP->op_other);
1022 SV** mark = (stack_base + *markstack_ptr + 1);
1024 while (mark < sp) { /* emulate old interface */
1029 return pp_entersub();
1036 register I32 cxix = dopoptosub(cxstack_ix);
1037 register CONTEXT *cx;
1047 if (GIMME != G_ARRAY)
1051 if (DBsub && cxix >= 0 &&
1052 cxstack[cxix].blk_sub.cv == GvCV(DBsub))
1056 cxix = dopoptosub(cxix - 1);
1058 cx = &cxstack[cxix];
1059 if (cxstack[cxix].cx_type == CXt_SUB) {
1060 dbcxix = dopoptosub(cxix - 1);
1061 /* We expect that cxstack[dbcxix] is CXt_SUB, anyway, the
1062 field below is defined for any cx. */
1063 if (DBsub && dbcxix >= 0 && cxstack[dbcxix].blk_sub.cv == GvCV(DBsub))
1064 cx = &cxstack[dbcxix];
1067 if (GIMME != G_ARRAY) {
1070 sv_setpv(TARG, HvNAME(cx->blk_oldcop->cop_stash));
1075 PUSHs(sv_2mortal(newSVpv(HvNAME(cx->blk_oldcop->cop_stash), 0)));
1076 PUSHs(sv_2mortal(newSVpv(SvPVX(GvSV(cx->blk_oldcop->cop_filegv)), 0)));
1077 PUSHs(sv_2mortal(newSViv((I32)cx->blk_oldcop->cop_line)));
1080 if (cx->cx_type == CXt_SUB) { /* So is cxstack[dbcxix]. */
1082 gv_efullname3(sv, CvGV(cxstack[cxix].blk_sub.cv), Nullch);
1083 PUSHs(sv_2mortal(sv));
1084 PUSHs(sv_2mortal(newSViv((I32)cx->blk_sub.hasargs)));
1087 PUSHs(sv_2mortal(newSVpv("(eval)",0)));
1088 PUSHs(sv_2mortal(newSViv(0)));
1090 PUSHs(sv_2mortal(newSViv((I32)cx->blk_gimme)));
1091 if (cx->cx_type == CXt_EVAL) {
1092 if (cx->blk_eval.old_op_type == OP_ENTEREVAL) {
1093 PUSHs(cx->blk_eval.cur_text);
1096 else if (cx->blk_eval.old_name) { /* Try blocks have old_name == 0. */
1097 /* Require, put the name. */
1098 PUSHs(sv_2mortal(newSVpv(cx->blk_eval.old_name, 0)));
1102 else if (cx->cx_type == CXt_SUB &&
1103 cx->blk_sub.hasargs &&
1104 curcop->cop_stash == debstash)
1106 AV *ary = cx->blk_sub.argarray;
1107 int off = AvARRAY(ary) - AvALLOC(ary);
1111 dbargs = GvAV(gv_AVadd(tmpgv = gv_fetchpv("DB::args", TRUE,
1114 AvREAL_off(dbargs); /* XXX Should be REIFY */
1117 if (AvMAX(dbargs) < AvFILL(ary) + off)
1118 av_extend(dbargs, AvFILL(ary) + off);
1119 Copy(AvALLOC(ary), AvARRAY(dbargs), AvFILL(ary) + 1 + off, SV*);
1120 AvFILL(dbargs) = AvFILL(ary) + off;
1130 SV **str1 = (SV **) a;
1131 SV **str2 = (SV **) b;
1132 I32 oldsaveix = savestack_ix;
1133 I32 oldscopeix = scopestack_ix;
1135 GvSV(firstgv) = *str1;
1136 GvSV(secondgv) = *str2;
1137 stack_sp = stack_base;
1140 if (stack_sp != stack_base + 1)
1141 croak("Sort subroutine didn't return single value");
1142 if (!SvNIOKp(*stack_sp))
1143 croak("Sort subroutine didn't return a numeric value");
1144 result = SvIV(*stack_sp);
1145 while (scopestack_ix > oldscopeix) {
1148 leave_scope(oldsaveix);
1157 return sv_cmp(*(SV **)a, *(SV **)b);
1161 sortcmp_locale(a, b)
1165 return sv_cmp_locale(*(SV **)a, *(SV **)b);
1177 sv_reset(tmps, curcop->cop_stash);
1190 TAINT_NOT; /* Each statement is presumed innocent */
1191 stack_sp = stack_base + cxstack[cxstack_ix].blk_oldsp;
1194 if (op->op_private || SvIV(DBsingle) || SvIV(DBsignal) || SvIV(DBtrace))
1198 register CONTEXT *cx;
1199 I32 gimme = G_ARRAY;
1206 DIE("No DB::DB routine defined");
1208 if (CvDEPTH(cv) >= 1 && !(debug & (1<<30))) /* don't do recursive DB::DB call */
1220 push_return(op->op_next);
1221 PUSHBLOCK(cx, CXt_SUB, sp);
1224 (void)SvREFCNT_inc(cv);
1226 curpad = AvARRAY((AV*)*av_fetch(CvPADLIST(cv),1,FALSE));
1227 RETURNOP(CvSTART(cv));
1241 register CONTEXT *cx;
1249 svp = &curpad[op->op_targ]; /* "my" variable */
1251 svp = &GvSV((GV*)POPs); /* symbol table variable */
1257 PUSHBLOCK(cx, CXt_LOOP, SP);
1258 PUSHLOOP(cx, svp, MARK);
1259 if (op->op_flags & OPf_STACKED)
1260 cx->blk_loop.iterary = (AV*)SvREFCNT_inc(POPs);
1262 cx->blk_loop.iterary = curstack;
1263 AvFILL(curstack) = sp - stack_base;
1264 cx->blk_loop.iterix = MARK - stack_base;
1273 register CONTEXT *cx;
1280 PUSHBLOCK(cx, CXt_LOOP, SP);
1281 PUSHLOOP(cx, 0, SP);
1289 register CONTEXT *cx;
1290 struct block_loop cxloop;
1298 POPLOOP1(cx); /* Delay POPLOOP2 until stack values are safe */
1300 if (gimme == G_SCALAR) {
1301 if (op->op_private & OPpLEAVE_VOID)
1305 *++newsp = sv_mortalcopy(*SP);
1307 *++newsp = &sv_undef;
1312 *++newsp = sv_mortalcopy(*++mark);
1317 POPLOOP2(); /* Stack values are safe: release loop vars ... */
1318 curpm = newpm; /* ... and pop $1 et al */
1330 register CONTEXT *cx;
1331 struct block_sub cxsub;
1332 bool popsub2 = FALSE;
1338 if (curstack == sortstack) {
1339 if (cxstack_ix == sortcxix || dopoptosub(cxstack_ix) < sortcxix) {
1340 if (cxstack_ix > sortcxix)
1342 AvARRAY(curstack)[1] = *SP;
1343 stack_sp = stack_base + 1;
1348 cxix = dopoptosub(cxstack_ix);
1350 DIE("Can't return outside a subroutine");
1351 if (cxix < cxstack_ix)
1355 switch (cx->cx_type) {
1357 POPSUB1(cx); /* Delay POPSUB2 until stack values are safe */
1362 if (optype == OP_REQUIRE &&
1363 (MARK == SP || (gimme == G_SCALAR && !SvTRUE(*SP))) )
1365 char *name = cx->blk_eval.old_name;
1366 (void)hv_delete(GvHVn(incgv), name, strlen(name), G_DISCARD);
1367 DIE("%s did not return a true value", name);
1371 DIE("panic: return");
1375 if (gimme == G_SCALAR) {
1377 *++newsp = (popsub2 && SvTEMP(*SP))
1378 ? *SP : sv_mortalcopy(*SP);
1380 *++newsp = &sv_undef;
1383 while (++MARK <= SP)
1384 *++newsp = (popsub2 && SvTEMP(*MARK))
1385 ? *MARK : sv_mortalcopy(*MARK);
1389 /* Stack values are safe: */
1391 POPSUB2(); /* release CV and @_ ... */
1393 curpm = newpm; /* ... and pop $1 et al */
1396 return pop_return();
1403 register CONTEXT *cx;
1404 struct block_loop cxloop;
1405 struct block_sub cxsub;
1412 SV **mark = stack_base + cxstack[cxstack_ix].blk_oldsp;
1414 if (op->op_flags & OPf_SPECIAL) {
1415 cxix = dopoptoloop(cxstack_ix);
1417 DIE("Can't \"last\" outside a block");
1420 cxix = dopoptolabel(cPVOP->op_pv);
1422 DIE("Label not found for \"last %s\"", cPVOP->op_pv);
1424 if (cxix < cxstack_ix)
1428 switch (cx->cx_type) {
1430 POPLOOP1(cx); /* Delay POPLOOP2 until stack values are safe */
1432 nextop = cxloop.last_op->op_next;
1435 POPSUB1(cx); /* Delay POPSUB2 until stack values are safe */
1437 nextop = pop_return();
1441 nextop = pop_return();
1448 if (gimme == G_SCALAR) {
1450 *++newsp = ((pop2 == CXt_SUB) && SvTEMP(*SP))
1451 ? *SP : sv_mortalcopy(*SP);
1453 *++newsp = &sv_undef;
1456 while (++MARK <= SP)
1457 *++newsp = ((pop2 == CXt_SUB) && SvTEMP(*MARK))
1458 ? *MARK : sv_mortalcopy(*MARK);
1463 /* Stack values are safe: */
1466 POPLOOP2(); /* release loop vars ... */
1470 POPSUB2(); /* release CV and @_ ... */
1473 curpm = newpm; /* ... and pop $1 et al */
1482 register CONTEXT *cx;
1485 if (op->op_flags & OPf_SPECIAL) {
1486 cxix = dopoptoloop(cxstack_ix);
1488 DIE("Can't \"next\" outside a block");
1491 cxix = dopoptolabel(cPVOP->op_pv);
1493 DIE("Label not found for \"next %s\"", cPVOP->op_pv);
1495 if (cxix < cxstack_ix)
1499 oldsave = scopestack[scopestack_ix - 1];
1500 LEAVE_SCOPE(oldsave);
1501 return cx->blk_loop.next_op;
1507 register CONTEXT *cx;
1510 if (op->op_flags & OPf_SPECIAL) {
1511 cxix = dopoptoloop(cxstack_ix);
1513 DIE("Can't \"redo\" outside a block");
1516 cxix = dopoptolabel(cPVOP->op_pv);
1518 DIE("Label not found for \"redo %s\"", cPVOP->op_pv);
1520 if (cxix < cxstack_ix)
1524 oldsave = scopestack[scopestack_ix - 1];
1525 LEAVE_SCOPE(oldsave);
1526 return cx->blk_loop.redo_op;
1529 static OP* lastgotoprobe;
1532 dofindlabel(op,label,opstack)
1540 if (op->op_type == OP_LEAVE ||
1541 op->op_type == OP_SCOPE ||
1542 op->op_type == OP_LEAVELOOP ||
1543 op->op_type == OP_LEAVETRY)
1544 *ops++ = cUNOP->op_first;
1546 if (op->op_flags & OPf_KIDS) {
1547 /* First try all the kids at this level, since that's likeliest. */
1548 for (kid = cUNOP->op_first; kid; kid = kid->op_sibling) {
1549 if ((kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) &&
1550 kCOP->cop_label && strEQ(kCOP->cop_label, label))
1553 for (kid = cUNOP->op_first; kid; kid = kid->op_sibling) {
1554 if (kid == lastgotoprobe)
1556 if (kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) {
1557 if (ops > opstack &&
1558 (ops[-1]->op_type == OP_NEXTSTATE ||
1559 ops[-1]->op_type == OP_DBSTATE))
1564 if (op = dofindlabel(kid,label,ops))
1574 return pp_goto(ARGS);
1583 register CONTEXT *cx;
1586 int do_dump = (op->op_type == OP_DUMP);
1589 if (op->op_flags & OPf_STACKED) {
1592 /* This egregious kludge implements goto &subroutine */
1593 if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVCV) {
1595 register CONTEXT *cx;
1596 CV* cv = (CV*)SvRV(sv);
1601 if (!CvROOT(cv) && !CvXSUB(cv)) {
1603 SV *tmpstr = sv_newmortal();
1604 gv_efullname3(tmpstr, CvGV(cv), Nullch);
1605 DIE("Goto undefined subroutine &%s",SvPVX(tmpstr));
1607 DIE("Goto undefined subroutine");
1610 /* First do some returnish stuff. */
1611 cxix = dopoptosub(cxstack_ix);
1613 DIE("Can't goto subroutine outside a subroutine");
1614 if (cxix < cxstack_ix)
1618 if (cx->blk_sub.hasargs) { /* put @_ back onto stack */
1619 AV* av = cx->blk_sub.argarray;
1621 items = AvFILL(av) + 1;
1623 EXTEND(stack_sp, items); /* @_ could have been extended. */
1624 Copy(AvARRAY(av), stack_sp, items, SV*);
1626 SvREFCNT_dec(GvAV(defgv));
1627 GvAV(defgv) = cx->blk_sub.savearray;
1631 if (!(CvDEPTH(cx->blk_sub.cv) = cx->blk_sub.olddepth))
1632 SvREFCNT_dec(cx->blk_sub.cv);
1633 oldsave = scopestack[scopestack_ix - 1];
1634 LEAVE_SCOPE(oldsave);
1636 /* Now do some callish stuff. */
1639 if (CvOLDSTYLE(cv)) {
1640 I32 (*fp3)_((int,int,int));
1645 fp3 = (I32(*)_((int,int,int)))CvXSUB(cv);
1646 items = (*fp3)(CvXSUBANY(cv).any_i32,
1647 mark - stack_base + 1,
1649 sp = stack_base + items;
1652 stack_sp--; /* There is no cv arg. */
1653 (void)(*CvXSUB(cv))(cv);
1656 return pop_return();
1659 AV* padlist = CvPADLIST(cv);
1660 SV** svp = AvARRAY(padlist);
1661 cx->blk_sub.cv = cv;
1662 cx->blk_sub.olddepth = CvDEPTH(cv);
1664 if (CvDEPTH(cv) < 2)
1665 (void)SvREFCNT_inc(cv);
1666 else { /* save temporaries on recursion? */
1667 if (CvDEPTH(cv) == 100 && dowarn)
1668 sub_crush_depth(cv);
1669 if (CvDEPTH(cv) > AvFILL(padlist)) {
1670 AV *newpad = newAV();
1671 SV **oldpad = AvARRAY(svp[CvDEPTH(cv)-1]);
1672 I32 ix = AvFILL((AV*)svp[1]);
1673 svp = AvARRAY(svp[0]);
1674 for ( ;ix > 0; ix--) {
1675 if (svp[ix] != &sv_undef) {
1676 char *name = SvPVX(svp[ix]);
1677 if ((SvFLAGS(svp[ix]) & SVf_FAKE)
1680 /* outer lexical or anon code */
1681 av_store(newpad, ix,
1682 SvREFCNT_inc(oldpad[ix]) );
1684 else { /* our own lexical */
1686 av_store(newpad, ix, sv = (SV*)newAV());
1687 else if (*name == '%')
1688 av_store(newpad, ix, sv = (SV*)newHV());
1690 av_store(newpad, ix, sv = NEWSV(0,0));
1695 av_store(newpad, ix, sv = NEWSV(0,0));
1699 if (cx->blk_sub.hasargs) {
1702 av_store(newpad, 0, (SV*)av);
1703 AvFLAGS(av) = AVf_REIFY;
1705 av_store(padlist, CvDEPTH(cv), (SV*)newpad);
1706 AvFILL(padlist) = CvDEPTH(cv);
1707 svp = AvARRAY(padlist);
1711 curpad = AvARRAY((AV*)svp[CvDEPTH(cv)]);
1712 if (cx->blk_sub.hasargs) {
1713 AV* av = (AV*)curpad[0];
1716 cx->blk_sub.savearray = GvAV(defgv);
1717 cx->blk_sub.argarray = av;
1718 GvAV(defgv) = (AV*)SvREFCNT_inc(av);
1721 if (items >= AvMAX(av) + 1) {
1723 if (AvARRAY(av) != ary) {
1724 AvMAX(av) += AvARRAY(av) - AvALLOC(av);
1725 SvPVX(av) = (char*)ary;
1727 if (items >= AvMAX(av) + 1) {
1728 AvMAX(av) = items - 1;
1729 Renew(ary,items+1,SV*);
1731 SvPVX(av) = (char*)ary;
1734 Copy(mark,AvARRAY(av),items,SV*);
1735 AvFILL(av) = items - 1;
1743 if (perldb && curstash != debstash) {
1745 * We do not care about using sv to call CV;
1746 * it's for informational purposes only.
1748 SV *sv = GvSV(DBsub);
1750 gv_efullname3(sv, CvGV(cv), Nullch);
1752 RETURNOP(CvSTART(cv));
1756 label = SvPV(sv,na);
1758 else if (op->op_flags & OPf_SPECIAL) {
1760 DIE("goto must have label");
1763 label = cPVOP->op_pv;
1765 if (label && *label) {
1772 for (ix = cxstack_ix; ix >= 0; ix--) {
1774 switch (cx->cx_type) {
1776 gotoprobe = CvROOT(cx->blk_sub.cv);
1779 gotoprobe = eval_root; /* XXX not good for nested eval */
1782 gotoprobe = cx->blk_oldcop->op_sibling;
1788 gotoprobe = cx->blk_oldcop->op_sibling;
1790 gotoprobe = main_root;
1793 DIE("Can't \"goto\" outside a block");
1799 gotoprobe = main_root;
1802 retop = dofindlabel(gotoprobe, label, enterops);
1805 lastgotoprobe = gotoprobe;
1808 DIE("Can't find label %s", label);
1810 /* pop unwanted frames */
1812 if (ix < cxstack_ix) {
1819 oldsave = scopestack[scopestack_ix];
1820 LEAVE_SCOPE(oldsave);
1823 /* push wanted frames */
1825 if (*enterops && enterops[1]) {
1827 for (ix = 1; enterops[ix]; ix++) {
1837 if (!retop) retop = main_start;
1844 restartop = 0; /* hmm, must be GNU unexec().. */
1848 if (curstack == signalstack) {
1850 Siglongjmp(top_env, 3);
1866 if (anum == 1 && VMSISH_EXIT)
1879 double value = SvNVx(GvSV(cCOP->cop_gv));
1880 register I32 match = I_32(value);
1883 if (((double)match) > value)
1884 --match; /* was fractional--truncate other way */
1886 match -= cCOP->uop.scop.scop_offset;
1889 else if (match > cCOP->uop.scop.scop_max)
1890 match = cCOP->uop.scop.scop_max;
1891 op = cCOP->uop.scop.scop_next[match];
1901 op = op->op_next; /* can't assume anything */
1903 match = *(SvPVx(GvSV(cCOP->cop_gv), na)) & 255;
1904 match -= cCOP->uop.scop.scop_offset;
1907 else if (match > cCOP->uop.scop.scop_max)
1908 match = cCOP->uop.scop.scop_max;
1909 op = cCOP->uop.scop.scop_next[match];
1918 save_lines(array, sv)
1922 register char *s = SvPVX(sv);
1923 register char *send = SvPVX(sv) + SvCUR(sv);
1925 register I32 line = 1;
1927 while (s && s < send) {
1928 SV *tmpstr = NEWSV(85,0);
1930 sv_upgrade(tmpstr, SVt_PVMG);
1931 t = strchr(s, '\n');
1937 sv_setpvn(tmpstr, s, t - s);
1938 av_store(array, line++, tmpstr);
1948 int oldrunlevel = runlevel;
1953 Copy(top_env, oldtop, 1, Sigjmp_buf);
1955 assert(mustcatch == TRUE);
1958 switch ((ret = Sigsetjmp(top_env,1))) {
1959 default: /* topmost level handles it */
1960 Copy(oldtop, top_env, 1, Sigjmp_buf);
1961 runlevel = oldrunlevel;
1964 Siglongjmp(top_env, ret);
1968 PerlIO_printf(PerlIO_stderr(), "panic: restartop\n");
1979 Copy(oldtop, top_env, 1, Sigjmp_buf);
1980 runlevel = oldrunlevel;
2000 /* set up a scratch pad */
2005 SAVESPTR(comppad_name);
2006 SAVEI32(comppad_name_fill);
2007 SAVEI32(min_intro_pending);
2008 SAVEI32(max_intro_pending);
2012 compcv = (CV*)NEWSV(1104,0);
2013 sv_upgrade((SV *)compcv, SVt_PVCV);
2014 CvUNIQUE_on(compcv);
2017 comppad_name = newAV();
2018 comppad_name_fill = 0;
2019 min_intro_pending = 0;
2020 av_push(comppad, Nullsv);
2021 curpad = AvARRAY(comppad);
2024 comppadlist = newAV();
2025 AvREAL_off(comppadlist);
2026 av_store(comppadlist, 0, (SV*)comppad_name);
2027 av_store(comppadlist, 1, (SV*)comppad);
2028 CvPADLIST(compcv) = comppadlist;
2030 if (saveop->op_type != OP_REQUIRE)
2031 CvOUTSIDE(compcv) = (CV*)SvREFCNT_inc(caller);
2035 /* make sure we compile in the right package */
2037 newstash = curcop->cop_stash;
2038 if (curstash != newstash) {
2040 curstash = newstash;
2044 SAVEFREESV(beginav);
2046 /* try to compile it */
2050 curcop = &compiling;
2051 curcop->cop_arybase = 0;
2053 rs = newSVpv("\n", 1);
2054 if (saveop->op_flags & OPf_SPECIAL)
2057 sv_setpv(GvSV(errgv),"");
2058 if (yyparse() || error_count || !eval_root) {
2069 SP = stack_base + POPMARK; /* pop original mark */
2075 if (optype == OP_REQUIRE)
2076 DIE("%s", SvPVx(GvSV(errgv), na));
2078 rs = SvREFCNT_inc(nrs);
2082 rs = SvREFCNT_inc(nrs);
2083 compiling.cop_line = 0;
2084 SAVEFREEOP(eval_root);
2085 if (gimme & G_ARRAY)
2090 DEBUG_x(dump_eval());
2092 /* Register with debugger: */
2093 if (perldb && saveop->op_type == OP_REQUIRE) {
2094 CV *cv = perl_get_cv("DB::postponed", FALSE);
2098 XPUSHs((SV*)compiling.cop_filegv);
2100 perl_call_sv((SV*)cv, G_DISCARD);
2104 /* compiled okay, so do it */
2106 CvDEPTH(compcv) = 1;
2108 SP = stack_base + POPMARK; /* pop original mark */
2109 RETURNOP(eval_start);
2115 register CONTEXT *cx;
2120 I32 gimme = G_SCALAR;
2121 PerlIO *tryrsfp = 0;
2124 if (SvNIOKp(sv) && !SvPOKp(sv)) {
2125 SET_NUMERIC_STANDARD();
2126 if (atof(patchlevel) + 0.00000999 < SvNV(sv))
2127 DIE("Perl %s required--this is only version %s, stopped",
2128 SvPV(sv,na),patchlevel);
2131 name = SvPV(sv, na);
2133 DIE("Null filename used");
2134 TAINT_PROPER("require");
2135 if (op->op_type == OP_REQUIRE &&
2136 (svp = hv_fetch(GvHVn(incgv), name, SvCUR(sv), 0)) &&
2140 /* prepare to compile file */
2142 tmpname = savepv(name);
2143 if (*tmpname == '/' ||
2145 (tmpname[1] == '/' ||
2146 (tmpname[1] == '.' && tmpname[2] == '/')))
2148 || (tmpname[0] && tmpname[1] == ':')
2151 || (strchr(tmpname,':') || ((*tmpname == '[' || *tmpname == '<') &&
2152 (isALNUM(tmpname[1]) || strchr("$-_]>",tmpname[1]))))
2156 tryrsfp = PerlIO_open(tmpname,"r");
2159 AV *ar = GvAVn(incgv);
2162 char unixified[256];
2163 if (tounixspec_ts(tmpname,unixified) != NULL)
2164 for (i = 0; i <= AvFILL(ar); i++) {
2165 if (tounixpath_ts(SvPVx(*av_fetch(ar, i, TRUE), na),buf) == NULL)
2167 strcat(buf,unixified);
2169 for (i = 0; i <= AvFILL(ar); i++) {
2170 (void)sprintf(buf, "%s/%s",
2171 SvPVx(*av_fetch(ar, i, TRUE), na), name);
2173 tryrsfp = PerlIO_open(buf, "r");
2177 if (*s == '.' && s[1] == '/')
2180 tmpname = savepv(s);
2185 SAVESPTR(compiling.cop_filegv);
2186 compiling.cop_filegv = gv_fetchfile(tmpname);
2190 if (op->op_type == OP_REQUIRE) {
2191 sprintf(tokenbuf,"Can't locate %s in @INC", name);
2192 if (instr(tokenbuf,".h "))
2193 strcat(tokenbuf," (change .h to .ph maybe?)");
2194 if (instr(tokenbuf,".ph "))
2195 strcat(tokenbuf," (did you run h2ph?)");
2202 /* Assume success here to prevent recursive requirement. */
2203 (void)hv_store(GvHVn(incgv), name, strlen(name),
2204 newSVsv(GvSV(compiling.cop_filegv)), 0 );
2208 lex_start(sv_2mortal(newSVpv("",0)));
2210 save_aptr(&rsfp_filters);
2211 rsfp_filters = NULL;
2215 name = savepv(name);
2220 /* switch to eval mode */
2222 push_return(op->op_next);
2223 PUSHBLOCK(cx, CXt_EVAL, SP);
2224 PUSHEVAL(cx, name, compiling.cop_filegv);
2226 compiling.cop_line = 0;
2229 return DOCATCH(doeval(G_SCALAR));
2234 return pp_require(ARGS);
2240 register CONTEXT *cx;
2242 I32 gimme = GIMME, was = sub_generation;
2243 char tmpbuf[32], *safestr;
2247 if (!SvPV(sv,len) || !len)
2249 TAINT_PROPER("eval");
2255 /* switch to eval mode */
2257 SAVESPTR(compiling.cop_filegv);
2258 sprintf(tmpbuf, "_<(eval %lu)", (unsigned long)++evalseq);
2259 compiling.cop_filegv = gv_fetchfile(tmpbuf+2);
2260 compiling.cop_line = 1;
2261 /* XXX For C<eval "...">s within BEGIN {} blocks, this ends up
2262 deleting the eval's FILEGV from the stash before gv_check() runs
2263 (i.e. before run-time proper). To work around the coredump that
2264 ensues, we always turn GvMULTI_on for any globals that were
2265 introduced within evals. See force_ident(). GSAR 96-10-12 */
2266 safestr = savepv(tmpbuf);
2267 SAVEDELETE(defstash, safestr, strlen(safestr));
2269 hints = op->op_targ;
2271 push_return(op->op_next);
2272 PUSHBLOCK(cx, CXt_EVAL, SP);
2273 PUSHEVAL(cx, 0, compiling.cop_filegv);
2275 /* prepare to compile string */
2277 if (perldb && curstash != debstash)
2278 save_lines(GvAV(compiling.cop_filegv), linestr);
2280 ret = doeval(gimme);
2281 if (perldb && was != sub_generation) { /* Some subs defined here. */
2282 strcpy(safestr, "_<(eval )"); /* Anything fake and short. */
2284 return DOCATCH(ret);
2294 register CONTEXT *cx;
2296 U8 save_flags = op -> op_flags;
2301 retop = pop_return();
2303 if (gimme == G_SCALAR) {
2304 if (op->op_private & OPpLEAVE_VOID)
2309 if (SvFLAGS(TOPs) & SVs_TEMP)
2312 *MARK = sv_mortalcopy(TOPs);
2322 for (mark = newsp + 1; mark <= SP; mark++)
2323 if (!(SvFLAGS(*mark) & SVs_TEMP))
2324 *mark = sv_mortalcopy(*mark);
2325 /* in case LEAVE wipes old return values */
2327 curpm = newpm; /* Don't pop $1 et al till now */
2330 assert(CvDEPTH(compcv) == 1);
2332 CvDEPTH(compcv) = 0;
2334 if (optype == OP_REQUIRE &&
2335 !(gimme == G_SCALAR ? SvTRUE(*sp) : sp > newsp)) {
2336 char *name = cx->blk_eval.old_name;
2338 /* Unassume the success we assumed earlier. */
2339 (void)hv_delete(GvHVn(incgv), name, strlen(name), G_DISCARD);
2340 retop = die("%s did not return a true value", name);
2346 if (!(save_flags & OPf_SPECIAL))
2347 sv_setpv(GvSV(errgv),"");
2355 register CONTEXT *cx;
2361 push_return(cLOGOP->op_other->op_next);
2362 PUSHBLOCK(cx, CXt_EVAL, SP);
2364 eval_root = op; /* Only needed so that goto works right. */
2367 sv_setpv(GvSV(errgv),"");
2369 return DOCATCH(op->op_next);
2379 register CONTEXT *cx;
2386 if (gimme == G_SCALAR) {
2387 if (op->op_private & OPpLEAVE_VOID)
2392 if (SvFLAGS(TOPs) & (SVs_PADTMP|SVs_TEMP))
2395 *MARK = sv_mortalcopy(TOPs);
2405 for (mark = newsp + 1; mark <= SP; mark++)
2406 if (!(SvFLAGS(*mark) & (SVs_PADTMP|SVs_TEMP)))
2407 *mark = sv_mortalcopy(*mark);
2408 /* in case LEAVE wipes old return values */
2410 curpm = newpm; /* Don't pop $1 et al till now */
2413 sv_setpv(GvSV(errgv),"");
2422 register char *s = SvPV_force(sv, len);
2423 register char *send = s + len;
2424 register char *base;
2425 register I32 skipspaces = 0;
2428 bool postspace = FALSE;
2436 croak("Null picture in formline");
2438 New(804, fops, (send - s)*3+10, U16); /* Almost certainly too long... */
2443 *fpc++ = FF_LINEMARK;
2444 noblank = repeat = FALSE;
2462 case ' ': case '\t':
2473 *fpc++ = FF_LITERAL;
2481 *fpc++ = skipspaces;
2485 *fpc++ = FF_NEWLINE;
2489 arg = fpc - linepc + 1;
2496 *fpc++ = FF_LINEMARK;
2497 noblank = repeat = FALSE;
2506 ischop = s[-1] == '^';
2512 arg = (s - base) - 1;
2514 *fpc++ = FF_LITERAL;
2523 *fpc++ = FF_LINEGLOB;
2525 else if (*s == '#' || (*s == '.' && s[1] == '#')) {
2526 arg = ischop ? 512 : 0;
2536 arg |= 256 + (s - f);
2538 *fpc++ = s - base; /* fieldsize for FETCH */
2539 *fpc++ = FF_DECIMAL;
2544 bool ismore = FALSE;
2547 while (*++s == '>') ;
2548 prespace = FF_SPACE;
2550 else if (*s == '|') {
2551 while (*++s == '|') ;
2552 prespace = FF_HALFSPACE;
2557 while (*++s == '<') ;
2560 if (*s == '.' && s[1] == '.' && s[2] == '.') {
2564 *fpc++ = s - base; /* fieldsize for FETCH */
2566 *fpc++ = ischop ? FF_CHECKCHOP : FF_CHECKNL;
2584 { /* need to jump to the next word */
2586 z = WORD_ALIGN - SvCUR(sv) % WORD_ALIGN;
2587 SvGROW(sv, SvCUR(sv) + z + arg * sizeof(U16) + 4);
2588 s = SvPVX(sv) + SvCUR(sv) + z;
2590 Copy(fops, s, arg, U16);
2592 sv_magic(sv, Nullsv, 'f', Nullch, 0);