This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
GvFILE() cannot be a pointer to the memory owned by the COP, because
[perl5.git] / ext / ByteLoader / byterun.c
1 /* -*- buffer-read-only: t -*-
2  *
3  *      Copyright (c) 1996-1999 Malcolm Beattie
4  *
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.
7  *
8  */
9 /*
10  * This file is autogenerated from bytecode.pl. Changes made here will be lost.
11  */
12
13 #define PERL_NO_GET_CONTEXT
14 #include "EXTERN.h"
15 #include "perl.h"
16 #define NO_XSLOCKS
17 #include "XSUB.h"
18
19 #include "byterun.h"
20 #include "bytecode.h"
21
22
23 static const int optype_size[] = {
24     sizeof(OP),
25     sizeof(UNOP),
26     sizeof(BINOP),
27     sizeof(LOGOP),
28     sizeof(LISTOP),
29     sizeof(PMOP),
30     sizeof(SVOP),
31     sizeof(PADOP),
32     sizeof(PVOP),
33     sizeof(LOOP),
34     sizeof(COP)
35 };
36
37 void *
38 bset_obj_store(pTHX_ struct byteloader_state *bstate, void *obj, I32 ix)
39 {
40     if (ix > bstate->bs_obj_list_fill) {
41         Renew(bstate->bs_obj_list, ix + 32, void*);
42         bstate->bs_obj_list_fill = ix + 31;
43     }
44     bstate->bs_obj_list[ix] = obj;
45     return obj;
46 }
47
48 int
49 byterun(pTHX_ register struct byteloader_state *bstate)
50 {
51     dVAR;
52     register int insn;
53     U32 ix;
54     SV *specialsv_list[7];
55
56     BYTECODE_HEADER_CHECK;      /* croak if incorrect platform */
57     Newx(bstate->bs_obj_list, 32, void*); /* set op objlist */
58     bstate->bs_obj_list_fill = 31;
59     bstate->bs_obj_list[0] = NULL; /* first is always Null */
60     bstate->bs_ix = 1;
61
62     specialsv_list[0] = Nullsv;
63     specialsv_list[1] = &PL_sv_undef;
64     specialsv_list[2] = &PL_sv_yes;
65     specialsv_list[3] = &PL_sv_no;
66     specialsv_list[4] = (SV*)pWARN_ALL;
67     specialsv_list[5] = (SV*)pWARN_NONE;
68     specialsv_list[6] = (SV*)pWARN_STD;
69
70     while ((insn = BGET_FGETC()) != EOF) {
71         switch (insn) {
72           case INSN_COMMENT:            /* 35 */
73             {
74                 comment_t arg;
75                 BGET_comment_t(arg);
76                 arg = arg;
77                 break;
78             }
79           case INSN_NOP:                /* 10 */
80             {
81                 break;
82             }
83           case INSN_RET:                /* 0 */
84             {
85                 BSET_ret(none);
86                 break;
87             }
88           case INSN_LDSV:               /* 1 */
89             {
90                 svindex arg;
91                 BGET_svindex(arg);
92                 bstate->bs_sv = arg;
93                 break;
94             }
95           case INSN_LDOP:               /* 2 */
96             {
97                 opindex arg;
98                 BGET_opindex(arg);
99                 PL_op = arg;
100                 break;
101             }
102           case INSN_STSV:               /* 3 */
103             {
104                 U32 arg;
105                 BGET_U32(arg);
106                 BSET_OBJ_STORE(bstate->bs_sv, arg);
107                 break;
108             }
109           case INSN_STOP:               /* 4 */
110             {
111                 U32 arg;
112                 BGET_U32(arg);
113                 BSET_OBJ_STORE(PL_op, arg);
114                 break;
115             }
116           case INSN_STPV:               /* 5 */
117             {
118                 U32 arg;
119                 BGET_U32(arg);
120                 BSET_stpv(bstate->bs_pv.pvx, arg);
121                 break;
122             }
123           case INSN_LDSPECSV:           /* 6 */
124             {
125                 U8 arg;
126                 BGET_U8(arg);
127                 BSET_ldspecsv(bstate->bs_sv, arg);
128                 break;
129             }
130           case INSN_LDSPECSVX:          /* 7 */
131             {
132                 U8 arg;
133                 BGET_U8(arg);
134                 BSET_ldspecsvx(bstate->bs_sv, arg);
135                 break;
136             }
137           case INSN_NEWSV:              /* 8 */
138             {
139                 U8 arg;
140                 BGET_U8(arg);
141                 BSET_newsv(bstate->bs_sv, arg);
142                 break;
143             }
144           case INSN_NEWSVX:             /* 9 */
145             {
146                 U32 arg;
147                 BGET_U32(arg);
148                 BSET_newsvx(bstate->bs_sv, arg);
149                 break;
150             }
151           case INSN_NEWOP:              /* 11 */
152             {
153                 U8 arg;
154                 BGET_U8(arg);
155                 BSET_newop(PL_op, arg);
156                 break;
157             }
158           case INSN_NEWOPX:             /* 12 */
159             {
160                 U16 arg;
161                 BGET_U16(arg);
162                 BSET_newopx(PL_op, arg);
163                 break;
164             }
165           case INSN_NEWOPN:             /* 13 */
166             {
167                 U8 arg;
168                 BGET_U8(arg);
169                 BSET_newopn(PL_op, arg);
170                 break;
171             }
172           case INSN_NEWPV:              /* 14 */
173             {
174                 PV arg;
175                 BGET_PV(arg);
176                 break;
177             }
178           case INSN_PV_CUR:             /* 15 */
179             {
180                 STRLEN arg;
181                 BGET_PADOFFSET(arg);
182                 bstate->bs_pv.xpv.xpv_cur = arg;
183                 break;
184             }
185           case INSN_PV_FREE:            /* 16 */
186             {
187                 BSET_pv_free(bstate->bs_pv.pvx);
188                 break;
189             }
190           case INSN_SV_UPGRADE:         /* 17 */
191             {
192                 U8 arg;
193                 BGET_U8(arg);
194                 BSET_sv_upgrade(bstate->bs_sv, arg);
195                 break;
196             }
197           case INSN_SV_REFCNT:          /* 18 */
198             {
199                 U32 arg;
200                 BGET_U32(arg);
201                 SvREFCNT(bstate->bs_sv) = arg;
202                 break;
203             }
204           case INSN_SV_REFCNT_ADD:              /* 19 */
205             {
206                 I32 arg;
207                 BGET_I32(arg);
208                 BSET_sv_refcnt_add(SvREFCNT(bstate->bs_sv), arg);
209                 break;
210             }
211           case INSN_SV_FLAGS:           /* 20 */
212             {
213                 U32 arg;
214                 BGET_U32(arg);
215                 SvFLAGS(bstate->bs_sv) = arg;
216                 break;
217             }
218           case INSN_XRV:                /* 21 */
219             {
220                 svindex arg;
221                 BGET_svindex(arg);
222                 BSET_xrv(bstate->bs_sv, arg);
223                 break;
224             }
225           case INSN_XPV:                /* 22 */
226             {
227                 BSET_xpv(bstate->bs_sv);
228                 break;
229             }
230           case INSN_XPV_CUR:            /* 23 */
231             {
232                 STRLEN arg;
233                 BGET_PADOFFSET(arg);
234                 BSET_xpv_cur(bstate->bs_sv, arg);
235                 break;
236             }
237           case INSN_XPV_LEN:            /* 24 */
238             {
239                 STRLEN arg;
240                 BGET_PADOFFSET(arg);
241                 BSET_xpv_len(bstate->bs_sv, arg);
242                 break;
243             }
244           case INSN_XIV:                /* 25 */
245             {
246                 IV arg;
247                 BGET_IV(arg);
248                 BSET_xiv(bstate->bs_sv, arg);
249                 break;
250             }
251           case INSN_XNV:                /* 26 */
252             {
253                 NV arg;
254                 BGET_NV(arg);
255                 BSET_xnv(bstate->bs_sv, arg);
256                 break;
257             }
258           case INSN_XLV_TARGOFF:                /* 27 */
259             {
260                 STRLEN arg;
261                 BGET_PADOFFSET(arg);
262                 LvTARGOFF(bstate->bs_sv) = arg;
263                 break;
264             }
265           case INSN_XLV_TARGLEN:                /* 28 */
266             {
267                 STRLEN arg;
268                 BGET_PADOFFSET(arg);
269                 LvTARGLEN(bstate->bs_sv) = arg;
270                 break;
271             }
272           case INSN_XLV_TARG:           /* 29 */
273             {
274                 svindex arg;
275                 BGET_svindex(arg);
276                 LvTARG(bstate->bs_sv) = arg;
277                 break;
278             }
279           case INSN_XLV_TYPE:           /* 30 */
280             {
281                 char arg;
282                 BGET_U8(arg);
283                 LvTYPE(bstate->bs_sv) = arg;
284                 break;
285             }
286           case INSN_XBM_USEFUL:         /* 31 */
287             {
288                 I32 arg;
289                 BGET_I32(arg);
290                 BmUSEFUL(bstate->bs_sv) = arg;
291                 break;
292             }
293           case INSN_XBM_PREVIOUS:               /* 32 */
294             {
295                 U16 arg;
296                 BGET_U16(arg);
297                 BmPREVIOUS(bstate->bs_sv) = arg;
298                 break;
299             }
300           case INSN_XBM_RARE:           /* 33 */
301             {
302                 U8 arg;
303                 BGET_U8(arg);
304                 BmRARE(bstate->bs_sv) = arg;
305                 break;
306             }
307           case INSN_XFM_LINES:          /* 34 */
308             {
309                 IV arg;
310                 BGET_IV(arg);
311                 FmLINES(bstate->bs_sv) = arg;
312                 break;
313             }
314           case INSN_XIO_LINES:          /* 36 */
315             {
316                 IV arg;
317                 BGET_IV(arg);
318                 IoLINES(bstate->bs_sv) = arg;
319                 break;
320             }
321           case INSN_XIO_PAGE:           /* 37 */
322             {
323                 IV arg;
324                 BGET_IV(arg);
325                 IoPAGE(bstate->bs_sv) = arg;
326                 break;
327             }
328           case INSN_XIO_PAGE_LEN:               /* 38 */
329             {
330                 IV arg;
331                 BGET_IV(arg);
332                 IoPAGE_LEN(bstate->bs_sv) = arg;
333                 break;
334             }
335           case INSN_XIO_LINES_LEFT:             /* 39 */
336             {
337                 IV arg;
338                 BGET_IV(arg);
339                 IoLINES_LEFT(bstate->bs_sv) = arg;
340                 break;
341             }
342           case INSN_XIO_TOP_NAME:               /* 40 */
343             {
344                 pvindex arg;
345                 BGET_pvindex(arg);
346                 IoTOP_NAME(bstate->bs_sv) = arg;
347                 break;
348             }
349           case INSN_XIO_TOP_GV:         /* 41 */
350             {
351                 svindex arg;
352                 BGET_svindex(arg);
353                 *(SV**)&IoTOP_GV(bstate->bs_sv) = arg;
354                 break;
355             }
356           case INSN_XIO_FMT_NAME:               /* 42 */
357             {
358                 pvindex arg;
359                 BGET_pvindex(arg);
360                 IoFMT_NAME(bstate->bs_sv) = arg;
361                 break;
362             }
363           case INSN_XIO_FMT_GV:         /* 43 */
364             {
365                 svindex arg;
366                 BGET_svindex(arg);
367                 *(SV**)&IoFMT_GV(bstate->bs_sv) = arg;
368                 break;
369             }
370           case INSN_XIO_BOTTOM_NAME:            /* 44 */
371             {
372                 pvindex arg;
373                 BGET_pvindex(arg);
374                 IoBOTTOM_NAME(bstate->bs_sv) = arg;
375                 break;
376             }
377           case INSN_XIO_BOTTOM_GV:              /* 45 */
378             {
379                 svindex arg;
380                 BGET_svindex(arg);
381                 *(SV**)&IoBOTTOM_GV(bstate->bs_sv) = arg;
382                 break;
383             }
384           case INSN_XIO_SUBPROCESS:             /* 46 */
385             {
386                 short arg;
387                 BGET_U16(arg);
388                 IoSUBPROCESS(bstate->bs_sv) = arg;
389                 break;
390             }
391           case INSN_XIO_TYPE:           /* 47 */
392             {
393                 char arg;
394                 BGET_U8(arg);
395                 IoTYPE(bstate->bs_sv) = arg;
396                 break;
397             }
398           case INSN_XIO_FLAGS:          /* 48 */
399             {
400                 char arg;
401                 BGET_U8(arg);
402                 IoFLAGS(bstate->bs_sv) = arg;
403                 break;
404             }
405           case INSN_XCV_XSUBANY:                /* 49 */
406             {
407                 svindex arg;
408                 BGET_svindex(arg);
409                 *(SV**)&CvXSUBANY(bstate->bs_sv).any_ptr = arg;
410                 break;
411             }
412           case INSN_XCV_STASH:          /* 50 */
413             {
414                 svindex arg;
415                 BGET_svindex(arg);
416                 *(SV**)&CvSTASH(bstate->bs_sv) = arg;
417                 break;
418             }
419           case INSN_XCV_START:          /* 51 */
420             {
421                 opindex arg;
422                 BGET_opindex(arg);
423                 CvSTART(bstate->bs_sv) = arg;
424                 break;
425             }
426           case INSN_XCV_ROOT:           /* 52 */
427             {
428                 opindex arg;
429                 BGET_opindex(arg);
430                 CvROOT(bstate->bs_sv) = arg;
431                 break;
432             }
433           case INSN_XCV_GV:             /* 53 */
434             {
435                 svindex arg;
436                 BGET_svindex(arg);
437                 *(SV**)&CvGV(bstate->bs_sv) = arg;
438                 break;
439             }
440           case INSN_XCV_FILE:           /* 54 */
441             {
442                 pvindex arg;
443                 BGET_pvindex(arg);
444                 CvFILE(bstate->bs_sv) = arg;
445                 break;
446             }
447           case INSN_XCV_DEPTH:          /* 55 */
448             {
449                 long arg;
450                 BGET_long(arg);
451                 CvDEPTH(bstate->bs_sv) = arg;
452                 break;
453             }
454           case INSN_XCV_PADLIST:                /* 56 */
455             {
456                 svindex arg;
457                 BGET_svindex(arg);
458                 *(SV**)&CvPADLIST(bstate->bs_sv) = arg;
459                 break;
460             }
461           case INSN_XCV_OUTSIDE:                /* 57 */
462             {
463                 svindex arg;
464                 BGET_svindex(arg);
465                 *(SV**)&CvOUTSIDE(bstate->bs_sv) = arg;
466                 break;
467             }
468           case INSN_XCV_OUTSIDE_SEQ:            /* 58 */
469             {
470                 U32 arg;
471                 BGET_U32(arg);
472                 CvOUTSIDE_SEQ(bstate->bs_sv) = arg;
473                 break;
474             }
475           case INSN_XCV_FLAGS:          /* 59 */
476             {
477                 U16 arg;
478                 BGET_U16(arg);
479                 CvFLAGS(bstate->bs_sv) = arg;
480                 break;
481             }
482           case INSN_AV_EXTEND:          /* 60 */
483             {
484                 SSize_t arg;
485                 BGET_PADOFFSET(arg);
486                 BSET_av_extend(bstate->bs_sv, arg);
487                 break;
488             }
489           case INSN_AV_PUSHX:           /* 61 */
490             {
491                 svindex arg;
492                 BGET_svindex(arg);
493                 BSET_av_pushx(bstate->bs_sv, arg);
494                 break;
495             }
496           case INSN_AV_PUSH:            /* 62 */
497             {
498                 svindex arg;
499                 BGET_svindex(arg);
500                 BSET_av_push(bstate->bs_sv, arg);
501                 break;
502             }
503           case INSN_XAV_FILL:           /* 63 */
504             {
505                 SSize_t arg;
506                 BGET_PADOFFSET(arg);
507                 AvFILLp(bstate->bs_sv) = arg;
508                 break;
509             }
510           case INSN_XAV_MAX:            /* 64 */
511             {
512                 SSize_t arg;
513                 BGET_PADOFFSET(arg);
514                 AvMAX(bstate->bs_sv) = arg;
515                 break;
516             }
517           case INSN_XHV_RITER:          /* 65 */
518             {
519                 I32 arg;
520                 BGET_I32(arg);
521                 HvRITER(bstate->bs_sv) = arg;
522                 break;
523             }
524           case INSN_XHV_NAME:           /* 66 */
525             {
526                 pvindex arg;
527                 BGET_pvindex(arg);
528                 BSET_xhv_name(bstate->bs_sv, arg);
529                 break;
530             }
531           case INSN_HV_STORE:           /* 67 */
532             {
533                 svindex arg;
534                 BGET_svindex(arg);
535                 BSET_hv_store(bstate->bs_sv, arg);
536                 break;
537             }
538           case INSN_SV_MAGIC:           /* 68 */
539             {
540                 char arg;
541                 BGET_U8(arg);
542                 BSET_sv_magic(bstate->bs_sv, arg);
543                 break;
544             }
545           case INSN_MG_OBJ:             /* 69 */
546             {
547                 svindex arg;
548                 BGET_svindex(arg);
549                 SvMAGIC(bstate->bs_sv)->mg_obj = arg;
550                 break;
551             }
552           case INSN_MG_PRIVATE:         /* 70 */
553             {
554                 U16 arg;
555                 BGET_U16(arg);
556                 SvMAGIC(bstate->bs_sv)->mg_private = arg;
557                 break;
558             }
559           case INSN_MG_FLAGS:           /* 71 */
560             {
561                 U8 arg;
562                 BGET_U8(arg);
563                 SvMAGIC(bstate->bs_sv)->mg_flags = arg;
564                 break;
565             }
566           case INSN_MG_NAME:            /* 72 */
567             {
568                 pvcontents arg;
569                 BGET_pvcontents(arg);
570                 BSET_mg_name(SvMAGIC(bstate->bs_sv), arg);
571                 break;
572             }
573           case INSN_MG_NAMEX:           /* 73 */
574             {
575                 svindex arg;
576                 BGET_svindex(arg);
577                 BSET_mg_namex(SvMAGIC(bstate->bs_sv), arg);
578                 break;
579             }
580           case INSN_XMG_STASH:          /* 74 */
581             {
582                 svindex arg;
583                 BGET_svindex(arg);
584                 BSET_xmg_stash(bstate->bs_sv, arg);
585                 break;
586             }
587           case INSN_GV_FETCHPV:         /* 75 */
588             {
589                 strconst arg;
590                 BGET_strconst(arg);
591                 BSET_gv_fetchpv(bstate->bs_sv, arg);
592                 break;
593             }
594           case INSN_GV_FETCHPVX:                /* 76 */
595             {
596                 strconst arg;
597                 BGET_strconst(arg);
598                 BSET_gv_fetchpvx(bstate->bs_sv, arg);
599                 break;
600             }
601           case INSN_GV_STASHPV:         /* 77 */
602             {
603                 strconst arg;
604                 BGET_strconst(arg);
605                 BSET_gv_stashpv(bstate->bs_sv, arg);
606                 break;
607             }
608           case INSN_GV_STASHPVX:                /* 78 */
609             {
610                 strconst arg;
611                 BGET_strconst(arg);
612                 BSET_gv_stashpvx(bstate->bs_sv, arg);
613                 break;
614             }
615           case INSN_GP_SV:              /* 79 */
616             {
617                 svindex arg;
618                 BGET_svindex(arg);
619                 GvSV(bstate->bs_sv) = arg;
620                 break;
621             }
622           case INSN_GP_REFCNT:          /* 80 */
623             {
624                 U32 arg;
625                 BGET_U32(arg);
626                 GvREFCNT(bstate->bs_sv) = arg;
627                 break;
628             }
629           case INSN_GP_REFCNT_ADD:              /* 81 */
630             {
631                 I32 arg;
632                 BGET_I32(arg);
633                 BSET_gp_refcnt_add(GvREFCNT(bstate->bs_sv), arg);
634                 break;
635             }
636           case INSN_GP_AV:              /* 82 */
637             {
638                 svindex arg;
639                 BGET_svindex(arg);
640                 *(SV**)&GvAV(bstate->bs_sv) = arg;
641                 break;
642             }
643           case INSN_GP_HV:              /* 83 */
644             {
645                 svindex arg;
646                 BGET_svindex(arg);
647                 *(SV**)&GvHV(bstate->bs_sv) = arg;
648                 break;
649             }
650           case INSN_GP_CV:              /* 84 */
651             {
652                 svindex arg;
653                 BGET_svindex(arg);
654                 *(SV**)&GvCV(bstate->bs_sv) = arg;
655                 break;
656             }
657           case INSN_GP_FILE:            /* 85 */
658             {
659                 pvindex arg;
660                 BGET_pvindex(arg);
661                 BSET_gp_file(bstate->bs_sv, arg);
662                 break;
663             }
664           case INSN_GP_IO:              /* 86 */
665             {
666                 svindex arg;
667                 BGET_svindex(arg);
668                 *(SV**)&GvIOp(bstate->bs_sv) = arg;
669                 break;
670             }
671           case INSN_GP_FORM:            /* 87 */
672             {
673                 svindex arg;
674                 BGET_svindex(arg);
675                 *(SV**)&GvFORM(bstate->bs_sv) = arg;
676                 break;
677             }
678           case INSN_GP_CVGEN:           /* 88 */
679             {
680                 U32 arg;
681                 BGET_U32(arg);
682                 GvCVGEN(bstate->bs_sv) = arg;
683                 break;
684             }
685           case INSN_GP_LINE:            /* 89 */
686             {
687                 line_t arg;
688                 BGET_U32(arg);
689                 GvLINE(bstate->bs_sv) = arg;
690                 break;
691             }
692           case INSN_GP_SHARE:           /* 90 */
693             {
694                 svindex arg;
695                 BGET_svindex(arg);
696                 BSET_gp_share(bstate->bs_sv, arg);
697                 break;
698             }
699           case INSN_XGV_FLAGS:          /* 91 */
700             {
701                 U8 arg;
702                 BGET_U8(arg);
703                 GvFLAGS(bstate->bs_sv) = arg;
704                 break;
705             }
706           case INSN_OP_NEXT:            /* 92 */
707             {
708                 opindex arg;
709                 BGET_opindex(arg);
710                 PL_op->op_next = arg;
711                 break;
712             }
713           case INSN_OP_SIBLING:         /* 93 */
714             {
715                 opindex arg;
716                 BGET_opindex(arg);
717                 PL_op->op_sibling = arg;
718                 break;
719             }
720           case INSN_OP_PPADDR:          /* 94 */
721             {
722                 strconst arg;
723                 BGET_strconst(arg);
724                 BSET_op_ppaddr(PL_op->op_ppaddr, arg);
725                 break;
726             }
727           case INSN_OP_TARG:            /* 95 */
728             {
729                 PADOFFSET arg;
730                 BGET_PADOFFSET(arg);
731                 PL_op->op_targ = arg;
732                 break;
733             }
734           case INSN_OP_TYPE:            /* 96 */
735             {
736                 OPCODE arg;
737                 BGET_U16(arg);
738                 BSET_op_type(PL_op, arg);
739                 break;
740             }
741           case INSN_OP_OPT:             /* 97 */
742             {
743                 U8 arg;
744                 BGET_U8(arg);
745                 PL_op->op_opt = arg;
746                 break;
747             }
748           case INSN_OP_STATIC:          /* 98 */
749             {
750                 U8 arg;
751                 BGET_U8(arg);
752                 PL_op->op_static = arg;
753                 break;
754             }
755           case INSN_OP_FLAGS:           /* 99 */
756             {
757                 U8 arg;
758                 BGET_U8(arg);
759                 PL_op->op_flags = arg;
760                 break;
761             }
762           case INSN_OP_PRIVATE:         /* 100 */
763             {
764                 U8 arg;
765                 BGET_U8(arg);
766                 PL_op->op_private = arg;
767                 break;
768             }
769           case INSN_OP_FIRST:           /* 101 */
770             {
771                 opindex arg;
772                 BGET_opindex(arg);
773                 cUNOP->op_first = arg;
774                 break;
775             }
776           case INSN_OP_LAST:            /* 102 */
777             {
778                 opindex arg;
779                 BGET_opindex(arg);
780                 cBINOP->op_last = arg;
781                 break;
782             }
783           case INSN_OP_OTHER:           /* 103 */
784             {
785                 opindex arg;
786                 BGET_opindex(arg);
787                 cLOGOP->op_other = arg;
788                 break;
789             }
790           case INSN_OP_PMREPLROOT:              /* 104 */
791             {
792                 opindex arg;
793                 BGET_opindex(arg);
794                 cPMOP->op_pmreplroot = arg;
795                 break;
796             }
797           case INSN_OP_PMREPLSTART:             /* 105 */
798             {
799                 opindex arg;
800                 BGET_opindex(arg);
801                 cPMOP->op_pmreplstart = arg;
802                 break;
803             }
804           case INSN_OP_PMNEXT:          /* 106 */
805             {
806                 opindex arg;
807                 BGET_opindex(arg);
808                 *(OP**)&cPMOP->op_pmnext = arg;
809                 break;
810             }
811 #ifdef USE_ITHREADS
812           case INSN_OP_PMSTASHPV:               /* 107 */
813             {
814                 pvindex arg;
815                 BGET_pvindex(arg);
816                 BSET_op_pmstashpv(cPMOP, arg);
817                 break;
818             }
819           case INSN_OP_PMREPLROOTPO:            /* 108 */
820             {
821                 PADOFFSET arg;
822                 BGET_PADOFFSET(arg);
823                 cPMOP->op_pmreplroot = (OP*)arg;
824                 break;
825             }
826 #else
827           case INSN_OP_PMSTASH:         /* 109 */
828             {
829                 svindex arg;
830                 BGET_svindex(arg);
831                 *(SV**)&cPMOP->op_pmstash = arg;
832                 break;
833             }
834           case INSN_OP_PMREPLROOTGV:            /* 110 */
835             {
836                 svindex arg;
837                 BGET_svindex(arg);
838                 *(SV**)&cPMOP->op_pmreplroot = arg;
839                 break;
840             }
841 #endif
842           case INSN_PREGCOMP:           /* 111 */
843             {
844                 pvcontents arg;
845                 BGET_pvcontents(arg);
846                 BSET_pregcomp(PL_op, arg);
847                 break;
848             }
849           case INSN_OP_PMFLAGS:         /* 112 */
850             {
851                 U16 arg;
852                 BGET_U16(arg);
853                 cPMOP->op_pmflags = arg;
854                 break;
855             }
856           case INSN_OP_PMPERMFLAGS:             /* 113 */
857             {
858                 U16 arg;
859                 BGET_U16(arg);
860                 cPMOP->op_pmpermflags = arg;
861                 break;
862             }
863           case INSN_OP_PMDYNFLAGS:              /* 114 */
864             {
865                 U8 arg;
866                 BGET_U8(arg);
867                 cPMOP->op_pmdynflags = arg;
868                 break;
869             }
870           case INSN_OP_SV:              /* 115 */
871             {
872                 svindex arg;
873                 BGET_svindex(arg);
874                 cSVOP->op_sv = arg;
875                 break;
876             }
877           case INSN_OP_PADIX:           /* 116 */
878             {
879                 PADOFFSET arg;
880                 BGET_PADOFFSET(arg);
881                 cPADOP->op_padix = arg;
882                 break;
883             }
884           case INSN_OP_PV:              /* 117 */
885             {
886                 pvcontents arg;
887                 BGET_pvcontents(arg);
888                 cPVOP->op_pv = arg;
889                 break;
890             }
891           case INSN_OP_PV_TR:           /* 118 */
892             {
893                 op_tr_array arg;
894                 BGET_op_tr_array(arg);
895                 cPVOP->op_pv = arg;
896                 break;
897             }
898           case INSN_OP_REDOOP:          /* 119 */
899             {
900                 opindex arg;
901                 BGET_opindex(arg);
902                 cLOOP->op_redoop = arg;
903                 break;
904             }
905           case INSN_OP_NEXTOP:          /* 120 */
906             {
907                 opindex arg;
908                 BGET_opindex(arg);
909                 cLOOP->op_nextop = arg;
910                 break;
911             }
912           case INSN_OP_LASTOP:          /* 121 */
913             {
914                 opindex arg;
915                 BGET_opindex(arg);
916                 cLOOP->op_lastop = arg;
917                 break;
918             }
919           case INSN_COP_LABEL:          /* 122 */
920             {
921                 pvindex arg;
922                 BGET_pvindex(arg);
923                 cCOP->cop_label = arg;
924                 break;
925             }
926 #ifdef USE_ITHREADS
927           case INSN_COP_STASHPV:                /* 123 */
928             {
929                 pvindex arg;
930                 BGET_pvindex(arg);
931                 BSET_cop_stashpv(cCOP, arg);
932                 break;
933             }
934           case INSN_COP_FILE:           /* 124 */
935             {
936                 pvindex arg;
937                 BGET_pvindex(arg);
938                 BSET_cop_file(cCOP, arg);
939                 break;
940             }
941 #else
942           case INSN_COP_STASH:          /* 125 */
943             {
944                 svindex arg;
945                 BGET_svindex(arg);
946                 BSET_cop_stash(cCOP, arg);
947                 break;
948             }
949           case INSN_COP_FILEGV:         /* 126 */
950             {
951                 svindex arg;
952                 BGET_svindex(arg);
953                 BSET_cop_filegv(cCOP, arg);
954                 break;
955             }
956 #endif
957           case INSN_COP_SEQ:            /* 127 */
958             {
959                 U32 arg;
960                 BGET_U32(arg);
961                 cCOP->cop_seq = arg;
962                 break;
963             }
964           case INSN_COP_ARYBASE:                /* 128 */
965             {
966                 I32 arg;
967                 BGET_I32(arg);
968                 BSET_cop_arybase(cCOP, arg);
969                 break;
970             }
971           case INSN_COP_LINE:           /* 129 */
972             {
973                 line_t arg;
974                 BGET_U32(arg);
975                 cCOP->cop_line = arg;
976                 break;
977             }
978           case INSN_COP_IO:             /* 130 */
979             {
980                 svindex arg;
981                 BGET_svindex(arg);
982                 cCOP->cop_io = arg;
983                 break;
984             }
985           case INSN_COP_WARNINGS:               /* 131 */
986             {
987                 svindex arg;
988                 BGET_svindex(arg);
989                 BSET_cop_warnings(cCOP, arg);
990                 break;
991             }
992           case INSN_MAIN_START:         /* 132 */
993             {
994                 opindex arg;
995                 BGET_opindex(arg);
996                 PL_main_start = arg;
997                 break;
998             }
999           case INSN_MAIN_ROOT:          /* 133 */
1000             {
1001                 opindex arg;
1002                 BGET_opindex(arg);
1003                 PL_main_root = arg;
1004                 break;
1005             }
1006           case INSN_MAIN_CV:            /* 134 */
1007             {
1008                 svindex arg;
1009                 BGET_svindex(arg);
1010                 *(SV**)&PL_main_cv = arg;
1011                 break;
1012             }
1013           case INSN_CURPAD:             /* 135 */
1014             {
1015                 svindex arg;
1016                 BGET_svindex(arg);
1017                 BSET_curpad(PL_curpad, arg);
1018                 break;
1019             }
1020           case INSN_PUSH_BEGIN:         /* 136 */
1021             {
1022                 svindex arg;
1023                 BGET_svindex(arg);
1024                 BSET_push_begin(PL_beginav, arg);
1025                 break;
1026             }
1027           case INSN_PUSH_INIT:          /* 137 */
1028             {
1029                 svindex arg;
1030                 BGET_svindex(arg);
1031                 BSET_push_init(PL_initav, arg);
1032                 break;
1033             }
1034           case INSN_PUSH_END:           /* 138 */
1035             {
1036                 svindex arg;
1037                 BGET_svindex(arg);
1038                 BSET_push_end(PL_endav, arg);
1039                 break;
1040             }
1041           case INSN_CURSTASH:           /* 139 */
1042             {
1043                 svindex arg;
1044                 BGET_svindex(arg);
1045                 *(SV**)&PL_curstash = arg;
1046                 break;
1047             }
1048           case INSN_DEFSTASH:           /* 140 */
1049             {
1050                 svindex arg;
1051                 BGET_svindex(arg);
1052                 *(SV**)&PL_defstash = arg;
1053                 break;
1054             }
1055           case INSN_DATA:               /* 141 */
1056             {
1057                 U8 arg;
1058                 BGET_U8(arg);
1059                 BSET_data(none, arg);
1060                 break;
1061             }
1062           case INSN_INCAV:              /* 142 */
1063             {
1064                 svindex arg;
1065                 BGET_svindex(arg);
1066                 *(SV**)&GvAV(PL_incgv) = arg;
1067                 break;
1068             }
1069           case INSN_LOAD_GLOB:          /* 143 */
1070             {
1071                 svindex arg;
1072                 BGET_svindex(arg);
1073                 BSET_load_glob(none, arg);
1074                 break;
1075             }
1076 #ifdef USE_ITHREADS
1077           case INSN_REGEX_PADAV:                /* 144 */
1078             {
1079                 svindex arg;
1080                 BGET_svindex(arg);
1081                 *(SV**)&PL_regex_padav = arg;
1082                 break;
1083             }
1084 #endif
1085           case INSN_DOWARN:             /* 145 */
1086             {
1087                 U8 arg;
1088                 BGET_U8(arg);
1089                 PL_dowarn = arg;
1090                 break;
1091             }
1092           case INSN_COMPPAD_NAME:               /* 146 */
1093             {
1094                 svindex arg;
1095                 BGET_svindex(arg);
1096                 *(SV**)&PL_comppad_name = arg;
1097                 break;
1098             }
1099           case INSN_XGV_STASH:          /* 147 */
1100             {
1101                 svindex arg;
1102                 BGET_svindex(arg);
1103                 *(SV**)&GvSTASH(bstate->bs_sv) = arg;
1104                 break;
1105             }
1106           case INSN_SIGNAL:             /* 148 */
1107             {
1108                 strconst arg;
1109                 BGET_strconst(arg);
1110                 BSET_signal(bstate->bs_sv, arg);
1111                 break;
1112             }
1113           case INSN_FORMFEED:           /* 149 */
1114             {
1115                 svindex arg;
1116                 BGET_svindex(arg);
1117                 PL_formfeed = arg;
1118                 break;
1119             }
1120           default:
1121             Perl_croak(aTHX_ "Illegal bytecode instruction %d\n", insn);
1122             /* NOTREACHED */
1123         }
1124     }
1125     return 0;
1126 }
1127
1128 /* ex: set ro: */