diff --git a/src/ops/core_ops.c b/src/ops/core_ops.c
index 9985434..91355de 100644
a
|
b
|
|
69 | 69 | |
70 | 70 | |
71 | 71 | |
| 72 | PARROT_WARN_UNUSED_RESULT |
| 73 | PMC * |
| 74 | parrot_pmc_new_from_type(PARROT_INTERP, ARGIN(PMC *key)) |
| 75 | { |
| 76 | PMC *pmc; |
| 77 | PMC *const classobj = Parrot_oo_get_class(interp, key); |
| 78 | |
| 79 | if (!PMC_IS_NULL(classobj)) |
| 80 | pmc = VTABLE_instantiate(interp, classobj, PMCNULL); |
| 81 | else { |
| 82 | const INTVAL type = Parrot_pmc_get_type(interp, key); |
| 83 | |
| 84 | if (type <= 0) { |
| 85 | Parrot_ex_throw_from_c_args(interp, NULL, |
| 86 | EXCEPTION_NO_CLASS, "Class '%Ss' not found", |
| 87 | VTABLE_get_repr(interp, key)); |
| 88 | } |
| 89 | |
| 90 | pmc = Parrot_pmc_new(interp, type); |
| 91 | } |
| 92 | |
| 93 | return pmc; |
| 94 | } |
| 95 | |
| 96 | |
| 97 | |
72 | 98 | INTVAL core_numops = 1072; |
73 | 99 | |
74 | 100 | /* |
… |
… |
|
22227 | 22253 | Parrot_fetch_p_p_p_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22228 | 22254 | PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), PREG(3)); |
22229 | 22255 | if (PMC_IS_NULL(PREG(1))) { |
22230 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22231 | | |
22232 | | if ((!PMC_IS_NULL(classobj))) { |
22233 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22234 | | } |
22235 | | else { |
22236 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22237 | | |
22238 | | if ((type <= 0)) { |
22239 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22240 | | |
22241 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22242 | | return (opcode_t *)dest; |
22243 | | } |
22244 | | |
22245 | | PREG(1) = Parrot_pmc_new(interp, type); |
22246 | | } |
22247 | | |
| 22256 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22248 | 22257 | } |
22249 | 22258 | |
22250 | 22259 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22255 | 22264 | Parrot_fetch_p_pc_p_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22256 | 22265 | PREG(1) = VTABLE_get_pmc_keyed(interp, PCONST(2), PREG(3)); |
22257 | 22266 | if (PMC_IS_NULL(PREG(1))) { |
22258 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22259 | | |
22260 | | if ((!PMC_IS_NULL(classobj))) { |
22261 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22262 | | } |
22263 | | else { |
22264 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22265 | | |
22266 | | if ((type <= 0)) { |
22267 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22268 | | |
22269 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22270 | | return (opcode_t *)dest; |
22271 | | } |
22272 | | |
22273 | | PREG(1) = Parrot_pmc_new(interp, type); |
22274 | | } |
22275 | | |
| 22267 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22276 | 22268 | } |
22277 | 22269 | |
22278 | 22270 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22283 | 22275 | Parrot_fetch_p_p_pc_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22284 | 22276 | PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), PCONST(3)); |
22285 | 22277 | if (PMC_IS_NULL(PREG(1))) { |
22286 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22287 | | |
22288 | | if ((!PMC_IS_NULL(classobj))) { |
22289 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22290 | | } |
22291 | | else { |
22292 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22293 | | |
22294 | | if ((type <= 0)) { |
22295 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22296 | | |
22297 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22298 | | return (opcode_t *)dest; |
22299 | | } |
22300 | | |
22301 | | PREG(1) = Parrot_pmc_new(interp, type); |
22302 | | } |
22303 | | |
| 22278 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22304 | 22279 | } |
22305 | 22280 | |
22306 | 22281 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22311 | 22286 | Parrot_fetch_p_pc_pc_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22312 | 22287 | PREG(1) = VTABLE_get_pmc_keyed(interp, PCONST(2), PCONST(3)); |
22313 | 22288 | if (PMC_IS_NULL(PREG(1))) { |
22314 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22315 | | |
22316 | | if ((!PMC_IS_NULL(classobj))) { |
22317 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22318 | | } |
22319 | | else { |
22320 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22321 | | |
22322 | | if ((type <= 0)) { |
22323 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22324 | | |
22325 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22326 | | return (opcode_t *)dest; |
22327 | | } |
22328 | | |
22329 | | PREG(1) = Parrot_pmc_new(interp, type); |
22330 | | } |
22331 | | |
| 22289 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22332 | 22290 | } |
22333 | 22291 | |
22334 | 22292 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22339 | 22297 | Parrot_fetch_p_p_p_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
22340 | 22298 | PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), PREG(3)); |
22341 | 22299 | if (PMC_IS_NULL(PREG(1))) { |
22342 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
22343 | | |
22344 | | if ((!PMC_IS_NULL(classobj))) { |
22345 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22346 | | } |
22347 | | else { |
22348 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
22349 | | |
22350 | | if ((type <= 0)) { |
22351 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
22352 | | |
22353 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22354 | | return (opcode_t *)dest; |
22355 | | } |
22356 | | |
22357 | | PREG(1) = Parrot_pmc_new(interp, type); |
22358 | | } |
22359 | | |
| 22300 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
22360 | 22301 | } |
22361 | 22302 | |
22362 | 22303 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22367 | 22308 | Parrot_fetch_p_pc_p_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
22368 | 22309 | PREG(1) = VTABLE_get_pmc_keyed(interp, PCONST(2), PREG(3)); |
22369 | 22310 | if (PMC_IS_NULL(PREG(1))) { |
22370 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
22371 | | |
22372 | | if ((!PMC_IS_NULL(classobj))) { |
22373 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22374 | | } |
22375 | | else { |
22376 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
22377 | | |
22378 | | if ((type <= 0)) { |
22379 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
22380 | | |
22381 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22382 | | return (opcode_t *)dest; |
22383 | | } |
22384 | | |
22385 | | PREG(1) = Parrot_pmc_new(interp, type); |
22386 | | } |
22387 | | |
| 22311 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
22388 | 22312 | } |
22389 | 22313 | |
22390 | 22314 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22395 | 22319 | Parrot_fetch_p_p_pc_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
22396 | 22320 | PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), PCONST(3)); |
22397 | 22321 | if (PMC_IS_NULL(PREG(1))) { |
22398 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
22399 | | |
22400 | | if ((!PMC_IS_NULL(classobj))) { |
22401 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22402 | | } |
22403 | | else { |
22404 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
22405 | | |
22406 | | if ((type <= 0)) { |
22407 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
22408 | | |
22409 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22410 | | return (opcode_t *)dest; |
22411 | | } |
22412 | | |
22413 | | PREG(1) = Parrot_pmc_new(interp, type); |
22414 | | } |
22415 | | |
| 22322 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
22416 | 22323 | } |
22417 | 22324 | |
22418 | 22325 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22423 | 22330 | Parrot_fetch_p_pc_pc_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
22424 | 22331 | PREG(1) = VTABLE_get_pmc_keyed(interp, PCONST(2), PCONST(3)); |
22425 | 22332 | if (PMC_IS_NULL(PREG(1))) { |
22426 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
22427 | | |
22428 | | if ((!PMC_IS_NULL(classobj))) { |
22429 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22430 | | } |
22431 | | else { |
22432 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
22433 | | |
22434 | | if ((type <= 0)) { |
22435 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
22436 | | |
22437 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22438 | | return (opcode_t *)dest; |
22439 | | } |
22440 | | |
22441 | | PREG(1) = Parrot_pmc_new(interp, type); |
22442 | | } |
22443 | | |
| 22333 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
22444 | 22334 | } |
22445 | 22335 | |
22446 | 22336 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22451 | 22341 | Parrot_fetch_p_p_i_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22452 | 22342 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PREG(2), IREG(3)); |
22453 | 22343 | if (PMC_IS_NULL(PREG(1))) { |
22454 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22455 | | |
22456 | | if ((!PMC_IS_NULL(classobj))) { |
22457 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22458 | | } |
22459 | | else { |
22460 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22461 | | |
22462 | | if ((type <= 0)) { |
22463 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22464 | | |
22465 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22466 | | return (opcode_t *)dest; |
22467 | | } |
22468 | | |
22469 | | PREG(1) = Parrot_pmc_new(interp, type); |
22470 | | } |
22471 | | |
| 22344 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22472 | 22345 | } |
22473 | 22346 | |
22474 | 22347 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22479 | 22352 | Parrot_fetch_p_pc_i_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22480 | 22353 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PCONST(2), IREG(3)); |
22481 | 22354 | if (PMC_IS_NULL(PREG(1))) { |
22482 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22483 | | |
22484 | | if ((!PMC_IS_NULL(classobj))) { |
22485 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22486 | | } |
22487 | | else { |
22488 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22489 | | |
22490 | | if ((type <= 0)) { |
22491 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22492 | | |
22493 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22494 | | return (opcode_t *)dest; |
22495 | | } |
22496 | | |
22497 | | PREG(1) = Parrot_pmc_new(interp, type); |
22498 | | } |
22499 | | |
| 22355 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22500 | 22356 | } |
22501 | 22357 | |
22502 | 22358 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22507 | 22363 | Parrot_fetch_p_p_ic_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22508 | 22364 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PREG(2), ICONST(3)); |
22509 | 22365 | if (PMC_IS_NULL(PREG(1))) { |
22510 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22511 | | |
22512 | | if ((!PMC_IS_NULL(classobj))) { |
22513 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22514 | | } |
22515 | | else { |
22516 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22517 | | |
22518 | | if ((type <= 0)) { |
22519 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22520 | | |
22521 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22522 | | return (opcode_t *)dest; |
22523 | | } |
22524 | | |
22525 | | PREG(1) = Parrot_pmc_new(interp, type); |
22526 | | } |
22527 | | |
| 22366 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22528 | 22367 | } |
22529 | 22368 | |
22530 | 22369 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22535 | 22374 | Parrot_fetch_p_pc_ic_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22536 | 22375 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PCONST(2), ICONST(3)); |
22537 | 22376 | if (PMC_IS_NULL(PREG(1))) { |
22538 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22539 | | |
22540 | | if ((!PMC_IS_NULL(classobj))) { |
22541 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22542 | | } |
22543 | | else { |
22544 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22545 | | |
22546 | | if ((type <= 0)) { |
22547 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22548 | | |
22549 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22550 | | return (opcode_t *)dest; |
22551 | | } |
22552 | | |
22553 | | PREG(1) = Parrot_pmc_new(interp, type); |
22554 | | } |
22555 | | |
| 22377 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22556 | 22378 | } |
22557 | 22379 | |
22558 | 22380 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22563 | 22385 | Parrot_fetch_p_p_i_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
22564 | 22386 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PREG(2), IREG(3)); |
22565 | 22387 | if (PMC_IS_NULL(PREG(1))) { |
22566 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
22567 | | |
22568 | | if ((!PMC_IS_NULL(classobj))) { |
22569 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22570 | | } |
22571 | | else { |
22572 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
22573 | | |
22574 | | if ((type <= 0)) { |
22575 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
22576 | | |
22577 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22578 | | return (opcode_t *)dest; |
22579 | | } |
22580 | | |
22581 | | PREG(1) = Parrot_pmc_new(interp, type); |
22582 | | } |
22583 | | |
| 22388 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
22584 | 22389 | } |
22585 | 22390 | |
22586 | 22391 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22591 | 22396 | Parrot_fetch_p_pc_i_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
22592 | 22397 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PCONST(2), IREG(3)); |
22593 | 22398 | if (PMC_IS_NULL(PREG(1))) { |
22594 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
22595 | | |
22596 | | if ((!PMC_IS_NULL(classobj))) { |
22597 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22598 | | } |
22599 | | else { |
22600 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
22601 | | |
22602 | | if ((type <= 0)) { |
22603 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
22604 | | |
22605 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22606 | | return (opcode_t *)dest; |
22607 | | } |
22608 | | |
22609 | | PREG(1) = Parrot_pmc_new(interp, type); |
22610 | | } |
22611 | | |
| 22399 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
22612 | 22400 | } |
22613 | 22401 | |
22614 | 22402 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22619 | 22407 | Parrot_fetch_p_p_ic_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
22620 | 22408 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PREG(2), ICONST(3)); |
22621 | 22409 | if (PMC_IS_NULL(PREG(1))) { |
22622 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
22623 | | |
22624 | | if ((!PMC_IS_NULL(classobj))) { |
22625 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22626 | | } |
22627 | | else { |
22628 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
22629 | | |
22630 | | if ((type <= 0)) { |
22631 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
22632 | | |
22633 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22634 | | return (opcode_t *)dest; |
22635 | | } |
22636 | | |
22637 | | PREG(1) = Parrot_pmc_new(interp, type); |
22638 | | } |
22639 | | |
| 22410 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
22640 | 22411 | } |
22641 | 22412 | |
22642 | 22413 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22647 | 22418 | Parrot_fetch_p_pc_ic_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
22648 | 22419 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PCONST(2), ICONST(3)); |
22649 | 22420 | if (PMC_IS_NULL(PREG(1))) { |
22650 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
22651 | | |
22652 | | if ((!PMC_IS_NULL(classobj))) { |
22653 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22654 | | } |
22655 | | else { |
22656 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
22657 | | |
22658 | | if ((type <= 0)) { |
22659 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
22660 | | |
22661 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22662 | | return (opcode_t *)dest; |
22663 | | } |
22664 | | |
22665 | | PREG(1) = Parrot_pmc_new(interp, type); |
22666 | | } |
22667 | | |
| 22421 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
22668 | 22422 | } |
22669 | 22423 | |
22670 | 22424 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22675 | 22429 | Parrot_fetch_p_p_s_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22676 | 22430 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), SREG(3)); |
22677 | 22431 | if (PMC_IS_NULL(PREG(1))) { |
22678 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22679 | | |
22680 | | if ((!PMC_IS_NULL(classobj))) { |
22681 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22682 | | } |
22683 | | else { |
22684 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22685 | | |
22686 | | if ((type <= 0)) { |
22687 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22688 | | |
22689 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22690 | | return (opcode_t *)dest; |
22691 | | } |
22692 | | |
22693 | | PREG(1) = Parrot_pmc_new(interp, type); |
22694 | | } |
22695 | | |
| 22432 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22696 | 22433 | } |
22697 | 22434 | |
22698 | 22435 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22703 | 22440 | Parrot_fetch_p_pc_s_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22704 | 22441 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PCONST(2), SREG(3)); |
22705 | 22442 | if (PMC_IS_NULL(PREG(1))) { |
22706 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22707 | | |
22708 | | if ((!PMC_IS_NULL(classobj))) { |
22709 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22710 | | } |
22711 | | else { |
22712 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22713 | | |
22714 | | if ((type <= 0)) { |
22715 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22716 | | |
22717 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22718 | | return (opcode_t *)dest; |
22719 | | } |
22720 | | |
22721 | | PREG(1) = Parrot_pmc_new(interp, type); |
22722 | | } |
22723 | | |
| 22443 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22724 | 22444 | } |
22725 | 22445 | |
22726 | 22446 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22731 | 22451 | Parrot_fetch_p_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22732 | 22452 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), SCONST(3)); |
22733 | 22453 | if (PMC_IS_NULL(PREG(1))) { |
22734 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22735 | | |
22736 | | if ((!PMC_IS_NULL(classobj))) { |
22737 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22738 | | } |
22739 | | else { |
22740 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22741 | | |
22742 | | if ((type <= 0)) { |
22743 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22744 | | |
22745 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22746 | | return (opcode_t *)dest; |
22747 | | } |
22748 | | |
22749 | | PREG(1) = Parrot_pmc_new(interp, type); |
22750 | | } |
22751 | | |
| 22454 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22752 | 22455 | } |
22753 | 22456 | |
22754 | 22457 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22759 | 22462 | Parrot_fetch_p_pc_sc_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22760 | 22463 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PCONST(2), SCONST(3)); |
22761 | 22464 | if (PMC_IS_NULL(PREG(1))) { |
22762 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22763 | | |
22764 | | if ((!PMC_IS_NULL(classobj))) { |
22765 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22766 | | } |
22767 | | else { |
22768 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22769 | | |
22770 | | if ((type <= 0)) { |
22771 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22772 | | |
22773 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22774 | | return (opcode_t *)dest; |
22775 | | } |
22776 | | |
22777 | | PREG(1) = Parrot_pmc_new(interp, type); |
22778 | | } |
22779 | | |
| 22465 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22780 | 22466 | } |
22781 | 22467 | |
22782 | 22468 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22787 | 22473 | Parrot_fetch_p_p_s_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
22788 | 22474 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), SREG(3)); |
22789 | 22475 | if (PMC_IS_NULL(PREG(1))) { |
22790 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
22791 | | |
22792 | | if ((!PMC_IS_NULL(classobj))) { |
22793 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22794 | | } |
22795 | | else { |
22796 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
22797 | | |
22798 | | if ((type <= 0)) { |
22799 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
22800 | | |
22801 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22802 | | return (opcode_t *)dest; |
22803 | | } |
22804 | | |
22805 | | PREG(1) = Parrot_pmc_new(interp, type); |
22806 | | } |
22807 | | |
| 22476 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
22808 | 22477 | } |
22809 | 22478 | |
22810 | 22479 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22815 | 22484 | Parrot_fetch_p_pc_s_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
22816 | 22485 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PCONST(2), SREG(3)); |
22817 | 22486 | if (PMC_IS_NULL(PREG(1))) { |
22818 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
22819 | | |
22820 | | if ((!PMC_IS_NULL(classobj))) { |
22821 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22822 | | } |
22823 | | else { |
22824 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
22825 | | |
22826 | | if ((type <= 0)) { |
22827 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
22828 | | |
22829 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22830 | | return (opcode_t *)dest; |
22831 | | } |
22832 | | |
22833 | | PREG(1) = Parrot_pmc_new(interp, type); |
22834 | | } |
22835 | | |
| 22487 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
22836 | 22488 | } |
22837 | 22489 | |
22838 | 22490 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22843 | 22495 | Parrot_fetch_p_p_sc_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
22844 | 22496 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), SCONST(3)); |
22845 | 22497 | if (PMC_IS_NULL(PREG(1))) { |
22846 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
22847 | | |
22848 | | if ((!PMC_IS_NULL(classobj))) { |
22849 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22850 | | } |
22851 | | else { |
22852 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
22853 | | |
22854 | | if ((type <= 0)) { |
22855 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
22856 | | |
22857 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22858 | | return (opcode_t *)dest; |
22859 | | } |
22860 | | |
22861 | | PREG(1) = Parrot_pmc_new(interp, type); |
22862 | | } |
22863 | | |
| 22498 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
22864 | 22499 | } |
22865 | 22500 | |
22866 | 22501 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22871 | 22506 | Parrot_fetch_p_pc_sc_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
22872 | 22507 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PCONST(2), SCONST(3)); |
22873 | 22508 | if (PMC_IS_NULL(PREG(1))) { |
22874 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
22875 | | |
22876 | | if ((!PMC_IS_NULL(classobj))) { |
22877 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22878 | | } |
22879 | | else { |
22880 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
22881 | | |
22882 | | if ((type <= 0)) { |
22883 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
22884 | | |
22885 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22886 | | return (opcode_t *)dest; |
22887 | | } |
22888 | | |
22889 | | PREG(1) = Parrot_pmc_new(interp, type); |
22890 | | } |
22891 | | |
| 22509 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
22892 | 22510 | } |
22893 | 22511 | |
22894 | 22512 | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
… |
… |
|
22899 | 22517 | Parrot_vivify_p_p_p_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22900 | 22518 | PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), PREG(3)); |
22901 | 22519 | if (PMC_IS_NULL(PREG(1))) { |
22902 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22903 | | |
22904 | | if ((!PMC_IS_NULL(classobj))) { |
22905 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22906 | | } |
22907 | | else { |
22908 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22909 | | |
22910 | | if ((type <= 0)) { |
22911 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22912 | | |
22913 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22914 | | return (opcode_t *)dest; |
22915 | | } |
22916 | | |
22917 | | PREG(1) = Parrot_pmc_new(interp, type); |
22918 | | } |
22919 | | |
| 22520 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22920 | 22521 | VTABLE_set_pmc_keyed(interp, PREG(2), PREG(3), PREG(1)); |
22921 | 22522 | } |
22922 | 22523 | |
… |
… |
|
22928 | 22529 | Parrot_vivify_p_pc_p_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22929 | 22530 | PREG(1) = VTABLE_get_pmc_keyed(interp, PCONST(2), PREG(3)); |
22930 | 22531 | if (PMC_IS_NULL(PREG(1))) { |
22931 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22932 | | |
22933 | | if ((!PMC_IS_NULL(classobj))) { |
22934 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22935 | | } |
22936 | | else { |
22937 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22938 | | |
22939 | | if ((type <= 0)) { |
22940 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22941 | | |
22942 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22943 | | return (opcode_t *)dest; |
22944 | | } |
22945 | | |
22946 | | PREG(1) = Parrot_pmc_new(interp, type); |
22947 | | } |
22948 | | |
| 22532 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22949 | 22533 | VTABLE_set_pmc_keyed(interp, PCONST(2), PREG(3), PREG(1)); |
22950 | 22534 | } |
22951 | 22535 | |
… |
… |
|
22957 | 22541 | Parrot_vivify_p_p_pc_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22958 | 22542 | PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), PCONST(3)); |
22959 | 22543 | if (PMC_IS_NULL(PREG(1))) { |
22960 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22961 | | |
22962 | | if ((!PMC_IS_NULL(classobj))) { |
22963 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22964 | | } |
22965 | | else { |
22966 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22967 | | |
22968 | | if ((type <= 0)) { |
22969 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22970 | | |
22971 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
22972 | | return (opcode_t *)dest; |
22973 | | } |
22974 | | |
22975 | | PREG(1) = Parrot_pmc_new(interp, type); |
22976 | | } |
22977 | | |
| 22544 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
22978 | 22545 | VTABLE_set_pmc_keyed(interp, PREG(2), PCONST(3), PREG(1)); |
22979 | 22546 | } |
22980 | 22547 | |
… |
… |
|
22986 | 22553 | Parrot_vivify_p_pc_pc_p(opcode_t *cur_opcode, PARROT_INTERP) { |
22987 | 22554 | PREG(1) = VTABLE_get_pmc_keyed(interp, PCONST(2), PCONST(3)); |
22988 | 22555 | if (PMC_IS_NULL(PREG(1))) { |
22989 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
22990 | | |
22991 | | if ((!PMC_IS_NULL(classobj))) { |
22992 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
22993 | | } |
22994 | | else { |
22995 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
22996 | | |
22997 | | if ((type <= 0)) { |
22998 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
22999 | | |
23000 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23001 | | return (opcode_t *)dest; |
23002 | | } |
23003 | | |
23004 | | PREG(1) = Parrot_pmc_new(interp, type); |
23005 | | } |
23006 | | |
| 22556 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
23007 | 22557 | VTABLE_set_pmc_keyed(interp, PCONST(2), PCONST(3), PREG(1)); |
23008 | 22558 | } |
23009 | 22559 | |
… |
… |
|
23015 | 22565 | Parrot_vivify_p_p_p_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
23016 | 22566 | PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), PREG(3)); |
23017 | 22567 | if (PMC_IS_NULL(PREG(1))) { |
23018 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
23019 | | |
23020 | | if ((!PMC_IS_NULL(classobj))) { |
23021 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23022 | | } |
23023 | | else { |
23024 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
23025 | | |
23026 | | if ((type <= 0)) { |
23027 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
23028 | | |
23029 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23030 | | return (opcode_t *)dest; |
23031 | | } |
23032 | | |
23033 | | PREG(1) = Parrot_pmc_new(interp, type); |
23034 | | } |
23035 | | |
| 22568 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
23036 | 22569 | VTABLE_set_pmc_keyed(interp, PREG(2), PREG(3), PREG(1)); |
23037 | 22570 | } |
23038 | 22571 | |
… |
… |
|
23044 | 22577 | Parrot_vivify_p_pc_p_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
23045 | 22578 | PREG(1) = VTABLE_get_pmc_keyed(interp, PCONST(2), PREG(3)); |
23046 | 22579 | if (PMC_IS_NULL(PREG(1))) { |
23047 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
23048 | | |
23049 | | if ((!PMC_IS_NULL(classobj))) { |
23050 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23051 | | } |
23052 | | else { |
23053 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
23054 | | |
23055 | | if ((type <= 0)) { |
23056 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
23057 | | |
23058 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23059 | | return (opcode_t *)dest; |
23060 | | } |
23061 | | |
23062 | | PREG(1) = Parrot_pmc_new(interp, type); |
23063 | | } |
23064 | | |
| 22580 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
23065 | 22581 | VTABLE_set_pmc_keyed(interp, PCONST(2), PREG(3), PREG(1)); |
23066 | 22582 | } |
23067 | 22583 | |
… |
… |
|
23073 | 22589 | Parrot_vivify_p_p_pc_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
23074 | 22590 | PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), PCONST(3)); |
23075 | 22591 | if (PMC_IS_NULL(PREG(1))) { |
23076 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
23077 | | |
23078 | | if ((!PMC_IS_NULL(classobj))) { |
23079 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23080 | | } |
23081 | | else { |
23082 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
23083 | | |
23084 | | if ((type <= 0)) { |
23085 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
23086 | | |
23087 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23088 | | return (opcode_t *)dest; |
23089 | | } |
23090 | | |
23091 | | PREG(1) = Parrot_pmc_new(interp, type); |
23092 | | } |
23093 | | |
| 22592 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
23094 | 22593 | VTABLE_set_pmc_keyed(interp, PREG(2), PCONST(3), PREG(1)); |
23095 | 22594 | } |
23096 | 22595 | |
… |
… |
|
23102 | 22601 | Parrot_vivify_p_pc_pc_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
23103 | 22602 | PREG(1) = VTABLE_get_pmc_keyed(interp, PCONST(2), PCONST(3)); |
23104 | 22603 | if (PMC_IS_NULL(PREG(1))) { |
23105 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
23106 | | |
23107 | | if ((!PMC_IS_NULL(classobj))) { |
23108 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23109 | | } |
23110 | | else { |
23111 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
23112 | | |
23113 | | if ((type <= 0)) { |
23114 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
23115 | | |
23116 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23117 | | return (opcode_t *)dest; |
23118 | | } |
23119 | | |
23120 | | PREG(1) = Parrot_pmc_new(interp, type); |
23121 | | } |
23122 | | |
| 22604 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
23123 | 22605 | VTABLE_set_pmc_keyed(interp, PCONST(2), PCONST(3), PREG(1)); |
23124 | 22606 | } |
23125 | 22607 | |
… |
… |
|
23131 | 22613 | Parrot_vivify_p_p_i_p(opcode_t *cur_opcode, PARROT_INTERP) { |
23132 | 22614 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PREG(2), IREG(3)); |
23133 | 22615 | if (PMC_IS_NULL(PREG(1))) { |
23134 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
23135 | | |
23136 | | if ((!PMC_IS_NULL(classobj))) { |
23137 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23138 | | } |
23139 | | else { |
23140 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
23141 | | |
23142 | | if ((type <= 0)) { |
23143 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
23144 | | |
23145 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23146 | | return (opcode_t *)dest; |
23147 | | } |
23148 | | |
23149 | | PREG(1) = Parrot_pmc_new(interp, type); |
23150 | | } |
23151 | | |
| 22616 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
23152 | 22617 | VTABLE_set_pmc_keyed_int(interp, PREG(2), IREG(3), PREG(1)); |
23153 | 22618 | } |
23154 | 22619 | |
… |
… |
|
23160 | 22625 | Parrot_vivify_p_pc_i_p(opcode_t *cur_opcode, PARROT_INTERP) { |
23161 | 22626 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PCONST(2), IREG(3)); |
23162 | 22627 | if (PMC_IS_NULL(PREG(1))) { |
23163 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
23164 | | |
23165 | | if ((!PMC_IS_NULL(classobj))) { |
23166 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23167 | | } |
23168 | | else { |
23169 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
23170 | | |
23171 | | if ((type <= 0)) { |
23172 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
23173 | | |
23174 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23175 | | return (opcode_t *)dest; |
23176 | | } |
23177 | | |
23178 | | PREG(1) = Parrot_pmc_new(interp, type); |
23179 | | } |
23180 | | |
| 22628 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
23181 | 22629 | VTABLE_set_pmc_keyed_int(interp, PCONST(2), IREG(3), PREG(1)); |
23182 | 22630 | } |
23183 | 22631 | |
… |
… |
|
23189 | 22637 | Parrot_vivify_p_p_ic_p(opcode_t *cur_opcode, PARROT_INTERP) { |
23190 | 22638 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PREG(2), ICONST(3)); |
23191 | 22639 | if (PMC_IS_NULL(PREG(1))) { |
23192 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
23193 | | |
23194 | | if ((!PMC_IS_NULL(classobj))) { |
23195 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23196 | | } |
23197 | | else { |
23198 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
23199 | | |
23200 | | if ((type <= 0)) { |
23201 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
23202 | | |
23203 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23204 | | return (opcode_t *)dest; |
23205 | | } |
23206 | | |
23207 | | PREG(1) = Parrot_pmc_new(interp, type); |
23208 | | } |
23209 | | |
| 22640 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
23210 | 22641 | VTABLE_set_pmc_keyed_int(interp, PREG(2), ICONST(3), PREG(1)); |
23211 | 22642 | } |
23212 | 22643 | |
… |
… |
|
23218 | 22649 | Parrot_vivify_p_pc_ic_p(opcode_t *cur_opcode, PARROT_INTERP) { |
23219 | 22650 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PCONST(2), ICONST(3)); |
23220 | 22651 | if (PMC_IS_NULL(PREG(1))) { |
23221 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
23222 | | |
23223 | | if ((!PMC_IS_NULL(classobj))) { |
23224 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23225 | | } |
23226 | | else { |
23227 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
23228 | | |
23229 | | if ((type <= 0)) { |
23230 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
23231 | | |
23232 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23233 | | return (opcode_t *)dest; |
23234 | | } |
23235 | | |
23236 | | PREG(1) = Parrot_pmc_new(interp, type); |
23237 | | } |
23238 | | |
| 22652 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
23239 | 22653 | VTABLE_set_pmc_keyed_int(interp, PCONST(2), ICONST(3), PREG(1)); |
23240 | 22654 | } |
23241 | 22655 | |
… |
… |
|
23247 | 22661 | Parrot_vivify_p_p_i_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
23248 | 22662 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PREG(2), IREG(3)); |
23249 | 22663 | if (PMC_IS_NULL(PREG(1))) { |
23250 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
23251 | | |
23252 | | if ((!PMC_IS_NULL(classobj))) { |
23253 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23254 | | } |
23255 | | else { |
23256 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
23257 | | |
23258 | | if ((type <= 0)) { |
23259 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
23260 | | |
23261 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23262 | | return (opcode_t *)dest; |
23263 | | } |
23264 | | |
23265 | | PREG(1) = Parrot_pmc_new(interp, type); |
23266 | | } |
23267 | | |
| 22664 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
23268 | 22665 | VTABLE_set_pmc_keyed_int(interp, PREG(2), IREG(3), PREG(1)); |
23269 | 22666 | } |
23270 | 22667 | |
… |
… |
|
23276 | 22673 | Parrot_vivify_p_pc_i_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
23277 | 22674 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PCONST(2), IREG(3)); |
23278 | 22675 | if (PMC_IS_NULL(PREG(1))) { |
23279 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
23280 | | |
23281 | | if ((!PMC_IS_NULL(classobj))) { |
23282 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23283 | | } |
23284 | | else { |
23285 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
23286 | | |
23287 | | if ((type <= 0)) { |
23288 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
23289 | | |
23290 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23291 | | return (opcode_t *)dest; |
23292 | | } |
23293 | | |
23294 | | PREG(1) = Parrot_pmc_new(interp, type); |
23295 | | } |
23296 | | |
| 22676 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
23297 | 22677 | VTABLE_set_pmc_keyed_int(interp, PCONST(2), IREG(3), PREG(1)); |
23298 | 22678 | } |
23299 | 22679 | |
… |
… |
|
23305 | 22685 | Parrot_vivify_p_p_ic_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
23306 | 22686 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PREG(2), ICONST(3)); |
23307 | 22687 | if (PMC_IS_NULL(PREG(1))) { |
23308 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
23309 | | |
23310 | | if ((!PMC_IS_NULL(classobj))) { |
23311 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23312 | | } |
23313 | | else { |
23314 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
23315 | | |
23316 | | if ((type <= 0)) { |
23317 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
23318 | | |
23319 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23320 | | return (opcode_t *)dest; |
23321 | | } |
23322 | | |
23323 | | PREG(1) = Parrot_pmc_new(interp, type); |
23324 | | } |
23325 | | |
| 22688 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
23326 | 22689 | VTABLE_set_pmc_keyed_int(interp, PREG(2), ICONST(3), PREG(1)); |
23327 | 22690 | } |
23328 | 22691 | |
… |
… |
|
23334 | 22697 | Parrot_vivify_p_pc_ic_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
23335 | 22698 | PREG(1) = VTABLE_get_pmc_keyed_int(interp, PCONST(2), ICONST(3)); |
23336 | 22699 | if (PMC_IS_NULL(PREG(1))) { |
23337 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
23338 | | |
23339 | | if ((!PMC_IS_NULL(classobj))) { |
23340 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23341 | | } |
23342 | | else { |
23343 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
23344 | | |
23345 | | if ((type <= 0)) { |
23346 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
23347 | | |
23348 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23349 | | return (opcode_t *)dest; |
23350 | | } |
23351 | | |
23352 | | PREG(1) = Parrot_pmc_new(interp, type); |
23353 | | } |
23354 | | |
| 22700 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
23355 | 22701 | VTABLE_set_pmc_keyed_int(interp, PCONST(2), ICONST(3), PREG(1)); |
23356 | 22702 | } |
23357 | 22703 | |
… |
… |
|
23363 | 22709 | Parrot_vivify_p_p_s_p(opcode_t *cur_opcode, PARROT_INTERP) { |
23364 | 22710 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), SREG(3)); |
23365 | 22711 | if (PMC_IS_NULL(PREG(1))) { |
23366 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
23367 | | |
23368 | | if ((!PMC_IS_NULL(classobj))) { |
23369 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23370 | | } |
23371 | | else { |
23372 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
23373 | | |
23374 | | if ((type <= 0)) { |
23375 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
23376 | | |
23377 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23378 | | return (opcode_t *)dest; |
23379 | | } |
23380 | | |
23381 | | PREG(1) = Parrot_pmc_new(interp, type); |
23382 | | } |
23383 | | |
| 22712 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
23384 | 22713 | VTABLE_set_pmc_keyed_str(interp, PREG(2), SREG(3), PREG(1)); |
23385 | 22714 | } |
23386 | 22715 | |
… |
… |
|
23392 | 22721 | Parrot_vivify_p_pc_s_p(opcode_t *cur_opcode, PARROT_INTERP) { |
23393 | 22722 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PCONST(2), SREG(3)); |
23394 | 22723 | if (PMC_IS_NULL(PREG(1))) { |
23395 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
23396 | | |
23397 | | if ((!PMC_IS_NULL(classobj))) { |
23398 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23399 | | } |
23400 | | else { |
23401 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
23402 | | |
23403 | | if ((type <= 0)) { |
23404 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
23405 | | |
23406 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23407 | | return (opcode_t *)dest; |
23408 | | } |
23409 | | |
23410 | | PREG(1) = Parrot_pmc_new(interp, type); |
23411 | | } |
23412 | | |
| 22724 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
23413 | 22725 | VTABLE_set_pmc_keyed_str(interp, PCONST(2), SREG(3), PREG(1)); |
23414 | 22726 | } |
23415 | 22727 | |
… |
… |
|
23421 | 22733 | Parrot_vivify_p_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) { |
23422 | 22734 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), SCONST(3)); |
23423 | 22735 | if (PMC_IS_NULL(PREG(1))) { |
23424 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
23425 | | |
23426 | | if ((!PMC_IS_NULL(classobj))) { |
23427 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23428 | | } |
23429 | | else { |
23430 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
23431 | | |
23432 | | if ((type <= 0)) { |
23433 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
23434 | | |
23435 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23436 | | return (opcode_t *)dest; |
23437 | | } |
23438 | | |
23439 | | PREG(1) = Parrot_pmc_new(interp, type); |
23440 | | } |
23441 | | |
| 22736 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
23442 | 22737 | VTABLE_set_pmc_keyed_str(interp, PREG(2), SCONST(3), PREG(1)); |
23443 | 22738 | } |
23444 | 22739 | |
… |
… |
|
23450 | 22745 | Parrot_vivify_p_pc_sc_p(opcode_t *cur_opcode, PARROT_INTERP) { |
23451 | 22746 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PCONST(2), SCONST(3)); |
23452 | 22747 | if (PMC_IS_NULL(PREG(1))) { |
23453 | | PMC * const classobj = Parrot_oo_get_class(interp, PREG(4)); |
23454 | | |
23455 | | if ((!PMC_IS_NULL(classobj))) { |
23456 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23457 | | } |
23458 | | else { |
23459 | | const INTVAL type = Parrot_pmc_get_type(interp, PREG(4)); |
23460 | | |
23461 | | if ((type <= 0)) { |
23462 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4))); |
23463 | | |
23464 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23465 | | return (opcode_t *)dest; |
23466 | | } |
23467 | | |
23468 | | PREG(1) = Parrot_pmc_new(interp, type); |
23469 | | } |
23470 | | |
| 22748 | PREG(1) = parrot_pmc_new_from_type(interp, PREG(4)); |
23471 | 22749 | VTABLE_set_pmc_keyed_str(interp, PCONST(2), SCONST(3), PREG(1)); |
23472 | 22750 | } |
23473 | 22751 | |
… |
… |
|
23479 | 22757 | Parrot_vivify_p_p_s_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
23480 | 22758 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), SREG(3)); |
23481 | 22759 | if (PMC_IS_NULL(PREG(1))) { |
23482 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
23483 | | |
23484 | | if ((!PMC_IS_NULL(classobj))) { |
23485 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23486 | | } |
23487 | | else { |
23488 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
23489 | | |
23490 | | if ((type <= 0)) { |
23491 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
23492 | | |
23493 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23494 | | return (opcode_t *)dest; |
23495 | | } |
23496 | | |
23497 | | PREG(1) = Parrot_pmc_new(interp, type); |
23498 | | } |
23499 | | |
| 22760 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
23500 | 22761 | VTABLE_set_pmc_keyed_str(interp, PREG(2), SREG(3), PREG(1)); |
23501 | 22762 | } |
23502 | 22763 | |
… |
… |
|
23508 | 22769 | Parrot_vivify_p_pc_s_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
23509 | 22770 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PCONST(2), SREG(3)); |
23510 | 22771 | if (PMC_IS_NULL(PREG(1))) { |
23511 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
23512 | | |
23513 | | if ((!PMC_IS_NULL(classobj))) { |
23514 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23515 | | } |
23516 | | else { |
23517 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
23518 | | |
23519 | | if ((type <= 0)) { |
23520 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
23521 | | |
23522 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23523 | | return (opcode_t *)dest; |
23524 | | } |
23525 | | |
23526 | | PREG(1) = Parrot_pmc_new(interp, type); |
23527 | | } |
23528 | | |
| 22772 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
23529 | 22773 | VTABLE_set_pmc_keyed_str(interp, PCONST(2), SREG(3), PREG(1)); |
23530 | 22774 | } |
23531 | 22775 | |
… |
… |
|
23537 | 22781 | Parrot_vivify_p_p_sc_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
23538 | 22782 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), SCONST(3)); |
23539 | 22783 | if (PMC_IS_NULL(PREG(1))) { |
23540 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
23541 | | |
23542 | | if ((!PMC_IS_NULL(classobj))) { |
23543 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23544 | | } |
23545 | | else { |
23546 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
23547 | | |
23548 | | if ((type <= 0)) { |
23549 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
23550 | | |
23551 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23552 | | return (opcode_t *)dest; |
23553 | | } |
23554 | | |
23555 | | PREG(1) = Parrot_pmc_new(interp, type); |
23556 | | } |
23557 | | |
| 22784 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
23558 | 22785 | VTABLE_set_pmc_keyed_str(interp, PREG(2), SCONST(3), PREG(1)); |
23559 | 22786 | } |
23560 | 22787 | |
… |
… |
|
23566 | 22793 | Parrot_vivify_p_pc_sc_pc(opcode_t *cur_opcode, PARROT_INTERP) { |
23567 | 22794 | PREG(1) = VTABLE_get_pmc_keyed_str(interp, PCONST(2), SCONST(3)); |
23568 | 22795 | if (PMC_IS_NULL(PREG(1))) { |
23569 | | PMC * const classobj = Parrot_oo_get_class(interp, PCONST(4)); |
23570 | | |
23571 | | if ((!PMC_IS_NULL(classobj))) { |
23572 | | PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL); |
23573 | | } |
23574 | | else { |
23575 | | const INTVAL type = Parrot_pmc_get_type(interp, PCONST(4)); |
23576 | | |
23577 | | if ((type <= 0)) { |
23578 | | opcode_t * dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 5, EXCEPTION_NO_CLASS, "Class '%Ss' not found", VTABLE_get_repr(interp, PCONST(4))); |
23579 | | |
23580 | | PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp)); |
23581 | | return (opcode_t *)dest; |
23582 | | } |
23583 | | |
23584 | | PREG(1) = Parrot_pmc_new(interp, type); |
23585 | | } |
23586 | | |
| 22796 | PREG(1) = parrot_pmc_new_from_type(interp, PCONST(4)); |
23587 | 22797 | VTABLE_set_pmc_keyed_str(interp, PCONST(2), SCONST(3), PREG(1)); |
23588 | 22798 | } |
23589 | 22799 | |
diff --git a/src/ops/experimental.ops b/src/ops/experimental.ops
index ec288ac..88a7c89b 100644
a
|
b
|
|
2 | 2 | ** experimental.ops |
3 | 3 | */ |
4 | 4 | |
| 5 | BEGIN_OPS_PREAMBLE |
| 6 | |
| 7 | PARROT_WARN_UNUSED_RESULT |
| 8 | PMC * |
| 9 | parrot_pmc_new_from_type(PARROT_INTERP, ARGIN(PMC *key)) |
| 10 | { |
| 11 | PMC *pmc; |
| 12 | PMC *const classobj = Parrot_oo_get_class(interp, key); |
| 13 | |
| 14 | if (!PMC_IS_NULL(classobj)) |
| 15 | pmc = VTABLE_instantiate(interp, classobj, PMCNULL); |
| 16 | else { |
| 17 | const INTVAL type = Parrot_pmc_get_type(interp, key); |
| 18 | |
| 19 | if (type <= 0) { |
| 20 | Parrot_ex_throw_from_c_args(interp, NULL, |
| 21 | EXCEPTION_NO_CLASS, "Class '%Ss' not found", |
| 22 | VTABLE_get_repr(interp, key)); |
| 23 | } |
| 24 | |
| 25 | pmc = Parrot_pmc_new(interp, type); |
| 26 | } |
| 27 | |
| 28 | return pmc; |
| 29 | } |
| 30 | |
| 31 | END_OPS_PREAMBLE |
| 32 | |
5 | 33 | =head1 NAME |
6 | 34 | |
7 | 35 | experimental.ops - Experimental Opcodes |
… |
… |
|
84 | 112 | |
85 | 113 | inline op fetch(out PMC, in PMC, in PMC, in PMC) :base_core { |
86 | 114 | $1 = VTABLE_get_pmc_keyed(interp, $2, $3); |
| 115 | |
87 | 116 | if (PMC_IS_NULL($1)) { |
88 | | PMC * const classobj = Parrot_oo_get_class(interp, $4); |
89 | | if (!PMC_IS_NULL(classobj)) |
90 | | $1 = VTABLE_instantiate(interp, classobj, PMCNULL); |
91 | | else { |
92 | | const INTVAL type = Parrot_pmc_get_type(interp, $4); |
93 | | if (type <= 0) { |
94 | | opcode_t *dest = Parrot_ex_throw_from_op_args( |
95 | | interp, expr NEXT(), EXCEPTION_NO_CLASS, |
96 | | "Class '%Ss' not found", VTABLE_get_repr(interp, $4)); |
97 | | goto ADDRESS(dest); |
98 | | } |
99 | | |
100 | | $1 = Parrot_pmc_new(interp, type); |
101 | | } |
| 117 | $1 = parrot_pmc_new_from_type(interp, $4); |
102 | 118 | } |
103 | 119 | } |
104 | 120 | |
105 | 121 | inline op fetch(out PMC, in PMC, in INT, in PMC) :base_core { |
106 | 122 | $1 = VTABLE_get_pmc_keyed_int(interp, $2, $3); |
| 123 | |
107 | 124 | if (PMC_IS_NULL($1)) { |
108 | | PMC * const classobj = Parrot_oo_get_class(interp, $4); |
109 | | if (!PMC_IS_NULL(classobj)) |
110 | | $1 = VTABLE_instantiate(interp, classobj, PMCNULL); |
111 | | else { |
112 | | const INTVAL type = Parrot_pmc_get_type(interp, $4); |
113 | | if (type <= 0) { |
114 | | opcode_t *dest = Parrot_ex_throw_from_op_args( |
115 | | interp, expr NEXT(), EXCEPTION_NO_CLASS, |
116 | | "Class '%Ss' not found", VTABLE_get_repr(interp, $4)); |
117 | | goto ADDRESS(dest); |
118 | | } |
119 | | |
120 | | $1 = Parrot_pmc_new(interp, type); |
121 | | } |
| 125 | $1 = parrot_pmc_new_from_type(interp, $4); |
122 | 126 | } |
123 | 127 | } |
124 | 128 | |
125 | 129 | inline op fetch(out PMC, in PMC, in STR, in PMC) :base_core { |
126 | 130 | $1 = VTABLE_get_pmc_keyed_str(interp, $2, $3); |
| 131 | |
127 | 132 | if (PMC_IS_NULL($1)) { |
128 | | PMC * const classobj = Parrot_oo_get_class(interp, $4); |
129 | | if (!PMC_IS_NULL(classobj)) |
130 | | $1 = VTABLE_instantiate(interp, classobj, PMCNULL); |
131 | | else { |
132 | | const INTVAL type = Parrot_pmc_get_type(interp, $4); |
133 | | if (type <= 0) { |
134 | | opcode_t *dest = Parrot_ex_throw_from_op_args( |
135 | | interp, expr NEXT(), EXCEPTION_NO_CLASS, |
136 | | "Class '%Ss' not found", VTABLE_get_repr(interp, $4)); |
137 | | goto ADDRESS(dest); |
138 | | } |
139 | | |
140 | | $1 = Parrot_pmc_new(interp, type); |
141 | | } |
| 133 | $1 = parrot_pmc_new_from_type(interp, $4); |
142 | 134 | } |
143 | 135 | } |
144 | 136 | |
… |
… |
|
157 | 149 | $1 = VTABLE_get_pmc_keyed(interp, $2, $3); |
158 | 150 | |
159 | 151 | if (PMC_IS_NULL($1)) { |
160 | | PMC * const classobj = Parrot_oo_get_class(interp, $4); |
161 | | |
162 | | if (!PMC_IS_NULL(classobj)) |
163 | | $1 = VTABLE_instantiate(interp, classobj, PMCNULL); |
164 | | else { |
165 | | const INTVAL type = Parrot_pmc_get_type(interp, $4); |
166 | | if (type <= 0) { |
167 | | opcode_t *dest = Parrot_ex_throw_from_op_args( |
168 | | interp, expr NEXT(), EXCEPTION_NO_CLASS, |
169 | | "Class '%Ss' not found", VTABLE_get_repr(interp, $4)); |
170 | | goto ADDRESS(dest); |
171 | | } |
172 | | |
173 | | $1 = Parrot_pmc_new(interp, type); |
174 | | } |
| 152 | $1 = parrot_pmc_new_from_type(interp, $4); |
| 153 | |
175 | 154 | VTABLE_set_pmc_keyed(interp, $2, $3, $1); |
176 | 155 | } |
177 | 156 | } |
… |
… |
|
180 | 159 | $1 = VTABLE_get_pmc_keyed_int(interp, $2, $3); |
181 | 160 | |
182 | 161 | if (PMC_IS_NULL($1)) { |
183 | | PMC * const classobj = Parrot_oo_get_class(interp, $4); |
184 | | if (!PMC_IS_NULL(classobj)) |
185 | | $1 = VTABLE_instantiate(interp, classobj, PMCNULL); |
186 | | else { |
187 | | const INTVAL type = Parrot_pmc_get_type(interp, $4); |
188 | | if (type <= 0) { |
189 | | opcode_t *dest = Parrot_ex_throw_from_op_args( |
190 | | interp, expr NEXT(), EXCEPTION_NO_CLASS, |
191 | | "Class '%Ss' not found", VTABLE_get_repr(interp, $4)); |
192 | | goto ADDRESS(dest); |
193 | | } |
194 | | |
195 | | $1 = Parrot_pmc_new(interp, type); |
196 | | } |
| 162 | $1 = parrot_pmc_new_from_type(interp, $4); |
197 | 163 | |
198 | 164 | VTABLE_set_pmc_keyed_int(interp, $2, $3, $1); |
199 | 165 | } |
… |
… |
|
203 | 169 | $1 = VTABLE_get_pmc_keyed_str(interp, $2, $3); |
204 | 170 | |
205 | 171 | if (PMC_IS_NULL($1)) { |
206 | | PMC * const classobj = Parrot_oo_get_class(interp, $4); |
207 | | if (!PMC_IS_NULL(classobj)) |
208 | | $1 = VTABLE_instantiate(interp, classobj, PMCNULL); |
209 | | else { |
210 | | const INTVAL type = Parrot_pmc_get_type(interp, $4); |
211 | | if (type <= 0) { |
212 | | opcode_t *dest = Parrot_ex_throw_from_op_args( |
213 | | interp, expr NEXT(), EXCEPTION_NO_CLASS, |
214 | | "Class '%Ss' not found", VTABLE_get_repr(interp, $4)); |
215 | | goto ADDRESS(dest); |
216 | | } |
217 | | |
218 | | $1 = Parrot_pmc_new(interp, type); |
219 | | } |
| 172 | $1 = parrot_pmc_new_from_type(interp, $4); |
220 | 173 | |
221 | 174 | VTABLE_set_pmc_keyed_str(interp, $2, $3, $1); |
222 | 175 | } |