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