Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't optimize (or warn about) control flow ops in OP_SASSIGN
In short, '$a = return $b' is stored "backwards": OP_SASSIGN has the RHS of the assignment as its first operand. Warning about precedence makes no sense here. Logical assignment ops like //=, ||=, &&= are represented as OP_{DOR,OR,AND}ASSIGN wrapped around a weird single-child OP_SASSIGN. Trying to naively elide the inner OP_SASSIGN leaves a dangling outer OP_{DOR,OR,AND}ASSIGN (which B::Deparse doesn't know what to do with) or just makes the compiler loop indefinitely. So just don't. Fixes #21665.
- Loading branch information
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters