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