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