2 * Copyright (c) 1996-1999 Malcolm Beattie
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.
9 * This file is autogenerated from bytecode.pl. Changes made here will be lost.
12 #define PERL_NO_GET_CONTEXT
22 static const int optype_size[] = {
37 bset_obj_store(pTHX_ struct byteloader_state *bstate, void *obj, I32 ix)
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;
43 bstate->bs_obj_list[ix] = obj;
48 byterun(pTHX_ register struct byteloader_state *bstate)
52 SV *specialsv_list[6];
54 BYTECODE_HEADER_CHECK; /* croak if incorrect platform */
55 New(666, bstate->bs_obj_list, 32, void*); /* set op objlist */
56 bstate->bs_obj_list_fill = 31;
57 bstate->bs_obj_list[0] = NULL; /* first is always Null */
59 specialsv_list[0] = Nullsv;
60 specialsv_list[1] = &PL_sv_undef;
61 specialsv_list[2] = &PL_sv_yes;
62 specialsv_list[3] = &PL_sv_no;
63 specialsv_list[4] = pWARN_ALL;
64 specialsv_list[5] = pWARN_NONE;
66 while ((insn = BGET_FGETC()) != EOF) {
68 case INSN_COMMENT: /* 35 */
75 case INSN_NOP: /* 10 */
79 case INSN_RET: /* 0 */
84 case INSN_LDSV: /* 1 */
91 case INSN_LDOP: /* 2 */
98 case INSN_STSV: /* 3 */
102 BSET_OBJ_STORE(bstate->bs_sv, arg);
105 case INSN_STOP: /* 4 */
109 BSET_OBJ_STORE(PL_op, arg);
112 case INSN_STPV: /* 5 */
116 BSET_stpv(bstate->bs_pv.xpv_pv, arg);
119 case INSN_LDSPECSV: /* 6 */
123 BSET_ldspecsv(bstate->bs_sv, arg);
126 case INSN_NEWSV: /* 7 */
130 BSET_newsv(bstate->bs_sv, arg);
133 case INSN_NEWOP: /* 8 */
137 BSET_newop(PL_op, arg);
140 case INSN_NEWOPN: /* 9 */
144 BSET_newopn(PL_op, arg);
147 case INSN_NEWPV: /* 11 */
153 case INSN_PV_CUR: /* 12 */
157 bstate->bs_pv.xpv_cur = arg;
160 case INSN_PV_FREE: /* 13 */
162 BSET_pv_free(bstate->bs_pv);
165 case INSN_SV_UPGRADE: /* 14 */
169 BSET_sv_upgrade(bstate->bs_sv, arg);
172 case INSN_SV_REFCNT: /* 15 */
176 SvREFCNT(bstate->bs_sv) = arg;
179 case INSN_SV_REFCNT_ADD: /* 16 */
183 BSET_sv_refcnt_add(SvREFCNT(bstate->bs_sv), arg);
186 case INSN_SV_FLAGS: /* 17 */
190 SvFLAGS(bstate->bs_sv) = arg;
193 case INSN_XRV: /* 18 */
197 SvRV(bstate->bs_sv) = arg;
200 case INSN_XPV: /* 19 */
202 BSET_xpv(bstate->bs_sv);
205 case INSN_XPV_CUR: /* 20 */
209 SvCUR(bstate->bs_sv) = arg;
212 case INSN_XPV_LEN: /* 21 */
216 SvLEN(bstate->bs_sv) = arg;
219 case INSN_XIV: /* 22 */
223 SvIVX(bstate->bs_sv) = arg;
226 case INSN_XNV: /* 23 */
230 SvNVX(bstate->bs_sv) = arg;
233 case INSN_XLV_TARGOFF: /* 24 */
237 LvTARGOFF(bstate->bs_sv) = arg;
240 case INSN_XLV_TARGLEN: /* 25 */
244 LvTARGLEN(bstate->bs_sv) = arg;
247 case INSN_XLV_TARG: /* 26 */
251 LvTARG(bstate->bs_sv) = arg;
254 case INSN_XLV_TYPE: /* 27 */
258 LvTYPE(bstate->bs_sv) = arg;
261 case INSN_XBM_USEFUL: /* 28 */
265 BmUSEFUL(bstate->bs_sv) = arg;
268 case INSN_XBM_PREVIOUS: /* 29 */
272 BmPREVIOUS(bstate->bs_sv) = arg;
275 case INSN_XBM_RARE: /* 30 */
279 BmRARE(bstate->bs_sv) = arg;
282 case INSN_XFM_LINES: /* 31 */
286 FmLINES(bstate->bs_sv) = arg;
289 case INSN_XIO_LINES: /* 32 */
293 IoLINES(bstate->bs_sv) = arg;
296 case INSN_XIO_PAGE: /* 33 */
300 IoPAGE(bstate->bs_sv) = arg;
303 case INSN_XIO_PAGE_LEN: /* 34 */
307 IoPAGE_LEN(bstate->bs_sv) = arg;
310 case INSN_XIO_LINES_LEFT: /* 36 */
314 IoLINES_LEFT(bstate->bs_sv) = arg;
317 case INSN_XIO_TOP_NAME: /* 37 */
321 IoTOP_NAME(bstate->bs_sv) = arg;
324 case INSN_XIO_TOP_GV: /* 38 */
328 *(SV**)&IoTOP_GV(bstate->bs_sv) = arg;
331 case INSN_XIO_FMT_NAME: /* 39 */
335 IoFMT_NAME(bstate->bs_sv) = arg;
338 case INSN_XIO_FMT_GV: /* 40 */
342 *(SV**)&IoFMT_GV(bstate->bs_sv) = arg;
345 case INSN_XIO_BOTTOM_NAME: /* 41 */
349 IoBOTTOM_NAME(bstate->bs_sv) = arg;
352 case INSN_XIO_BOTTOM_GV: /* 42 */
356 *(SV**)&IoBOTTOM_GV(bstate->bs_sv) = arg;
359 case INSN_XIO_SUBPROCESS: /* 43 */
363 IoSUBPROCESS(bstate->bs_sv) = arg;
366 case INSN_XIO_TYPE: /* 44 */
370 IoTYPE(bstate->bs_sv) = arg;
373 case INSN_XIO_FLAGS: /* 45 */
377 IoFLAGS(bstate->bs_sv) = arg;
380 case INSN_XCV_XSUBANY: /* 46 */
384 *(SV**)&CvXSUBANY(bstate->bs_sv).any_ptr = arg;
387 case INSN_XCV_STASH: /* 47 */
391 *(SV**)&CvSTASH(bstate->bs_sv) = arg;
394 case INSN_XCV_START: /* 48 */
398 CvSTART(bstate->bs_sv) = arg;
401 case INSN_XCV_ROOT: /* 49 */
405 CvROOT(bstate->bs_sv) = arg;
408 case INSN_XCV_GV: /* 50 */
412 *(SV**)&CvGV(bstate->bs_sv) = arg;
415 case INSN_XCV_FILE: /* 51 */
419 CvFILE(bstate->bs_sv) = arg;
422 case INSN_XCV_DEPTH: /* 52 */
426 CvDEPTH(bstate->bs_sv) = arg;
429 case INSN_XCV_PADLIST: /* 53 */
433 *(SV**)&CvPADLIST(bstate->bs_sv) = arg;
436 case INSN_XCV_OUTSIDE: /* 54 */
440 *(SV**)&CvOUTSIDE(bstate->bs_sv) = arg;
443 case INSN_XCV_OUTSIDE_SEQ: /* 55 */
447 CvOUTSIDE_SEQ(bstate->bs_sv) = arg;
450 case INSN_XCV_FLAGS: /* 56 */
454 CvFLAGS(bstate->bs_sv) = arg;
457 case INSN_AV_EXTEND: /* 57 */
461 BSET_av_extend(bstate->bs_sv, arg);
464 case INSN_AV_PUSHX: /* 58 */
468 BSET_av_pushx(bstate->bs_sv, arg);
471 case INSN_AV_PUSH: /* 59 */
475 BSET_av_push(bstate->bs_sv, arg);
478 case INSN_XAV_FILL: /* 60 */
482 AvFILLp(bstate->bs_sv) = arg;
485 case INSN_XAV_MAX: /* 61 */
489 AvMAX(bstate->bs_sv) = arg;
492 case INSN_XAV_FLAGS: /* 62 */
496 AvFLAGS(bstate->bs_sv) = arg;
499 case INSN_XHV_RITER: /* 63 */
503 HvRITER(bstate->bs_sv) = arg;
506 case INSN_XHV_NAME: /* 64 */
510 HvNAME(bstate->bs_sv) = arg;
513 case INSN_XHV_PMROOT: /* 65 */
517 *(OP**)&HvPMROOT(bstate->bs_sv) = arg;
520 case INSN_HV_STORE: /* 66 */
524 BSET_hv_store(bstate->bs_sv, arg);
527 case INSN_SV_MAGIC: /* 67 */
531 BSET_sv_magic(bstate->bs_sv, arg);
534 case INSN_MG_OBJ: /* 68 */
538 SvMAGIC(bstate->bs_sv)->mg_obj = arg;
541 case INSN_MG_PRIVATE: /* 69 */
545 SvMAGIC(bstate->bs_sv)->mg_private = arg;
548 case INSN_MG_FLAGS: /* 70 */
552 SvMAGIC(bstate->bs_sv)->mg_flags = arg;
555 case INSN_MG_NAME: /* 71 */
558 BGET_pvcontents(arg);
559 BSET_mg_name(SvMAGIC(bstate->bs_sv), arg);
562 case INSN_MG_NAMEX: /* 72 */
566 BSET_mg_namex(SvMAGIC(bstate->bs_sv), arg);
569 case INSN_XMG_STASH: /* 73 */
573 *(SV**)&SvSTASH(bstate->bs_sv) = arg;
576 case INSN_GV_FETCHPV: /* 74 */
580 BSET_gv_fetchpv(bstate->bs_sv, arg);
583 case INSN_GV_STASHPV: /* 75 */
587 BSET_gv_stashpv(bstate->bs_sv, arg);
590 case INSN_GP_SV: /* 76 */
594 GvSV(bstate->bs_sv) = arg;
597 case INSN_GP_REFCNT: /* 77 */
601 GvREFCNT(bstate->bs_sv) = arg;
604 case INSN_GP_REFCNT_ADD: /* 78 */
608 BSET_gp_refcnt_add(GvREFCNT(bstate->bs_sv), arg);
611 case INSN_GP_AV: /* 79 */
615 *(SV**)&GvAV(bstate->bs_sv) = arg;
618 case INSN_GP_HV: /* 80 */
622 *(SV**)&GvHV(bstate->bs_sv) = arg;
625 case INSN_GP_CV: /* 81 */
629 *(SV**)&GvCV(bstate->bs_sv) = arg;
632 case INSN_GP_FILE: /* 82 */
636 GvFILE(bstate->bs_sv) = arg;
639 case INSN_GP_IO: /* 83 */
643 *(SV**)&GvIOp(bstate->bs_sv) = arg;
646 case INSN_GP_FORM: /* 84 */
650 *(SV**)&GvFORM(bstate->bs_sv) = arg;
653 case INSN_GP_CVGEN: /* 85 */
657 GvCVGEN(bstate->bs_sv) = arg;
660 case INSN_GP_LINE: /* 86 */
664 GvLINE(bstate->bs_sv) = arg;
667 case INSN_GP_SHARE: /* 87 */
671 BSET_gp_share(bstate->bs_sv, arg);
674 case INSN_XGV_FLAGS: /* 88 */
678 GvFLAGS(bstate->bs_sv) = arg;
681 case INSN_OP_NEXT: /* 89 */
685 PL_op->op_next = arg;
688 case INSN_OP_SIBLING: /* 90 */
692 PL_op->op_sibling = arg;
695 case INSN_OP_PPADDR: /* 91 */
699 BSET_op_ppaddr(PL_op->op_ppaddr, arg);
702 case INSN_OP_TARG: /* 92 */
706 PL_op->op_targ = arg;
709 case INSN_OP_TYPE: /* 93 */
713 BSET_op_type(PL_op, arg);
716 case INSN_OP_SEQ: /* 94 */
723 case INSN_OP_FLAGS: /* 95 */
727 PL_op->op_flags = arg;
730 case INSN_OP_PRIVATE: /* 96 */
734 PL_op->op_private = arg;
737 case INSN_OP_FIRST: /* 97 */
741 cUNOP->op_first = arg;
744 case INSN_OP_LAST: /* 98 */
748 cBINOP->op_last = arg;
751 case INSN_OP_OTHER: /* 99 */
755 cLOGOP->op_other = arg;
758 case INSN_OP_PMREPLROOT: /* 100 */
762 cPMOP->op_pmreplroot = arg;
765 case INSN_OP_PMREPLSTART: /* 101 */
769 cPMOP->op_pmreplstart = arg;
772 case INSN_OP_PMNEXT: /* 102 */
776 *(OP**)&cPMOP->op_pmnext = arg;
780 case INSN_OP_PMSTASHPV: /* 103 */
784 cPMOP->op_pmstashpv = arg;
787 case INSN_OP_PMREPLROOTPO: /* 104 */
791 (PADOFFSET)cPMOP->op_pmreplroot = arg;
795 case INSN_OP_PMSTASH: /* 105 */
799 *(SV**)&cPMOP->op_pmstash = arg;
802 case INSN_OP_PMREPLROOTGV: /* 106 */
806 *(SV**)&cPMOP->op_pmreplroot = arg;
810 case INSN_PREGCOMP: /* 107 */
813 BGET_pvcontents(arg);
814 BSET_pregcomp(PL_op, arg);
817 case INSN_OP_PMFLAGS: /* 108 */
821 cPMOP->op_pmflags = arg;
824 case INSN_OP_PMPERMFLAGS: /* 109 */
828 cPMOP->op_pmpermflags = arg;
831 case INSN_OP_PMDYNFLAGS: /* 110 */
835 cPMOP->op_pmdynflags = arg;
838 case INSN_OP_SV: /* 111 */
845 case INSN_OP_PADIX: /* 112 */
849 cPADOP->op_padix = arg;
852 case INSN_OP_PV: /* 113 */
855 BGET_pvcontents(arg);
859 case INSN_OP_PV_TR: /* 114 */
862 BGET_op_tr_array(arg);
866 case INSN_OP_REDOOP: /* 115 */
870 cLOOP->op_redoop = arg;
873 case INSN_OP_NEXTOP: /* 116 */
877 cLOOP->op_nextop = arg;
880 case INSN_OP_LASTOP: /* 117 */
884 cLOOP->op_lastop = arg;
887 case INSN_COP_LABEL: /* 118 */
891 cCOP->cop_label = arg;
895 case INSN_COP_STASHPV: /* 119 */
899 BSET_cop_stashpv(cCOP, arg);
902 case INSN_COP_FILE: /* 120 */
906 BSET_cop_file(cCOP, arg);
910 case INSN_COP_STASH: /* 121 */
914 BSET_cop_stash(cCOP, arg);
917 case INSN_COP_FILEGV: /* 122 */
921 BSET_cop_filegv(cCOP, arg);
925 case INSN_COP_SEQ: /* 123 */
932 case INSN_COP_ARYBASE: /* 124 */
936 cCOP->cop_arybase = arg;
939 case INSN_COP_LINE: /* 125 */
943 cCOP->cop_line = arg;
946 case INSN_COP_IO: /* 126 */
953 case INSN_COP_WARNINGS: /* 127 */
957 cCOP->cop_warnings = arg;
960 case INSN_MAIN_START: /* 128 */
967 case INSN_MAIN_ROOT: /* 129 */
974 case INSN_MAIN_CV: /* 130 */
978 *(SV**)&PL_main_cv = arg;
981 case INSN_CURPAD: /* 131 */
985 BSET_curpad(PL_curpad, arg);
988 case INSN_PUSH_BEGIN: /* 132 */
992 BSET_push_begin(PL_beginav, arg);
995 case INSN_PUSH_INIT: /* 133 */
999 BSET_push_init(PL_initav, arg);
1002 case INSN_PUSH_END: /* 134 */
1006 BSET_push_end(PL_endav, arg);
1009 case INSN_CURSTASH: /* 135 */
1013 *(SV**)&PL_curstash = arg;
1016 case INSN_DEFSTASH: /* 136 */
1020 *(SV**)&PL_defstash = arg;
1023 case INSN_DATA: /* 137 */
1027 BSET_data(none, arg);
1030 case INSN_INCAV: /* 138 */
1034 *(SV**)&GvAVn(PL_incgv) = arg;
1037 case INSN_LOAD_GLOB: /* 139 */
1041 BSET_load_glob(none, arg);
1045 case INSN_REGEX_PADAV: /* 140 */
1049 *(SV**)&PL_regex_padav = arg;
1053 case INSN_DOWARN: /* 141 */
1060 case INSN_COMPPAD_NAME: /* 142 */
1064 *(SV**)&PL_comppad_name = arg;
1067 case INSN_XGV_STASH: /* 143 */
1071 *(SV**)&GvSTASH(bstate->bs_sv) = arg;
1074 case INSN_SIGNAL: /* 144 */
1078 BSET_signal(bstate->bs_sv, arg);
1081 case INSN_FORMFEED: /* 145 */
1089 Perl_croak(aTHX_ "Illegal bytecode instruction %d\n", insn);