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