This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Do not unlock mutex twice.
[perl5.git] / ext / ByteLoader / byterun.c
CommitLineData
79ee8297 1/*
a6c40364 2 * Copyright (c) 1996-1999 Malcolm Beattie
79ee8297
MB
3 *
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.
6 *
7 */
8/*
9 * This file is autogenerated from bytecode.pl. Changes made here will be lost.
10 */
11
c5be433b 12#define PERL_NO_GET_CONTEXT
79ee8297
MB
13#include "EXTERN.h"
14#include "perl.h"
0cb96387
GS
15#define NO_XSLOCKS
16#include "XSUB.h"
17
e8edd1e6
TH
18#include "byterun.h"
19#include "bytecode.h"
20
0cb96387 21
059a8bb7 22static const int optype_size[] = {
e8edd1e6
TH
23 sizeof(OP),
24 sizeof(UNOP),
25 sizeof(BINOP),
26 sizeof(LOGOP),
e8edd1e6
TH
27 sizeof(LISTOP),
28 sizeof(PMOP),
29 sizeof(SVOP),
7934575e 30 sizeof(PADOP),
e8edd1e6
TH
31 sizeof(PVOP),
32 sizeof(LOOP),
33 sizeof(COP)
34};
35
d613ef02 36void *
acfe0abc 37bset_obj_store(pTHX_ struct byteloader_state *bstate, void *obj, I32 ix)
d613ef02 38{
059a8bb7
JH
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;
d613ef02 42 }
059a8bb7 43 bstate->bs_obj_list[ix] = obj;
d613ef02
GS
44 return obj;
45}
79ee8297 46
cea2e8a9 47void
acfe0abc 48byterun(pTHX_ register struct byteloader_state *bstate)
79ee8297 49{
059a8bb7
JH
50 register int insn;
51 U32 ix;
52 SV *specialsv_list[6];
53
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;
e8edd1e6
TH
57
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;
059a8bb7
JH
62 specialsv_list[4] = pWARN_ALL;
63 specialsv_list[5] = pWARN_NONE;
e8edd1e6 64
47358472 65 while ((insn = BGET_FGETC()) != EOF) {
79ee8297
MB
66 switch (insn) {
67 case INSN_COMMENT: /* 35 */
68 {
34e97019 69 comment_t arg;
fe3a57c4 70 BGET_comment_t(arg);
79ee8297
MB
71 arg = arg;
72 break;
73 }
74 case INSN_NOP: /* 10 */
75 {
76 break;
77 }
78 case INSN_RET: /* 0 */
79 {
80 BSET_ret(none);
81 break;
82 }
83 case INSN_LDSV: /* 1 */
84 {
85 svindex arg;
01f988be 86 BGET_svindex(arg);
059a8bb7 87 bstate->bs_sv = arg;
79ee8297
MB
88 break;
89 }
90 case INSN_LDOP: /* 2 */
91 {
92 opindex arg;
01f988be 93 BGET_opindex(arg);
533c011a 94 PL_op = arg;
79ee8297
MB
95 break;
96 }
97 case INSN_STSV: /* 3 */
98 {
99 U32 arg;
100 BGET_U32(arg);
059a8bb7 101 BSET_OBJ_STORE(bstate->bs_sv, arg);
79ee8297
MB
102 break;
103 }
104 case INSN_STOP: /* 4 */
105 {
106 U32 arg;
107 BGET_U32(arg);
533c011a 108 BSET_OBJ_STORE(PL_op, arg);
79ee8297
MB
109 break;
110 }
059a8bb7
JH
111 case INSN_STPV: /* 5 */
112 {
113 U32 arg;
114 BGET_U32(arg);
115 BSET_stpv(bstate->bs_pv.xpv_pv, arg);
116 break;
117 }
118 case INSN_LDSPECSV: /* 6 */
79ee8297
MB
119 {
120 U8 arg;
121 BGET_U8(arg);
059a8bb7 122 BSET_ldspecsv(bstate->bs_sv, arg);
79ee8297
MB
123 break;
124 }
059a8bb7 125 case INSN_NEWSV: /* 7 */
79ee8297
MB
126 {
127 U8 arg;
128 BGET_U8(arg);
059a8bb7 129 BSET_newsv(bstate->bs_sv, arg);
79ee8297
MB
130 break;
131 }
059a8bb7 132 case INSN_NEWOP: /* 8 */
79ee8297
MB
133 {
134 U8 arg;
135 BGET_U8(arg);
533c011a 136 BSET_newop(PL_op, arg);
79ee8297
MB
137 break;
138 }
059a8bb7 139 case INSN_NEWOPN: /* 9 */
79ee8297
MB
140 {
141 U8 arg;
142 BGET_U8(arg);
533c011a 143 BSET_newopn(PL_op, arg);
79ee8297
MB
144 break;
145 }
059a8bb7 146 case INSN_NEWPV: /* 11 */
79ee8297
MB
147 {
148 PV arg;
149 BGET_PV(arg);
150 break;
151 }
059a8bb7 152 case INSN_PV_CUR: /* 12 */
79ee8297
MB
153 {
154 STRLEN arg;
155 BGET_U32(arg);
059a8bb7 156 bstate->bs_pv.xpv_cur = arg;
79ee8297
MB
157 break;
158 }
059a8bb7 159 case INSN_PV_FREE: /* 13 */
79ee8297 160 {
059a8bb7 161 BSET_pv_free(bstate->bs_pv);
79ee8297
MB
162 break;
163 }
059a8bb7 164 case INSN_SV_UPGRADE: /* 14 */
79ee8297
MB
165 {
166 char arg;
167 BGET_U8(arg);
059a8bb7 168 BSET_sv_upgrade(bstate->bs_sv, arg);
79ee8297
MB
169 break;
170 }
059a8bb7 171 case INSN_SV_REFCNT: /* 15 */
79ee8297
MB
172 {
173 U32 arg;
174 BGET_U32(arg);
059a8bb7 175 SvREFCNT(bstate->bs_sv) = arg;
79ee8297
MB
176 break;
177 }
059a8bb7 178 case INSN_SV_REFCNT_ADD: /* 16 */
79ee8297
MB
179 {
180 I32 arg;
181 BGET_I32(arg);
059a8bb7 182 BSET_sv_refcnt_add(SvREFCNT(bstate->bs_sv), arg);
79ee8297
MB
183 break;
184 }
059a8bb7 185 case INSN_SV_FLAGS: /* 17 */
79ee8297
MB
186 {
187 U32 arg;
188 BGET_U32(arg);
059a8bb7 189 SvFLAGS(bstate->bs_sv) = arg;
79ee8297
MB
190 break;
191 }
059a8bb7 192 case INSN_XRV: /* 18 */
79ee8297
MB
193 {
194 svindex arg;
01f988be 195 BGET_svindex(arg);
059a8bb7 196 SvRV(bstate->bs_sv) = arg;
79ee8297
MB
197 break;
198 }
059a8bb7 199 case INSN_XPV: /* 19 */
79ee8297 200 {
059a8bb7 201 BSET_xpv(bstate->bs_sv);
79ee8297
MB
202 break;
203 }
059a8bb7 204 case INSN_XIV32: /* 20 */
79ee8297
MB
205 {
206 I32 arg;
207 BGET_I32(arg);
059a8bb7 208 SvIVX(bstate->bs_sv) = arg;
79ee8297
MB
209 break;
210 }
059a8bb7 211 case INSN_XIV64: /* 21 */
79ee8297
MB
212 {
213 IV64 arg;
214 BGET_IV64(arg);
059a8bb7 215 SvIVX(bstate->bs_sv) = arg;
79ee8297
MB
216 break;
217 }
059a8bb7 218 case INSN_XNV: /* 22 */
79ee8297 219 {
65202027
DS
220 NV arg;
221 BGET_NV(arg);
059a8bb7 222 SvNVX(bstate->bs_sv) = arg;
79ee8297
MB
223 break;
224 }
059a8bb7 225 case INSN_XLV_TARGOFF: /* 23 */
79ee8297
MB
226 {
227 STRLEN arg;
228 BGET_U32(arg);
059a8bb7 229 LvTARGOFF(bstate->bs_sv) = arg;
79ee8297
MB
230 break;
231 }
059a8bb7 232 case INSN_XLV_TARGLEN: /* 24 */
79ee8297
MB
233 {
234 STRLEN arg;
235 BGET_U32(arg);
059a8bb7 236 LvTARGLEN(bstate->bs_sv) = arg;
79ee8297
MB
237 break;
238 }
059a8bb7 239 case INSN_XLV_TARG: /* 25 */
79ee8297
MB
240 {
241 svindex arg;
01f988be 242 BGET_svindex(arg);
059a8bb7 243 LvTARG(bstate->bs_sv) = arg;
79ee8297
MB
244 break;
245 }
059a8bb7 246 case INSN_XLV_TYPE: /* 26 */
79ee8297
MB
247 {
248 char arg;
249 BGET_U8(arg);
059a8bb7 250 LvTYPE(bstate->bs_sv) = arg;
79ee8297
MB
251 break;
252 }
059a8bb7 253 case INSN_XBM_USEFUL: /* 27 */
79ee8297
MB
254 {
255 I32 arg;
256 BGET_I32(arg);
059a8bb7 257 BmUSEFUL(bstate->bs_sv) = arg;
79ee8297
MB
258 break;
259 }
059a8bb7 260 case INSN_XBM_PREVIOUS: /* 28 */
79ee8297
MB
261 {
262 U16 arg;
263 BGET_U16(arg);
059a8bb7 264 BmPREVIOUS(bstate->bs_sv) = arg;
79ee8297
MB
265 break;
266 }
059a8bb7 267 case INSN_XBM_RARE: /* 29 */
79ee8297
MB
268 {
269 U8 arg;
270 BGET_U8(arg);
059a8bb7 271 BmRARE(bstate->bs_sv) = arg;
79ee8297
MB
272 break;
273 }
059a8bb7 274 case INSN_XFM_LINES: /* 30 */
79ee8297 275 {
11a7ac70
JH
276 IV arg;
277 BGET_IV(arg);
059a8bb7 278 FmLINES(bstate->bs_sv) = arg;
79ee8297
MB
279 break;
280 }
059a8bb7 281 case INSN_XIO_LINES: /* 31 */
79ee8297 282 {
11a7ac70
JH
283 IV arg;
284 BGET_IV(arg);
059a8bb7 285 IoLINES(bstate->bs_sv) = arg;
79ee8297
MB
286 break;
287 }
059a8bb7 288 case INSN_XIO_PAGE: /* 32 */
79ee8297 289 {
11a7ac70
JH
290 IV arg;
291 BGET_IV(arg);
059a8bb7 292 IoPAGE(bstate->bs_sv) = arg;
79ee8297
MB
293 break;
294 }
059a8bb7 295 case INSN_XIO_PAGE_LEN: /* 33 */
79ee8297 296 {
11a7ac70
JH
297 IV arg;
298 BGET_IV(arg);
059a8bb7 299 IoPAGE_LEN(bstate->bs_sv) = arg;
79ee8297
MB
300 break;
301 }
059a8bb7 302 case INSN_XIO_LINES_LEFT: /* 34 */
79ee8297 303 {
11a7ac70
JH
304 IV arg;
305 BGET_IV(arg);
059a8bb7 306 IoLINES_LEFT(bstate->bs_sv) = arg;
79ee8297
MB
307 break;
308 }
059a8bb7 309 case INSN_XIO_TOP_NAME: /* 36 */
79ee8297
MB
310 {
311 pvcontents arg;
312 BGET_pvcontents(arg);
059a8bb7 313 IoTOP_NAME(bstate->bs_sv) = arg;
79ee8297
MB
314 break;
315 }
059a8bb7 316 case INSN_XIO_TOP_GV: /* 37 */
79ee8297
MB
317 {
318 svindex arg;
01f988be 319 BGET_svindex(arg);
059a8bb7 320 *(SV**)&IoTOP_GV(bstate->bs_sv) = arg;
79ee8297
MB
321 break;
322 }
059a8bb7 323 case INSN_XIO_FMT_NAME: /* 38 */
79ee8297
MB
324 {
325 pvcontents arg;
326 BGET_pvcontents(arg);
059a8bb7 327 IoFMT_NAME(bstate->bs_sv) = arg;
79ee8297
MB
328 break;
329 }
059a8bb7 330 case INSN_XIO_FMT_GV: /* 39 */
79ee8297
MB
331 {
332 svindex arg;
01f988be 333 BGET_svindex(arg);
059a8bb7 334 *(SV**)&IoFMT_GV(bstate->bs_sv) = arg;
79ee8297
MB
335 break;
336 }
059a8bb7 337 case INSN_XIO_BOTTOM_NAME: /* 40 */
79ee8297
MB
338 {
339 pvcontents arg;
340 BGET_pvcontents(arg);
059a8bb7 341 IoBOTTOM_NAME(bstate->bs_sv) = arg;
79ee8297
MB
342 break;
343 }
059a8bb7 344 case INSN_XIO_BOTTOM_GV: /* 41 */
79ee8297
MB
345 {
346 svindex arg;
01f988be 347 BGET_svindex(arg);
059a8bb7 348 *(SV**)&IoBOTTOM_GV(bstate->bs_sv) = arg;
79ee8297
MB
349 break;
350 }
059a8bb7 351 case INSN_XIO_SUBPROCESS: /* 42 */
79ee8297
MB
352 {
353 short arg;
354 BGET_U16(arg);
059a8bb7 355 IoSUBPROCESS(bstate->bs_sv) = arg;
79ee8297
MB
356 break;
357 }
059a8bb7 358 case INSN_XIO_TYPE: /* 43 */
79ee8297
MB
359 {
360 char arg;
361 BGET_U8(arg);
059a8bb7 362 IoTYPE(bstate->bs_sv) = arg;
79ee8297
MB
363 break;
364 }
059a8bb7 365 case INSN_XIO_FLAGS: /* 44 */
79ee8297
MB
366 {
367 char arg;
368 BGET_U8(arg);
059a8bb7 369 IoFLAGS(bstate->bs_sv) = arg;
79ee8297
MB
370 break;
371 }
059a8bb7 372 case INSN_XCV_STASH: /* 45 */
79ee8297
MB
373 {
374 svindex arg;
01f988be 375 BGET_svindex(arg);
059a8bb7 376 *(SV**)&CvSTASH(bstate->bs_sv) = arg;
79ee8297
MB
377 break;
378 }
059a8bb7 379 case INSN_XCV_START: /* 46 */
79ee8297
MB
380 {
381 opindex arg;
01f988be 382 BGET_opindex(arg);
059a8bb7 383 CvSTART(bstate->bs_sv) = arg;
79ee8297
MB
384 break;
385 }
059a8bb7 386 case INSN_XCV_ROOT: /* 47 */
79ee8297
MB
387 {
388 opindex arg;
01f988be 389 BGET_opindex(arg);
059a8bb7 390 CvROOT(bstate->bs_sv) = arg;
79ee8297
MB
391 break;
392 }
059a8bb7 393 case INSN_XCV_GV: /* 48 */
79ee8297
MB
394 {
395 svindex arg;
01f988be 396 BGET_svindex(arg);
059a8bb7 397 *(SV**)&CvGV(bstate->bs_sv) = arg;
79ee8297
MB
398 break;
399 }
059a8bb7 400 case INSN_XCV_FILE: /* 49 */
57843af0 401 {
059a8bb7
JH
402 pvindex arg;
403 BGET_pvindex(arg);
404 CvFILE(bstate->bs_sv) = arg;
57843af0
GS
405 break;
406 }
059a8bb7 407 case INSN_XCV_DEPTH: /* 50 */
79ee8297
MB
408 {
409 long arg;
410 BGET_I32(arg);
059a8bb7 411 CvDEPTH(bstate->bs_sv) = arg;
79ee8297
MB
412 break;
413 }
059a8bb7 414 case INSN_XCV_PADLIST: /* 51 */
79ee8297
MB
415 {
416 svindex arg;
01f988be 417 BGET_svindex(arg);
059a8bb7 418 *(SV**)&CvPADLIST(bstate->bs_sv) = arg;
79ee8297
MB
419 break;
420 }
059a8bb7 421 case INSN_XCV_OUTSIDE: /* 52 */
79ee8297
MB
422 {
423 svindex arg;
01f988be 424 BGET_svindex(arg);
059a8bb7 425 *(SV**)&CvOUTSIDE(bstate->bs_sv) = arg;
79ee8297
MB
426 break;
427 }
059a8bb7 428 case INSN_XCV_FLAGS: /* 53 */
79ee8297 429 {
fc290457
GS
430 U16 arg;
431 BGET_U16(arg);
059a8bb7 432 CvFLAGS(bstate->bs_sv) = arg;
79ee8297
MB
433 break;
434 }
059a8bb7 435 case INSN_AV_EXTEND: /* 54 */
79ee8297
MB
436 {
437 SSize_t arg;
438 BGET_I32(arg);
059a8bb7 439 BSET_av_extend(bstate->bs_sv, arg);
79ee8297
MB
440 break;
441 }
059a8bb7 442 case INSN_AV_PUSH: /* 55 */
79ee8297
MB
443 {
444 svindex arg;
01f988be 445 BGET_svindex(arg);
059a8bb7 446 BSET_av_push(bstate->bs_sv, arg);
79ee8297
MB
447 break;
448 }
059a8bb7 449 case INSN_XAV_FILL: /* 56 */
79ee8297
MB
450 {
451 SSize_t arg;
452 BGET_I32(arg);
059a8bb7 453 AvFILLp(bstate->bs_sv) = arg;
79ee8297
MB
454 break;
455 }
059a8bb7 456 case INSN_XAV_MAX: /* 57 */
79ee8297
MB
457 {
458 SSize_t arg;
459 BGET_I32(arg);
059a8bb7 460 AvMAX(bstate->bs_sv) = arg;
79ee8297
MB
461 break;
462 }
059a8bb7 463 case INSN_XAV_FLAGS: /* 58 */
79ee8297
MB
464 {
465 U8 arg;
466 BGET_U8(arg);
059a8bb7 467 AvFLAGS(bstate->bs_sv) = arg;
79ee8297
MB
468 break;
469 }
059a8bb7 470 case INSN_XHV_RITER: /* 59 */
79ee8297
MB
471 {
472 I32 arg;
473 BGET_I32(arg);
059a8bb7 474 HvRITER(bstate->bs_sv) = arg;
79ee8297
MB
475 break;
476 }
059a8bb7 477 case INSN_XHV_NAME: /* 60 */
79ee8297
MB
478 {
479 pvcontents arg;
480 BGET_pvcontents(arg);
059a8bb7 481 HvNAME(bstate->bs_sv) = arg;
79ee8297
MB
482 break;
483 }
059a8bb7 484 case INSN_HV_STORE: /* 61 */
79ee8297
MB
485 {
486 svindex arg;
01f988be 487 BGET_svindex(arg);
059a8bb7 488 BSET_hv_store(bstate->bs_sv, arg);
79ee8297
MB
489 break;
490 }
059a8bb7 491 case INSN_SV_MAGIC: /* 62 */
79ee8297
MB
492 {
493 char arg;
494 BGET_U8(arg);
059a8bb7 495 BSET_sv_magic(bstate->bs_sv, arg);
79ee8297
MB
496 break;
497 }
059a8bb7 498 case INSN_MG_OBJ: /* 63 */
79ee8297
MB
499 {
500 svindex arg;
01f988be 501 BGET_svindex(arg);
059a8bb7 502 SvMAGIC(bstate->bs_sv)->mg_obj = arg;
79ee8297
MB
503 break;
504 }
059a8bb7 505 case INSN_MG_PRIVATE: /* 64 */
79ee8297
MB
506 {
507 U16 arg;
508 BGET_U16(arg);
059a8bb7 509 SvMAGIC(bstate->bs_sv)->mg_private = arg;
79ee8297
MB
510 break;
511 }
059a8bb7 512 case INSN_MG_FLAGS: /* 65 */
79ee8297
MB
513 {
514 U8 arg;
515 BGET_U8(arg);
059a8bb7 516 SvMAGIC(bstate->bs_sv)->mg_flags = arg;
79ee8297
MB
517 break;
518 }
059a8bb7 519 case INSN_MG_PV: /* 66 */
79ee8297
MB
520 {
521 pvcontents arg;
522 BGET_pvcontents(arg);
059a8bb7 523 BSET_mg_pv(SvMAGIC(bstate->bs_sv), arg);
79ee8297
MB
524 break;
525 }
059a8bb7 526 case INSN_XMG_STASH: /* 67 */
79ee8297
MB
527 {
528 svindex arg;
01f988be 529 BGET_svindex(arg);
059a8bb7 530 *(SV**)&SvSTASH(bstate->bs_sv) = arg;
79ee8297
MB
531 break;
532 }
059a8bb7 533 case INSN_GV_FETCHPV: /* 68 */
79ee8297
MB
534 {
535 strconst arg;
536 BGET_strconst(arg);
059a8bb7 537 BSET_gv_fetchpv(bstate->bs_sv, arg);
79ee8297
MB
538 break;
539 }
059a8bb7 540 case INSN_GV_STASHPV: /* 69 */
79ee8297
MB
541 {
542 strconst arg;
543 BGET_strconst(arg);
059a8bb7 544 BSET_gv_stashpv(bstate->bs_sv, arg);
79ee8297
MB
545 break;
546 }
059a8bb7 547 case INSN_GP_SV: /* 70 */
79ee8297
MB
548 {
549 svindex arg;
01f988be 550 BGET_svindex(arg);
059a8bb7 551 GvSV(bstate->bs_sv) = arg;
79ee8297
MB
552 break;
553 }
059a8bb7 554 case INSN_GP_REFCNT: /* 71 */
79ee8297
MB
555 {
556 U32 arg;
557 BGET_U32(arg);
059a8bb7 558 GvREFCNT(bstate->bs_sv) = arg;
79ee8297
MB
559 break;
560 }
059a8bb7 561 case INSN_GP_REFCNT_ADD: /* 72 */
79ee8297
MB
562 {
563 I32 arg;
564 BGET_I32(arg);
059a8bb7 565 BSET_gp_refcnt_add(GvREFCNT(bstate->bs_sv), arg);
79ee8297
MB
566 break;
567 }
059a8bb7 568 case INSN_GP_AV: /* 73 */
79ee8297
MB
569 {
570 svindex arg;
01f988be 571 BGET_svindex(arg);
059a8bb7 572 *(SV**)&GvAV(bstate->bs_sv) = arg;
79ee8297
MB
573 break;
574 }
059a8bb7 575 case INSN_GP_HV: /* 74 */
79ee8297
MB
576 {
577 svindex arg;
01f988be 578 BGET_svindex(arg);
059a8bb7 579 *(SV**)&GvHV(bstate->bs_sv) = arg;
79ee8297
MB
580 break;
581 }
059a8bb7 582 case INSN_GP_CV: /* 75 */
79ee8297
MB
583 {
584 svindex arg;
01f988be 585 BGET_svindex(arg);
059a8bb7 586 *(SV**)&GvCV(bstate->bs_sv) = arg;
79ee8297
MB
587 break;
588 }
059a8bb7 589 case INSN_GP_FILE: /* 76 */
79ee8297 590 {
059a8bb7
JH
591 pvindex arg;
592 BGET_pvindex(arg);
593 GvFILE(bstate->bs_sv) = arg;
79ee8297
MB
594 break;
595 }
059a8bb7 596 case INSN_GP_IO: /* 77 */
79ee8297
MB
597 {
598 svindex arg;
01f988be 599 BGET_svindex(arg);
059a8bb7 600 *(SV**)&GvIOp(bstate->bs_sv) = arg;
79ee8297
MB
601 break;
602 }
059a8bb7 603 case INSN_GP_FORM: /* 78 */
79ee8297
MB
604 {
605 svindex arg;
01f988be 606 BGET_svindex(arg);
059a8bb7 607 *(SV**)&GvFORM(bstate->bs_sv) = arg;
79ee8297
MB
608 break;
609 }
059a8bb7 610 case INSN_GP_CVGEN: /* 79 */
79ee8297
MB
611 {
612 U32 arg;
613 BGET_U32(arg);
059a8bb7 614 GvCVGEN(bstate->bs_sv) = arg;
79ee8297
MB
615 break;
616 }
059a8bb7 617 case INSN_GP_LINE: /* 80 */
79ee8297
MB
618 {
619 line_t arg;
620 BGET_U16(arg);
059a8bb7 621 GvLINE(bstate->bs_sv) = arg;
79ee8297
MB
622 break;
623 }
059a8bb7 624 case INSN_GP_SHARE: /* 81 */
79ee8297
MB
625 {
626 svindex arg;
01f988be 627 BGET_svindex(arg);
059a8bb7 628 BSET_gp_share(bstate->bs_sv, arg);
79ee8297
MB
629 break;
630 }
059a8bb7 631 case INSN_XGV_FLAGS: /* 82 */
79ee8297
MB
632 {
633 U8 arg;
634 BGET_U8(arg);
059a8bb7 635 GvFLAGS(bstate->bs_sv) = arg;
79ee8297
MB
636 break;
637 }
059a8bb7 638 case INSN_OP_NEXT: /* 83 */
79ee8297
MB
639 {
640 opindex arg;
01f988be 641 BGET_opindex(arg);
533c011a 642 PL_op->op_next = arg;
79ee8297
MB
643 break;
644 }
059a8bb7 645 case INSN_OP_SIBLING: /* 84 */
79ee8297
MB
646 {
647 opindex arg;
01f988be 648 BGET_opindex(arg);
533c011a 649 PL_op->op_sibling = arg;
79ee8297
MB
650 break;
651 }
059a8bb7 652 case INSN_OP_PPADDR: /* 85 */
79ee8297
MB
653 {
654 strconst arg;
655 BGET_strconst(arg);
6b88bc9c 656 BSET_op_ppaddr(PL_op->op_ppaddr, arg);
79ee8297
MB
657 break;
658 }
059a8bb7 659 case INSN_OP_TARG: /* 86 */
79ee8297
MB
660 {
661 PADOFFSET arg;
662 BGET_U32(arg);
533c011a 663 PL_op->op_targ = arg;
79ee8297
MB
664 break;
665 }
059a8bb7 666 case INSN_OP_TYPE: /* 87 */
79ee8297
MB
667 {
668 OPCODE arg;
669 BGET_U16(arg);
533c011a 670 BSET_op_type(PL_op, arg);
79ee8297
MB
671 break;
672 }
059a8bb7 673 case INSN_OP_SEQ: /* 88 */
79ee8297
MB
674 {
675 U16 arg;
676 BGET_U16(arg);
533c011a 677 PL_op->op_seq = arg;
79ee8297
MB
678 break;
679 }
059a8bb7 680 case INSN_OP_FLAGS: /* 89 */
79ee8297
MB
681 {
682 U8 arg;
683 BGET_U8(arg);
533c011a 684 PL_op->op_flags = arg;
79ee8297
MB
685 break;
686 }
059a8bb7 687 case INSN_OP_PRIVATE: /* 90 */
79ee8297
MB
688 {
689 U8 arg;
690 BGET_U8(arg);
533c011a 691 PL_op->op_private = arg;
79ee8297
MB
692 break;
693 }
059a8bb7 694 case INSN_OP_FIRST: /* 91 */
79ee8297
MB
695 {
696 opindex arg;
01f988be 697 BGET_opindex(arg);
79ee8297
MB
698 cUNOP->op_first = arg;
699 break;
700 }
059a8bb7 701 case INSN_OP_LAST: /* 92 */
79ee8297
MB
702 {
703 opindex arg;
01f988be 704 BGET_opindex(arg);
79ee8297
MB
705 cBINOP->op_last = arg;
706 break;
707 }
059a8bb7 708 case INSN_OP_OTHER: /* 93 */
79ee8297
MB
709 {
710 opindex arg;
01f988be 711 BGET_opindex(arg);
79ee8297
MB
712 cLOGOP->op_other = arg;
713 break;
714 }
117dada2 715 case INSN_OP_PMREPLROOT: /* 94 */
79ee8297
MB
716 {
717 opindex arg;
01f988be 718 BGET_opindex(arg);
79ee8297
MB
719 cPMOP->op_pmreplroot = arg;
720 break;
721 }
117dada2 722 case INSN_OP_PMREPLROOTGV: /* 95 */
79ee8297
MB
723 {
724 svindex arg;
01f988be 725 BGET_svindex(arg);
79ee8297
MB
726 *(SV**)&cPMOP->op_pmreplroot = arg;
727 break;
728 }
117dada2 729 case INSN_OP_PMREPLSTART: /* 96 */
79ee8297
MB
730 {
731 opindex arg;
01f988be 732 BGET_opindex(arg);
79ee8297
MB
733 cPMOP->op_pmreplstart = arg;
734 break;
735 }
117dada2 736 case INSN_OP_PMNEXT: /* 97 */
79ee8297
MB
737 {
738 opindex arg;
01f988be 739 BGET_opindex(arg);
79ee8297
MB
740 *(OP**)&cPMOP->op_pmnext = arg;
741 break;
742 }
117dada2 743 case INSN_PREGCOMP: /* 98 */
79ee8297
MB
744 {
745 pvcontents arg;
746 BGET_pvcontents(arg);
533c011a 747 BSET_pregcomp(PL_op, arg);
79ee8297
MB
748 break;
749 }
117dada2 750 case INSN_OP_PMFLAGS: /* 99 */
79ee8297
MB
751 {
752 U16 arg;
753 BGET_U16(arg);
754 cPMOP->op_pmflags = arg;
755 break;
756 }
117dada2 757 case INSN_OP_PMPERMFLAGS: /* 100 */
79ee8297
MB
758 {
759 U16 arg;
760 BGET_U16(arg);
761 cPMOP->op_pmpermflags = arg;
762 break;
763 }
117dada2 764 case INSN_OP_SV: /* 101 */
79ee8297
MB
765 {
766 svindex arg;
01f988be 767 BGET_svindex(arg);
79ee8297
MB
768 cSVOP->op_sv = arg;
769 break;
770 }
117dada2 771 case INSN_OP_PADIX: /* 102 */
79ee8297 772 {
7934575e
GS
773 PADOFFSET arg;
774 BGET_U32(arg);
775 cPADOP->op_padix = arg;
79ee8297
MB
776 break;
777 }
117dada2 778 case INSN_OP_PV: /* 103 */
79ee8297
MB
779 {
780 pvcontents arg;
781 BGET_pvcontents(arg);
782 cPVOP->op_pv = arg;
783 break;
784 }
117dada2 785 case INSN_OP_PV_TR: /* 104 */
79ee8297
MB
786 {
787 op_tr_array arg;
788 BGET_op_tr_array(arg);
789 cPVOP->op_pv = arg;
790 break;
791 }
117dada2 792 case INSN_OP_REDOOP: /* 105 */
79ee8297
MB
793 {
794 opindex arg;
01f988be 795 BGET_opindex(arg);
79ee8297
MB
796 cLOOP->op_redoop = arg;
797 break;
798 }
117dada2 799 case INSN_OP_NEXTOP: /* 106 */
79ee8297
MB
800 {
801 opindex arg;
01f988be 802 BGET_opindex(arg);
79ee8297
MB
803 cLOOP->op_nextop = arg;
804 break;
805 }
117dada2 806 case INSN_OP_LASTOP: /* 107 */
79ee8297
MB
807 {
808 opindex arg;
01f988be 809 BGET_opindex(arg);
79ee8297
MB
810 cLOOP->op_lastop = arg;
811 break;
812 }
117dada2 813 case INSN_COP_LABEL: /* 108 */
79ee8297 814 {
059a8bb7
JH
815 pvindex arg;
816 BGET_pvindex(arg);
79ee8297
MB
817 cCOP->cop_label = arg;
818 break;
819 }
117dada2 820 case INSN_COP_STASHPV: /* 109 */
79ee8297 821 {
059a8bb7
JH
822 pvindex arg;
823 BGET_pvindex(arg);
11faa288 824 BSET_cop_stashpv(cCOP, arg);
79ee8297
MB
825 break;
826 }
117dada2 827 case INSN_COP_FILE: /* 110 */
79ee8297 828 {
059a8bb7
JH
829 pvindex arg;
830 BGET_pvindex(arg);
57843af0 831 BSET_cop_file(cCOP, arg);
79ee8297
MB
832 break;
833 }
117dada2 834 case INSN_COP_SEQ: /* 111 */
79ee8297
MB
835 {
836 U32 arg;
837 BGET_U32(arg);
838 cCOP->cop_seq = arg;
839 break;
840 }
117dada2 841 case INSN_COP_ARYBASE: /* 112 */
79ee8297
MB
842 {
843 I32 arg;
844 BGET_I32(arg);
845 cCOP->cop_arybase = arg;
846 break;
847 }
117dada2 848 case INSN_COP_LINE: /* 113 */
79ee8297
MB
849 {
850 line_t arg;
851 BGET_U16(arg);
57843af0 852 BSET_cop_line(cCOP, arg);
79ee8297
MB
853 break;
854 }
117dada2 855 case INSN_COP_WARNINGS: /* 114 */
b295d113
TH
856 {
857 svindex arg;
858 BGET_svindex(arg);
859 cCOP->cop_warnings = arg;
860 break;
861 }
117dada2 862 case INSN_MAIN_START: /* 115 */
79ee8297
MB
863 {
864 opindex arg;
01f988be 865 BGET_opindex(arg);
3280af22 866 PL_main_start = arg;
79ee8297
MB
867 break;
868 }
117dada2 869 case INSN_MAIN_ROOT: /* 116 */
79ee8297
MB
870 {
871 opindex arg;
01f988be 872 BGET_opindex(arg);
3280af22 873 PL_main_root = arg;
79ee8297
MB
874 break;
875 }
117dada2 876 case INSN_CURPAD: /* 117 */
79ee8297
MB
877 {
878 svindex arg;
01f988be 879 BGET_svindex(arg);
3280af22 880 BSET_curpad(PL_curpad, arg);
79ee8297
MB
881 break;
882 }
117dada2 883 case INSN_PUSH_BEGIN: /* 118 */
059a8bb7
JH
884 {
885 svindex arg;
886 BGET_svindex(arg);
887 BSET_push_begin(PL_beginav, arg);
888 break;
889 }
117dada2 890 case INSN_PUSH_INIT: /* 119 */
059a8bb7
JH
891 {
892 svindex arg;
893 BGET_svindex(arg);
894 BSET_push_init(PL_initav, arg);
895 break;
896 }
117dada2 897 case INSN_PUSH_END: /* 120 */
059a8bb7
JH
898 {
899 svindex arg;
900 BGET_svindex(arg);
901 BSET_push_end(PL_endav, arg);
902 break;
903 }
79ee8297 904 default:
cea2e8a9 905 Perl_croak(aTHX_ "Illegal bytecode instruction %d\n", insn);
79ee8297
MB
906 /* NOTREACHED */
907 }
908 }
909}