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;
58 specialsv_list[0] = Nullsv;
59 specialsv_list[1] = &PL_sv_undef;
60 specialsv_list[2] = &PL_sv_yes;
61 specialsv_list[3] = &PL_sv_no;
62 specialsv_list[4] = pWARN_ALL;
63 specialsv_list[5] = pWARN_NONE;
65 while ((insn = BGET_FGETC()) != EOF) {
67 case INSN_COMMENT: /* 35 */
74 case INSN_NOP: /* 10 */
78 case INSN_RET: /* 0 */
83 case INSN_LDSV: /* 1 */
90 case INSN_LDOP: /* 2 */
97 case INSN_STSV: /* 3 */
101 BSET_OBJ_STORE(bstate->bs_sv, arg);
104 case INSN_STOP: /* 4 */
108 BSET_OBJ_STORE(PL_op, arg);
111 case INSN_STPV: /* 5 */
115 BSET_stpv(bstate->bs_pv.xpv_pv, arg);
118 case INSN_LDSPECSV: /* 6 */
122 BSET_ldspecsv(bstate->bs_sv, arg);
125 case INSN_NEWSV: /* 7 */
129 BSET_newsv(bstate->bs_sv, arg);
132 case INSN_NEWOP: /* 8 */
136 BSET_newop(PL_op, arg);
139 case INSN_NEWOPN: /* 9 */
143 BSET_newopn(PL_op, arg);
146 case INSN_NEWPV: /* 11 */
152 case INSN_PV_CUR: /* 12 */
156 bstate->bs_pv.xpv_cur = arg;
159 case INSN_PV_FREE: /* 13 */
161 BSET_pv_free(bstate->bs_pv);
164 case INSN_SV_UPGRADE: /* 14 */
168 BSET_sv_upgrade(bstate->bs_sv, arg);
171 case INSN_SV_REFCNT: /* 15 */
175 SvREFCNT(bstate->bs_sv) = arg;
178 case INSN_SV_REFCNT_ADD: /* 16 */
182 BSET_sv_refcnt_add(SvREFCNT(bstate->bs_sv), arg);
185 case INSN_SV_FLAGS: /* 17 */
189 SvFLAGS(bstate->bs_sv) = arg;
192 case INSN_XRV: /* 18 */
196 SvRV(bstate->bs_sv) = arg;
199 case INSN_XPV: /* 19 */
201 BSET_xpv(bstate->bs_sv);
204 case INSN_XIV32: /* 20 */
208 SvIVX(bstate->bs_sv) = arg;
211 case INSN_XIV64: /* 21 */
215 SvIVX(bstate->bs_sv) = arg;
218 case INSN_XNV: /* 22 */
222 SvNVX(bstate->bs_sv) = arg;
225 case INSN_XLV_TARGOFF: /* 23 */
229 LvTARGOFF(bstate->bs_sv) = arg;
232 case INSN_XLV_TARGLEN: /* 24 */
236 LvTARGLEN(bstate->bs_sv) = arg;
239 case INSN_XLV_TARG: /* 25 */
243 LvTARG(bstate->bs_sv) = arg;
246 case INSN_XLV_TYPE: /* 26 */
250 LvTYPE(bstate->bs_sv) = arg;
253 case INSN_XBM_USEFUL: /* 27 */
257 BmUSEFUL(bstate->bs_sv) = arg;
260 case INSN_XBM_PREVIOUS: /* 28 */
264 BmPREVIOUS(bstate->bs_sv) = arg;
267 case INSN_XBM_RARE: /* 29 */
271 BmRARE(bstate->bs_sv) = arg;
274 case INSN_XFM_LINES: /* 30 */
278 FmLINES(bstate->bs_sv) = arg;
281 case INSN_XIO_LINES: /* 31 */
285 IoLINES(bstate->bs_sv) = arg;
288 case INSN_XIO_PAGE: /* 32 */
292 IoPAGE(bstate->bs_sv) = arg;
295 case INSN_XIO_PAGE_LEN: /* 33 */
299 IoPAGE_LEN(bstate->bs_sv) = arg;
302 case INSN_XIO_LINES_LEFT: /* 34 */
306 IoLINES_LEFT(bstate->bs_sv) = arg;
309 case INSN_XIO_TOP_NAME: /* 36 */
312 BGET_pvcontents(arg);
313 IoTOP_NAME(bstate->bs_sv) = arg;
316 case INSN_XIO_TOP_GV: /* 37 */
320 *(SV**)&IoTOP_GV(bstate->bs_sv) = arg;
323 case INSN_XIO_FMT_NAME: /* 38 */
326 BGET_pvcontents(arg);
327 IoFMT_NAME(bstate->bs_sv) = arg;
330 case INSN_XIO_FMT_GV: /* 39 */
334 *(SV**)&IoFMT_GV(bstate->bs_sv) = arg;
337 case INSN_XIO_BOTTOM_NAME: /* 40 */
340 BGET_pvcontents(arg);
341 IoBOTTOM_NAME(bstate->bs_sv) = arg;
344 case INSN_XIO_BOTTOM_GV: /* 41 */
348 *(SV**)&IoBOTTOM_GV(bstate->bs_sv) = arg;
351 case INSN_XIO_SUBPROCESS: /* 42 */
355 IoSUBPROCESS(bstate->bs_sv) = arg;
358 case INSN_XIO_TYPE: /* 43 */
362 IoTYPE(bstate->bs_sv) = arg;
365 case INSN_XIO_FLAGS: /* 44 */
369 IoFLAGS(bstate->bs_sv) = arg;
372 case INSN_XCV_STASH: /* 45 */
376 *(SV**)&CvSTASH(bstate->bs_sv) = arg;
379 case INSN_XCV_START: /* 46 */
383 CvSTART(bstate->bs_sv) = arg;
386 case INSN_XCV_ROOT: /* 47 */
390 CvROOT(bstate->bs_sv) = arg;
393 case INSN_XCV_GV: /* 48 */
397 *(SV**)&CvGV(bstate->bs_sv) = arg;
400 case INSN_XCV_FILE: /* 49 */
404 CvFILE(bstate->bs_sv) = arg;
407 case INSN_XCV_DEPTH: /* 50 */
411 CvDEPTH(bstate->bs_sv) = arg;
414 case INSN_XCV_PADLIST: /* 51 */
418 *(SV**)&CvPADLIST(bstate->bs_sv) = arg;
421 case INSN_XCV_OUTSIDE: /* 52 */
425 *(SV**)&CvOUTSIDE(bstate->bs_sv) = arg;
428 case INSN_XCV_OUTSIDE_SEQ: /* 53 */
432 CvOUTSIDE_SEQ(bstate->bs_sv) = arg;
435 case INSN_XCV_FLAGS: /* 54 */
439 CvFLAGS(bstate->bs_sv) = arg;
442 case INSN_AV_EXTEND: /* 55 */
446 BSET_av_extend(bstate->bs_sv, arg);
449 case INSN_AV_PUSH: /* 56 */
453 BSET_av_push(bstate->bs_sv, arg);
456 case INSN_XAV_FILL: /* 57 */
460 AvFILLp(bstate->bs_sv) = arg;
463 case INSN_XAV_MAX: /* 58 */
467 AvMAX(bstate->bs_sv) = arg;
470 case INSN_XAV_FLAGS: /* 59 */
474 AvFLAGS(bstate->bs_sv) = arg;
477 case INSN_XHV_RITER: /* 60 */
481 HvRITER(bstate->bs_sv) = arg;
484 case INSN_XHV_NAME: /* 61 */
487 BGET_pvcontents(arg);
488 HvNAME(bstate->bs_sv) = arg;
491 case INSN_HV_STORE: /* 62 */
495 BSET_hv_store(bstate->bs_sv, arg);
498 case INSN_SV_MAGIC: /* 63 */
502 BSET_sv_magic(bstate->bs_sv, arg);
505 case INSN_MG_OBJ: /* 64 */
509 SvMAGIC(bstate->bs_sv)->mg_obj = arg;
512 case INSN_MG_PRIVATE: /* 65 */
516 SvMAGIC(bstate->bs_sv)->mg_private = arg;
519 case INSN_MG_FLAGS: /* 66 */
523 SvMAGIC(bstate->bs_sv)->mg_flags = arg;
526 case INSN_MG_PV: /* 67 */
529 BGET_pvcontents(arg);
530 BSET_mg_pv(SvMAGIC(bstate->bs_sv), arg);
533 case INSN_XMG_STASH: /* 68 */
537 *(SV**)&SvSTASH(bstate->bs_sv) = arg;
540 case INSN_GV_FETCHPV: /* 69 */
544 BSET_gv_fetchpv(bstate->bs_sv, arg);
547 case INSN_GV_STASHPV: /* 70 */
551 BSET_gv_stashpv(bstate->bs_sv, arg);
554 case INSN_GP_SV: /* 71 */
558 GvSV(bstate->bs_sv) = arg;
561 case INSN_GP_REFCNT: /* 72 */
565 GvREFCNT(bstate->bs_sv) = arg;
568 case INSN_GP_REFCNT_ADD: /* 73 */
572 BSET_gp_refcnt_add(GvREFCNT(bstate->bs_sv), arg);
575 case INSN_GP_AV: /* 74 */
579 *(SV**)&GvAV(bstate->bs_sv) = arg;
582 case INSN_GP_HV: /* 75 */
586 *(SV**)&GvHV(bstate->bs_sv) = arg;
589 case INSN_GP_CV: /* 76 */
593 *(SV**)&GvCV(bstate->bs_sv) = arg;
596 case INSN_GP_FILE: /* 77 */
600 GvFILE(bstate->bs_sv) = arg;
603 case INSN_GP_IO: /* 78 */
607 *(SV**)&GvIOp(bstate->bs_sv) = arg;
610 case INSN_GP_FORM: /* 79 */
614 *(SV**)&GvFORM(bstate->bs_sv) = arg;
617 case INSN_GP_CVGEN: /* 80 */
621 GvCVGEN(bstate->bs_sv) = arg;
624 case INSN_GP_LINE: /* 81 */
628 GvLINE(bstate->bs_sv) = arg;
631 case INSN_GP_SHARE: /* 82 */
635 BSET_gp_share(bstate->bs_sv, arg);
638 case INSN_XGV_FLAGS: /* 83 */
642 GvFLAGS(bstate->bs_sv) = arg;
645 case INSN_OP_NEXT: /* 84 */
649 PL_op->op_next = arg;
652 case INSN_OP_SIBLING: /* 85 */
656 PL_op->op_sibling = arg;
659 case INSN_OP_PPADDR: /* 86 */
663 BSET_op_ppaddr(PL_op->op_ppaddr, arg);
666 case INSN_OP_TARG: /* 87 */
670 PL_op->op_targ = arg;
673 case INSN_OP_TYPE: /* 88 */
677 BSET_op_type(PL_op, arg);
680 case INSN_OP_SEQ: /* 89 */
687 case INSN_OP_FLAGS: /* 90 */
691 PL_op->op_flags = arg;
694 case INSN_OP_PRIVATE: /* 91 */
698 PL_op->op_private = arg;
701 case INSN_OP_FIRST: /* 92 */
705 cUNOP->op_first = arg;
708 case INSN_OP_LAST: /* 93 */
712 cBINOP->op_last = arg;
715 case INSN_OP_OTHER: /* 94 */
719 cLOGOP->op_other = arg;
722 case INSN_OP_PMREPLROOT: /* 95 */
726 cPMOP->op_pmreplroot = arg;
729 case INSN_OP_PMREPLROOTGV: /* 96 */
733 *(SV**)&cPMOP->op_pmreplroot = arg;
736 case INSN_OP_PMREPLSTART: /* 97 */
740 cPMOP->op_pmreplstart = arg;
743 case INSN_OP_PMNEXT: /* 98 */
747 *(OP**)&cPMOP->op_pmnext = arg;
750 case INSN_PREGCOMP: /* 99 */
753 BGET_pvcontents(arg);
754 BSET_pregcomp(PL_op, arg);
757 case INSN_OP_PMFLAGS: /* 100 */
761 cPMOP->op_pmflags = arg;
764 case INSN_OP_PMPERMFLAGS: /* 101 */
768 cPMOP->op_pmpermflags = arg;
771 case INSN_OP_SV: /* 102 */
778 case INSN_OP_PADIX: /* 103 */
782 cPADOP->op_padix = arg;
785 case INSN_OP_PV: /* 104 */
788 BGET_pvcontents(arg);
792 case INSN_OP_PV_TR: /* 105 */
795 BGET_op_tr_array(arg);
799 case INSN_OP_REDOOP: /* 106 */
803 cLOOP->op_redoop = arg;
806 case INSN_OP_NEXTOP: /* 107 */
810 cLOOP->op_nextop = arg;
813 case INSN_OP_LASTOP: /* 108 */
817 cLOOP->op_lastop = arg;
820 case INSN_COP_LABEL: /* 109 */
824 cCOP->cop_label = arg;
827 case INSN_COP_STASHPV: /* 110 */
831 BSET_cop_stashpv(cCOP, arg);
834 case INSN_COP_FILE: /* 111 */
838 BSET_cop_file(cCOP, arg);
841 case INSN_COP_SEQ: /* 112 */
848 case INSN_COP_ARYBASE: /* 113 */
852 cCOP->cop_arybase = arg;
855 case INSN_COP_LINE: /* 114 */
859 BSET_cop_line(cCOP, arg);
862 case INSN_COP_WARNINGS: /* 115 */
866 cCOP->cop_warnings = arg;
869 case INSN_MAIN_START: /* 116 */
876 case INSN_MAIN_ROOT: /* 117 */
883 case INSN_CURPAD: /* 118 */
887 BSET_curpad(PL_curpad, arg);
890 case INSN_PUSH_BEGIN: /* 119 */
894 BSET_push_begin(PL_beginav, arg);
897 case INSN_PUSH_INIT: /* 120 */
901 BSET_push_init(PL_initav, arg);
904 case INSN_PUSH_END: /* 121 */
908 BSET_push_end(PL_endav, arg);
912 Perl_croak(aTHX_ "Illegal bytecode instruction %d\n", insn);