Commit 1b81858
committed
S_newONCEOP/Perl_scalarvoid: skip over padops useless in void context
Prior to this commit, padops associated with OP_ONCE might serve no
purpose in a void context. Since the context is not known at the point
of the OP_ONCE creation, the padops have retained the STATE flag, but
not the LVINTRO flag. This prevented Perl_scalarvoid from warning
"Useless use of private variable in void context".
In this commit, the STATE flag is removed and Perl_scalarvoid modified
such that when a OP_ONCE padop is found in void context, the op_next
pointer on the OP_ONCE is silently modified to skip over the padop.1 parent 2efb6d3 commit 1b81858
3 files changed
+20
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
409 | | - | |
410 | 408 | | |
411 | 409 | | |
412 | 410 | | |
| |||
415 | 413 | | |
416 | 414 | | |
417 | 415 | | |
418 | | - | |
419 | | - | |
420 | 416 | | |
421 | 417 | | |
422 | 418 | | |
| |||
433 | 429 | | |
434 | 430 | | |
435 | 431 | | |
436 | | - | |
| 432 | + | |
437 | 433 | | |
438 | 434 | | |
439 | 435 | | |
| |||
445 | 441 | | |
446 | 442 | | |
447 | 443 | | |
448 | | - | |
| 444 | + | |
449 | 445 | | |
450 | 446 | | |
451 | 447 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2257 | 2257 | | |
2258 | 2258 | | |
2259 | 2259 | | |
2260 | | - | |
2261 | | - | |
2262 | | - | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
2263 | 2273 | | |
2264 | 2274 | | |
2265 | 2275 | | |
| |||
8597 | 8607 | | |
8598 | 8608 | | |
8599 | 8609 | | |
8600 | | - | |
8601 | | - | |
| 8610 | + | |
| 8611 | + | |
8602 | 8612 | | |
8603 | 8613 | | |
8604 | 8614 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| 512 | + | |
512 | 513 | | |
513 | 514 | | |
514 | 515 | | |
515 | 516 | | |
| 517 | + | |
516 | 518 | | |
517 | 519 | | |
518 | 520 | | |
| |||
0 commit comments