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