Commit 2efb6d3
committed
S_newONCEOP: correctly copy array/hash at subroutine exit
Should a _state_ array or hash be declared immediately prior to
returning, the error "Bizarre copy of HASH in subroutine exit" error
would be triggered. Now, the array or hash is returned without error.
Specifically:
* Instead of always creating a PADSV, the appropriate padop is created.
* The OPf_REF flag is switched off, allowing the return of the
container variable's contents rather than the container SV itself.
* The OPf_MOD & OPf_SPECIAL flags are switches off, as they are not
relevant to this version of the padop.
Note: The op created has been renamed from "other" to "nextop", since
it is linked to the ONCE op via op_next, not op_other.
Fixes GH#186301 parent 883bf45 commit 2efb6d3
4 files changed
+22
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
| 419 | + | |
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
| 436 | + | |
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
| 448 | + | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8596 | 8596 | | |
8597 | 8597 | | |
8598 | 8598 | | |
8599 | | - | |
8600 | | - | |
| 8599 | + | |
| 8600 | + | |
8601 | 8601 | | |
8602 | 8602 | | |
8603 | | - | |
| 8603 | + | |
8604 | 8604 | | |
8605 | | - | |
| 8605 | + | |
8606 | 8606 | | |
8607 | 8607 | | |
8608 | 8608 | | |
8609 | 8609 | | |
8610 | | - | |
| 8610 | + | |
8611 | 8611 | | |
8612 | 8612 | | |
8613 | 8613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
405 | 407 | | |
406 | 408 | | |
407 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
507 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
508 | 517 | | |
509 | 518 | | |
510 | 519 | | |
| |||
0 commit comments