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
20 #define CALL_FPTR(fptr) (pPerl->*fptr)
22 #define PL_ppaddr (*get_ppaddr())
29 static const int optype_size[] = {
43 static int bytecode_iv_overflows = 0;
44 static void **bytecode_obj_list = Null(void**);
45 static I32 bytecode_obj_list_fill = -1;
48 bset_obj_store(pTHXo_ void *obj, I32 ix)
50 if (ix > bytecode_obj_list_fill) {
51 if (bytecode_obj_list_fill == -1)
52 New(666, bytecode_obj_list, ix + 32, void*);
54 Renew(bytecode_obj_list, ix + 32, void*);
55 bytecode_obj_list_fill = ix;
57 bytecode_obj_list[ix] = obj;
68 SV *specialsv_list[6];
70 SAVEVPTR(bytecode_obj_list);
71 SAVEI32(bytecode_obj_list_fill);
72 bytecode_obj_list = Null(void**);
73 bytecode_obj_list_fill = -1;
75 BYTECODE_HEADER_CHECK; /* croak if incorrect platform */
76 specialsv_list[0] = Nullsv;
77 specialsv_list[1] = &PL_sv_undef;
78 specialsv_list[2] = &PL_sv_yes;
79 specialsv_list[3] = &PL_sv_no;
80 specialsv_list[4] = pWARN_ALL;
81 specialsv_list[5] = pWARN_NONE;
83 while ((insn = BGET_FGETC()) != EOF) {
85 case INSN_COMMENT: /* 35 */
92 case INSN_NOP: /* 10 */
96 case INSN_RET: /* 0 */
101 case INSN_LDSV: /* 1 */
108 case INSN_LDOP: /* 2 */
115 case INSN_STSV: /* 3 */
119 BSET_OBJ_STORE(bytecode_sv, arg);
122 case INSN_STOP: /* 4 */
126 BSET_OBJ_STORE(PL_op, arg);
129 case INSN_LDSPECSV: /* 5 */
133 BSET_ldspecsv(bytecode_sv, arg);
136 case INSN_NEWSV: /* 6 */
140 BSET_newsv(bytecode_sv, arg);
143 case INSN_NEWOP: /* 7 */
147 BSET_newop(PL_op, arg);
150 case INSN_NEWOPN: /* 8 */
154 BSET_newopn(PL_op, arg);
157 case INSN_NEWPV: /* 9 */
163 case INSN_PV_CUR: /* 11 */
167 bytecode_pv.xpv_cur = arg;
170 case INSN_PV_FREE: /* 12 */
172 BSET_pv_free(bytecode_pv);
175 case INSN_SV_UPGRADE: /* 13 */
179 BSET_sv_upgrade(bytecode_sv, arg);
182 case INSN_SV_REFCNT: /* 14 */
186 SvREFCNT(bytecode_sv) = arg;
189 case INSN_SV_REFCNT_ADD: /* 15 */
193 BSET_sv_refcnt_add(SvREFCNT(bytecode_sv), arg);
196 case INSN_SV_FLAGS: /* 16 */
200 SvFLAGS(bytecode_sv) = arg;
203 case INSN_XRV: /* 17 */
207 SvRV(bytecode_sv) = arg;
210 case INSN_XPV: /* 18 */
212 BSET_xpv(bytecode_sv);
215 case INSN_XIV32: /* 19 */
219 SvIVX(bytecode_sv) = arg;
222 case INSN_XIV64: /* 20 */
226 SvIVX(bytecode_sv) = arg;
229 case INSN_XNV: /* 21 */
233 SvNVX(bytecode_sv) = arg;
236 case INSN_XLV_TARGOFF: /* 22 */
240 LvTARGOFF(bytecode_sv) = arg;
243 case INSN_XLV_TARGLEN: /* 23 */
247 LvTARGLEN(bytecode_sv) = arg;
250 case INSN_XLV_TARG: /* 24 */
254 LvTARG(bytecode_sv) = arg;
257 case INSN_XLV_TYPE: /* 25 */
261 LvTYPE(bytecode_sv) = arg;
264 case INSN_XBM_USEFUL: /* 26 */
268 BmUSEFUL(bytecode_sv) = arg;
271 case INSN_XBM_PREVIOUS: /* 27 */
275 BmPREVIOUS(bytecode_sv) = arg;
278 case INSN_XBM_RARE: /* 28 */
282 BmRARE(bytecode_sv) = arg;
285 case INSN_XFM_LINES: /* 29 */
289 FmLINES(bytecode_sv) = arg;
292 case INSN_XIO_LINES: /* 30 */
296 IoLINES(bytecode_sv) = arg;
299 case INSN_XIO_PAGE: /* 31 */
303 IoPAGE(bytecode_sv) = arg;
306 case INSN_XIO_PAGE_LEN: /* 32 */
310 IoPAGE_LEN(bytecode_sv) = arg;
313 case INSN_XIO_LINES_LEFT: /* 33 */
317 IoLINES_LEFT(bytecode_sv) = arg;
320 case INSN_XIO_TOP_NAME: /* 34 */
323 BGET_pvcontents(arg);
324 IoTOP_NAME(bytecode_sv) = arg;
327 case INSN_XIO_TOP_GV: /* 36 */
331 *(SV**)&IoTOP_GV(bytecode_sv) = arg;
334 case INSN_XIO_FMT_NAME: /* 37 */
337 BGET_pvcontents(arg);
338 IoFMT_NAME(bytecode_sv) = arg;
341 case INSN_XIO_FMT_GV: /* 38 */
345 *(SV**)&IoFMT_GV(bytecode_sv) = arg;
348 case INSN_XIO_BOTTOM_NAME: /* 39 */
351 BGET_pvcontents(arg);
352 IoBOTTOM_NAME(bytecode_sv) = arg;
355 case INSN_XIO_BOTTOM_GV: /* 40 */
359 *(SV**)&IoBOTTOM_GV(bytecode_sv) = arg;
362 case INSN_XIO_SUBPROCESS: /* 41 */
366 IoSUBPROCESS(bytecode_sv) = arg;
369 case INSN_XIO_TYPE: /* 42 */
373 IoTYPE(bytecode_sv) = arg;
376 case INSN_XIO_FLAGS: /* 43 */
380 IoFLAGS(bytecode_sv) = arg;
383 case INSN_XCV_STASH: /* 44 */
387 *(SV**)&CvSTASH(bytecode_sv) = arg;
390 case INSN_XCV_START: /* 45 */
394 CvSTART(bytecode_sv) = arg;
397 case INSN_XCV_ROOT: /* 46 */
401 CvROOT(bytecode_sv) = arg;
404 case INSN_XCV_GV: /* 47 */
408 *(SV**)&CvGV(bytecode_sv) = arg;
411 case INSN_XCV_FILE: /* 48 */
414 BGET_pvcontents(arg);
415 CvFILE(bytecode_sv) = arg;
418 case INSN_XCV_DEPTH: /* 49 */
422 CvDEPTH(bytecode_sv) = arg;
425 case INSN_XCV_PADLIST: /* 50 */
429 *(SV**)&CvPADLIST(bytecode_sv) = arg;
432 case INSN_XCV_OUTSIDE: /* 51 */
436 *(SV**)&CvOUTSIDE(bytecode_sv) = arg;
439 case INSN_XCV_FLAGS: /* 52 */
443 CvFLAGS(bytecode_sv) = arg;
446 case INSN_AV_EXTEND: /* 53 */
450 BSET_av_extend(bytecode_sv, arg);
453 case INSN_AV_PUSH: /* 54 */
457 BSET_av_push(bytecode_sv, arg);
460 case INSN_XAV_FILL: /* 55 */
464 AvFILLp(bytecode_sv) = arg;
467 case INSN_XAV_MAX: /* 56 */
471 AvMAX(bytecode_sv) = arg;
474 case INSN_XAV_FLAGS: /* 57 */
478 AvFLAGS(bytecode_sv) = arg;
481 case INSN_XHV_RITER: /* 58 */
485 HvRITER(bytecode_sv) = arg;
488 case INSN_XHV_NAME: /* 59 */
491 BGET_pvcontents(arg);
492 HvNAME(bytecode_sv) = arg;
495 case INSN_HV_STORE: /* 60 */
499 BSET_hv_store(bytecode_sv, arg);
502 case INSN_SV_MAGIC: /* 61 */
506 BSET_sv_magic(bytecode_sv, arg);
509 case INSN_MG_OBJ: /* 62 */
513 SvMAGIC(bytecode_sv)->mg_obj = arg;
516 case INSN_MG_PRIVATE: /* 63 */
520 SvMAGIC(bytecode_sv)->mg_private = arg;
523 case INSN_MG_FLAGS: /* 64 */
527 SvMAGIC(bytecode_sv)->mg_flags = arg;
530 case INSN_MG_PV: /* 65 */
533 BGET_pvcontents(arg);
534 BSET_mg_pv(SvMAGIC(bytecode_sv), arg);
537 case INSN_XMG_STASH: /* 66 */
541 *(SV**)&SvSTASH(bytecode_sv) = arg;
544 case INSN_GV_FETCHPV: /* 67 */
548 BSET_gv_fetchpv(bytecode_sv, arg);
551 case INSN_GV_STASHPV: /* 68 */
555 BSET_gv_stashpv(bytecode_sv, arg);
558 case INSN_GP_SV: /* 69 */
562 GvSV(bytecode_sv) = arg;
565 case INSN_GP_REFCNT: /* 70 */
569 GvREFCNT(bytecode_sv) = arg;
572 case INSN_GP_REFCNT_ADD: /* 71 */
576 BSET_gp_refcnt_add(GvREFCNT(bytecode_sv), arg);
579 case INSN_GP_AV: /* 72 */
583 *(SV**)&GvAV(bytecode_sv) = arg;
586 case INSN_GP_HV: /* 73 */
590 *(SV**)&GvHV(bytecode_sv) = arg;
593 case INSN_GP_CV: /* 74 */
597 *(SV**)&GvCV(bytecode_sv) = arg;
600 case INSN_GP_FILE: /* 75 */
603 BGET_pvcontents(arg);
604 GvFILE(bytecode_sv) = arg;
607 case INSN_GP_IO: /* 76 */
611 *(SV**)&GvIOp(bytecode_sv) = arg;
614 case INSN_GP_FORM: /* 77 */
618 *(SV**)&GvFORM(bytecode_sv) = arg;
621 case INSN_GP_CVGEN: /* 78 */
625 GvCVGEN(bytecode_sv) = arg;
628 case INSN_GP_LINE: /* 79 */
632 GvLINE(bytecode_sv) = arg;
635 case INSN_GP_SHARE: /* 80 */
639 BSET_gp_share(bytecode_sv, arg);
642 case INSN_XGV_FLAGS: /* 81 */
646 GvFLAGS(bytecode_sv) = arg;
649 case INSN_OP_NEXT: /* 82 */
653 PL_op->op_next = arg;
656 case INSN_OP_SIBLING: /* 83 */
660 PL_op->op_sibling = arg;
663 case INSN_OP_PPADDR: /* 84 */
667 BSET_op_ppaddr(PL_op->op_ppaddr, arg);
670 case INSN_OP_TARG: /* 85 */
674 PL_op->op_targ = arg;
677 case INSN_OP_TYPE: /* 86 */
681 BSET_op_type(PL_op, arg);
684 case INSN_OP_SEQ: /* 87 */
691 case INSN_OP_FLAGS: /* 88 */
695 PL_op->op_flags = arg;
698 case INSN_OP_PRIVATE: /* 89 */
702 PL_op->op_private = arg;
705 case INSN_OP_FIRST: /* 90 */
709 cUNOP->op_first = arg;
712 case INSN_OP_LAST: /* 91 */
716 cBINOP->op_last = arg;
719 case INSN_OP_OTHER: /* 92 */
723 cLOGOP->op_other = arg;
726 case INSN_OP_CHILDREN: /* 93 */
730 cLISTOP->op_children = arg;
733 case INSN_OP_PMREPLROOT: /* 94 */
737 cPMOP->op_pmreplroot = arg;
740 case INSN_OP_PMREPLROOTGV: /* 95 */
744 *(SV**)&cPMOP->op_pmreplroot = arg;
747 case INSN_OP_PMREPLSTART: /* 96 */
751 cPMOP->op_pmreplstart = arg;
754 case INSN_OP_PMNEXT: /* 97 */
758 *(OP**)&cPMOP->op_pmnext = arg;
761 case INSN_PREGCOMP: /* 98 */
764 BGET_pvcontents(arg);
765 BSET_pregcomp(PL_op, arg);
768 case INSN_OP_PMFLAGS: /* 99 */
772 cPMOP->op_pmflags = arg;
775 case INSN_OP_PMPERMFLAGS: /* 100 */
779 cPMOP->op_pmpermflags = arg;
782 case INSN_OP_SV: /* 101 */
789 case INSN_OP_PADIX: /* 102 */
793 cPADOP->op_padix = arg;
796 case INSN_OP_PV: /* 103 */
799 BGET_pvcontents(arg);
803 case INSN_OP_PV_TR: /* 104 */
806 BGET_op_tr_array(arg);
810 case INSN_OP_REDOOP: /* 105 */
814 cLOOP->op_redoop = arg;
817 case INSN_OP_NEXTOP: /* 106 */
821 cLOOP->op_nextop = arg;
824 case INSN_OP_LASTOP: /* 107 */
828 cLOOP->op_lastop = arg;
831 case INSN_COP_LABEL: /* 108 */
834 BGET_pvcontents(arg);
835 cCOP->cop_label = arg;
838 case INSN_COP_STASHPV: /* 109 */
841 BGET_pvcontents(arg);
842 BSET_cop_stashpv(cCOP, arg);
845 case INSN_COP_FILE: /* 110 */
848 BGET_pvcontents(arg);
849 BSET_cop_file(cCOP, arg);
852 case INSN_COP_SEQ: /* 111 */
859 case INSN_COP_ARYBASE: /* 112 */
863 cCOP->cop_arybase = arg;
866 case INSN_COP_LINE: /* 113 */
870 BSET_cop_line(cCOP, arg);
873 case INSN_COP_WARNINGS: /* 114 */
877 cCOP->cop_warnings = arg;
880 case INSN_MAIN_START: /* 115 */
887 case INSN_MAIN_ROOT: /* 116 */
894 case INSN_CURPAD: /* 117 */
898 BSET_curpad(PL_curpad, arg);
901 case INSN_PUSH_BEGIN: /* 118 */
905 BSET_push_begin(PL_beginav, arg);
908 case INSN_PUSH_INIT: /* 119 */
912 BSET_push_init(PL_initav, arg);
915 case INSN_PUSH_END: /* 120 */
919 BSET_push_end(PL_endav, arg);
923 Perl_croak(aTHX_ "Illegal bytecode instruction %d\n", insn);