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)
53 SV *specialsv_list[6];
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 */
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;
68 while ((insn = BGET_FGETC()) != EOF) {
70 case INSN_COMMENT: /* 35 */
77 case INSN_NOP: /* 10 */
81 case INSN_RET: /* 0 */
86 case INSN_LDSV: /* 1 */
93 case INSN_LDOP: /* 2 */
100 case INSN_STSV: /* 3 */
104 BSET_OBJ_STORE(bstate->bs_sv, arg);
107 case INSN_STOP: /* 4 */
111 BSET_OBJ_STORE(PL_op, arg);
114 case INSN_STPV: /* 5 */
118 BSET_stpv(bstate->bs_pv.xpv_pv, arg);
121 case INSN_LDSPECSV: /* 6 */
125 BSET_ldspecsv(bstate->bs_sv, arg);
128 case INSN_LDSPECSVX: /* 7 */
132 BSET_ldspecsvx(bstate->bs_sv, arg);
135 case INSN_NEWSV: /* 8 */
139 BSET_newsv(bstate->bs_sv, arg);
142 case INSN_NEWSVX: /* 9 */
146 BSET_newsvx(bstate->bs_sv, arg);
149 case INSN_NEWOP: /* 11 */
153 BSET_newop(PL_op, arg);
156 case INSN_NEWOPX: /* 12 */
160 BSET_newopx(PL_op, arg);
163 case INSN_NEWOPN: /* 13 */
167 BSET_newopn(PL_op, arg);
170 case INSN_NEWPV: /* 14 */
176 case INSN_PV_CUR: /* 15 */
180 bstate->bs_pv.xpv_cur = arg;
183 case INSN_PV_FREE: /* 16 */
185 BSET_pv_free(bstate->bs_pv);
188 case INSN_SV_UPGRADE: /* 17 */
192 BSET_sv_upgrade(bstate->bs_sv, arg);
195 case INSN_SV_REFCNT: /* 18 */
199 SvREFCNT(bstate->bs_sv) = arg;
202 case INSN_SV_REFCNT_ADD: /* 19 */
206 BSET_sv_refcnt_add(SvREFCNT(bstate->bs_sv), arg);
209 case INSN_SV_FLAGS: /* 20 */
213 SvFLAGS(bstate->bs_sv) = arg;
216 case INSN_XRV: /* 21 */
220 BSET_xrv(bstate->bs_sv, arg);
223 case INSN_XPV: /* 22 */
225 BSET_xpv(bstate->bs_sv);
228 case INSN_XPV_CUR: /* 23 */
232 BSET_xpv_cur(bstate->bs_sv, arg);
235 case INSN_XPV_LEN: /* 24 */
239 BSET_xpv_len(bstate->bs_sv, arg);
242 case INSN_XIV: /* 25 */
246 BSET_xiv(bstate->bs_sv, arg);
249 case INSN_XNV: /* 26 */
253 BSET_xnv(bstate->bs_sv, arg);
256 case INSN_XLV_TARGOFF: /* 27 */
260 LvTARGOFF(bstate->bs_sv) = arg;
263 case INSN_XLV_TARGLEN: /* 28 */
267 LvTARGLEN(bstate->bs_sv) = arg;
270 case INSN_XLV_TARG: /* 29 */
274 LvTARG(bstate->bs_sv) = arg;
277 case INSN_XLV_TYPE: /* 30 */
281 LvTYPE(bstate->bs_sv) = arg;
284 case INSN_XBM_USEFUL: /* 31 */
288 BmUSEFUL(bstate->bs_sv) = arg;
291 case INSN_XBM_PREVIOUS: /* 32 */
295 BmPREVIOUS(bstate->bs_sv) = arg;
298 case INSN_XBM_RARE: /* 33 */
302 BmRARE(bstate->bs_sv) = arg;
305 case INSN_XFM_LINES: /* 34 */
309 FmLINES(bstate->bs_sv) = arg;
312 case INSN_XIO_LINES: /* 36 */
316 IoLINES(bstate->bs_sv) = arg;
319 case INSN_XIO_PAGE: /* 37 */
323 IoPAGE(bstate->bs_sv) = arg;
326 case INSN_XIO_PAGE_LEN: /* 38 */
330 IoPAGE_LEN(bstate->bs_sv) = arg;
333 case INSN_XIO_LINES_LEFT: /* 39 */
337 IoLINES_LEFT(bstate->bs_sv) = arg;
340 case INSN_XIO_TOP_NAME: /* 40 */
344 IoTOP_NAME(bstate->bs_sv) = arg;
347 case INSN_XIO_TOP_GV: /* 41 */
351 *(SV**)&IoTOP_GV(bstate->bs_sv) = arg;
354 case INSN_XIO_FMT_NAME: /* 42 */
358 IoFMT_NAME(bstate->bs_sv) = arg;
361 case INSN_XIO_FMT_GV: /* 43 */
365 *(SV**)&IoFMT_GV(bstate->bs_sv) = arg;
368 case INSN_XIO_BOTTOM_NAME: /* 44 */
372 IoBOTTOM_NAME(bstate->bs_sv) = arg;
375 case INSN_XIO_BOTTOM_GV: /* 45 */
379 *(SV**)&IoBOTTOM_GV(bstate->bs_sv) = arg;
382 case INSN_XIO_SUBPROCESS: /* 46 */
386 IoSUBPROCESS(bstate->bs_sv) = arg;
389 case INSN_XIO_TYPE: /* 47 */
393 IoTYPE(bstate->bs_sv) = arg;
396 case INSN_XIO_FLAGS: /* 48 */
400 IoFLAGS(bstate->bs_sv) = arg;
403 case INSN_XCV_XSUBANY: /* 49 */
407 *(SV**)&CvXSUBANY(bstate->bs_sv).any_ptr = arg;
410 case INSN_XCV_STASH: /* 50 */
414 *(SV**)&CvSTASH(bstate->bs_sv) = arg;
417 case INSN_XCV_START: /* 51 */
421 CvSTART(bstate->bs_sv) = arg;
424 case INSN_XCV_ROOT: /* 52 */
428 CvROOT(bstate->bs_sv) = arg;
431 case INSN_XCV_GV: /* 53 */
435 *(SV**)&CvGV(bstate->bs_sv) = arg;
438 case INSN_XCV_FILE: /* 54 */
442 CvFILE(bstate->bs_sv) = arg;
445 case INSN_XCV_DEPTH: /* 55 */
449 CvDEPTH(bstate->bs_sv) = arg;
452 case INSN_XCV_PADLIST: /* 56 */
456 *(SV**)&CvPADLIST(bstate->bs_sv) = arg;
459 case INSN_XCV_OUTSIDE: /* 57 */
463 *(SV**)&CvOUTSIDE(bstate->bs_sv) = arg;
466 case INSN_XCV_OUTSIDE_SEQ: /* 58 */
470 CvOUTSIDE_SEQ(bstate->bs_sv) = arg;
473 case INSN_XCV_FLAGS: /* 59 */
477 CvFLAGS(bstate->bs_sv) = arg;
480 case INSN_AV_EXTEND: /* 60 */
484 BSET_av_extend(bstate->bs_sv, arg);
487 case INSN_AV_PUSHX: /* 61 */
491 BSET_av_pushx(bstate->bs_sv, arg);
494 case INSN_AV_PUSH: /* 62 */
498 BSET_av_push(bstate->bs_sv, arg);
501 case INSN_XAV_FILL: /* 63 */
505 AvFILLp(bstate->bs_sv) = arg;
508 case INSN_XAV_MAX: /* 64 */
512 AvMAX(bstate->bs_sv) = arg;
515 case INSN_XAV_FLAGS: /* 65 */
519 AvFLAGS(bstate->bs_sv) = arg;
522 case INSN_XHV_RITER: /* 66 */
526 HvRITER(bstate->bs_sv) = arg;
529 case INSN_XHV_NAME: /* 67 */
533 HvNAME(bstate->bs_sv) = arg;
536 case INSN_XHV_PMROOT: /* 68 */
540 *(OP**)&HvPMROOT(bstate->bs_sv) = arg;
543 case INSN_HV_STORE: /* 69 */
547 BSET_hv_store(bstate->bs_sv, arg);
550 case INSN_SV_MAGIC: /* 70 */
554 BSET_sv_magic(bstate->bs_sv, arg);
557 case INSN_MG_OBJ: /* 71 */
561 SvMAGIC(bstate->bs_sv)->mg_obj = arg;
564 case INSN_MG_PRIVATE: /* 72 */
568 SvMAGIC(bstate->bs_sv)->mg_private = arg;
571 case INSN_MG_FLAGS: /* 73 */
575 SvMAGIC(bstate->bs_sv)->mg_flags = arg;
578 case INSN_MG_NAME: /* 74 */
581 BGET_pvcontents(arg);
582 BSET_mg_name(SvMAGIC(bstate->bs_sv), arg);
585 case INSN_MG_NAMEX: /* 75 */
589 BSET_mg_namex(SvMAGIC(bstate->bs_sv), arg);
592 case INSN_XMG_STASH: /* 76 */
599 case INSN_GV_FETCHPV: /* 77 */
603 BSET_gv_fetchpv(bstate->bs_sv, arg);
606 case INSN_GV_FETCHPVX: /* 78 */
610 BSET_gv_fetchpvx(bstate->bs_sv, arg);
613 case INSN_GV_STASHPV: /* 79 */
617 BSET_gv_stashpv(bstate->bs_sv, arg);
620 case INSN_GV_STASHPVX: /* 80 */
624 BSET_gv_stashpvx(bstate->bs_sv, arg);
627 case INSN_GP_SV: /* 81 */
631 GvSV(bstate->bs_sv) = arg;
634 case INSN_GP_REFCNT: /* 82 */
638 GvREFCNT(bstate->bs_sv) = arg;
641 case INSN_GP_REFCNT_ADD: /* 83 */
645 BSET_gp_refcnt_add(GvREFCNT(bstate->bs_sv), arg);
648 case INSN_GP_AV: /* 84 */
652 *(SV**)&GvAV(bstate->bs_sv) = arg;
655 case INSN_GP_HV: /* 85 */
659 *(SV**)&GvHV(bstate->bs_sv) = arg;
662 case INSN_GP_CV: /* 86 */
666 *(SV**)&GvCV(bstate->bs_sv) = arg;
669 case INSN_GP_FILE: /* 87 */
673 GvFILE(bstate->bs_sv) = arg;
676 case INSN_GP_IO: /* 88 */
680 *(SV**)&GvIOp(bstate->bs_sv) = arg;
683 case INSN_GP_FORM: /* 89 */
687 *(SV**)&GvFORM(bstate->bs_sv) = arg;
690 case INSN_GP_CVGEN: /* 90 */
694 GvCVGEN(bstate->bs_sv) = arg;
697 case INSN_GP_LINE: /* 91 */
701 GvLINE(bstate->bs_sv) = arg;
704 case INSN_GP_SHARE: /* 92 */
708 BSET_gp_share(bstate->bs_sv, arg);
711 case INSN_XGV_FLAGS: /* 93 */
715 GvFLAGS(bstate->bs_sv) = arg;
718 case INSN_OP_NEXT: /* 94 */
722 PL_op->op_next = arg;
725 case INSN_OP_SIBLING: /* 95 */
729 PL_op->op_sibling = arg;
732 case INSN_OP_PPADDR: /* 96 */
736 BSET_op_ppaddr(PL_op->op_ppaddr, arg);
739 case INSN_OP_TARG: /* 97 */
743 PL_op->op_targ = arg;
746 case INSN_OP_TYPE: /* 98 */
750 BSET_op_type(PL_op, arg);
753 case INSN_OP_OPT: /* 99 */
760 case INSN_OP_STATIC: /* 100 */
764 PL_op->op_static = arg;
767 case INSN_OP_FLAGS: /* 101 */
771 PL_op->op_flags = arg;
774 case INSN_OP_PRIVATE: /* 102 */
778 PL_op->op_private = arg;
781 case INSN_OP_FIRST: /* 103 */
785 cUNOP->op_first = arg;
788 case INSN_OP_LAST: /* 104 */
792 cBINOP->op_last = arg;
795 case INSN_OP_OTHER: /* 105 */
799 cLOGOP->op_other = arg;
802 case INSN_OP_PMREPLROOT: /* 106 */
806 cPMOP->op_pmreplroot = arg;
809 case INSN_OP_PMREPLSTART: /* 107 */
813 cPMOP->op_pmreplstart = arg;
816 case INSN_OP_PMNEXT: /* 108 */
820 *(OP**)&cPMOP->op_pmnext = arg;
824 case INSN_OP_PMSTASHPV: /* 109 */
828 BSET_op_pmstashpv(cPMOP, arg);
831 case INSN_OP_PMREPLROOTPO: /* 110 */
835 cPMOP->op_pmreplroot = (OP*)arg;
839 case INSN_OP_PMSTASH: /* 111 */
843 *(SV**)&cPMOP->op_pmstash = arg;
846 case INSN_OP_PMREPLROOTGV: /* 112 */
850 *(SV**)&cPMOP->op_pmreplroot = arg;
854 case INSN_PREGCOMP: /* 113 */
857 BGET_pvcontents(arg);
858 BSET_pregcomp(PL_op, arg);
861 case INSN_OP_PMFLAGS: /* 114 */
865 cPMOP->op_pmflags = arg;
868 case INSN_OP_PMPERMFLAGS: /* 115 */
872 cPMOP->op_pmpermflags = arg;
875 case INSN_OP_PMDYNFLAGS: /* 116 */
879 cPMOP->op_pmdynflags = arg;
882 case INSN_OP_SV: /* 117 */
889 case INSN_OP_PADIX: /* 118 */
893 cPADOP->op_padix = arg;
896 case INSN_OP_PV: /* 119 */
899 BGET_pvcontents(arg);
903 case INSN_OP_PV_TR: /* 120 */
906 BGET_op_tr_array(arg);
910 case INSN_OP_REDOOP: /* 121 */
914 cLOOP->op_redoop = arg;
917 case INSN_OP_NEXTOP: /* 122 */
921 cLOOP->op_nextop = arg;
924 case INSN_OP_LASTOP: /* 123 */
928 cLOOP->op_lastop = arg;
931 case INSN_COP_LABEL: /* 124 */
935 cCOP->cop_label = arg;
939 case INSN_COP_STASHPV: /* 125 */
943 BSET_cop_stashpv(cCOP, arg);
946 case INSN_COP_FILE: /* 126 */
950 BSET_cop_file(cCOP, arg);
954 case INSN_COP_STASH: /* 127 */
958 BSET_cop_stash(cCOP, arg);
961 case INSN_COP_FILEGV: /* 128 */
965 BSET_cop_filegv(cCOP, arg);
969 case INSN_COP_SEQ: /* 129 */
976 case INSN_COP_ARYBASE: /* 130 */
980 cCOP->cop_arybase = arg;
983 case INSN_COP_LINE: /* 131 */
987 cCOP->cop_line = arg;
990 case INSN_COP_IO: /* 132 */
997 case INSN_COP_WARNINGS: /* 133 */
1001 cCOP->cop_warnings = arg;
1004 case INSN_MAIN_START: /* 134 */
1008 PL_main_start = arg;
1011 case INSN_MAIN_ROOT: /* 135 */
1018 case INSN_MAIN_CV: /* 136 */
1022 *(SV**)&PL_main_cv = arg;
1025 case INSN_CURPAD: /* 137 */
1029 BSET_curpad(PL_curpad, arg);
1032 case INSN_PUSH_BEGIN: /* 138 */
1036 BSET_push_begin(PL_beginav, arg);
1039 case INSN_PUSH_INIT: /* 139 */
1043 BSET_push_init(PL_initav, arg);
1046 case INSN_PUSH_END: /* 140 */
1050 BSET_push_end(PL_endav, arg);
1053 case INSN_CURSTASH: /* 141 */
1057 *(SV**)&PL_curstash = arg;
1060 case INSN_DEFSTASH: /* 142 */
1064 *(SV**)&PL_defstash = arg;
1067 case INSN_DATA: /* 143 */
1071 BSET_data(none, arg);
1074 case INSN_INCAV: /* 144 */
1078 *(SV**)&GvAV(PL_incgv) = arg;
1081 case INSN_LOAD_GLOB: /* 145 */
1085 BSET_load_glob(none, arg);
1089 case INSN_REGEX_PADAV: /* 146 */
1093 *(SV**)&PL_regex_padav = arg;
1097 case INSN_DOWARN: /* 147 */
1104 case INSN_COMPPAD_NAME: /* 148 */
1108 *(SV**)&PL_comppad_name = arg;
1111 case INSN_XGV_STASH: /* 149 */
1115 *(SV**)&GvSTASH(bstate->bs_sv) = arg;
1118 case INSN_SIGNAL: /* 150 */
1122 BSET_signal(bstate->bs_sv, arg);
1125 case INSN_FORMFEED: /* 151 */
1133 Perl_croak(aTHX_ "Illegal bytecode instruction %d\n", insn);