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