Please sign in to comment.
For blocks containing regexes, don't lower $_
Since we need to look it up when doing `/foo/` in sink or boolean contexts. Unfortunately, the current semantics of that rely on some action at a distance (find the nearest defined `$_`, and update the `$/` in that block); these probably want revisiting. I did attempt to try, when we closure-clone a regex, to copy the appropriate `$_` into it; this mostly works, but the case of `not /foo/` depends on it to skip over the `not` frame, and there is another test which even further relies on the current behavior. So for now, just don't optimize those cases.
- Loading branch information...