[JuliaLowering] Fix break/continue in try#61525
Open
mlechu wants to merge 1 commit intoJuliaLang:masterfrom
Open
[JuliaLowering] Fix break/continue in try#61525mlechu wants to merge 1 commit intoJuliaLang:masterfrom
mlechu wants to merge 1 commit intoJuliaLang:masterfrom
Conversation
topolarity
approved these changes
Apr 7, 2026
topolarity
reviewed
Apr 7, 2026
| @test isempty(current_exceptions()) | ||
|
|
||
| # TODO: commented out to avoid polluting the exception stack; need to port | ||
| # https://github.com/JuliaLang/julia/pull/55876 |
Member
There was a problem hiding this comment.
Do you think we should go ahead and do this now while we're fixing up try-finally?
Member
Author
There was a problem hiding this comment.
I originally planned to, but this change should be OK on its own too. I need to port rename_assigned_ssavalues to properly copy finally blocks, which could potentially be a pain.
Member
There was a problem hiding this comment.
Ah darn, I was hoping our ssavar logic would handle that OK if you just lower it twice
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Alternative to #61523, fix JuliaLang/JuliaLowering.jl#171.
Push to
ctx.handler_token_stackbefore construction of theFinallyHandler, since theJumpTargetconstructor needs it. The extra entry is ignored inenter_finally_block's call toemit_leave_handler, but not in the one inemit_break. These changes should directly match flisp.I think we're still missing some
pop_exceptions compared to flisp, but wanted to get this PR up given the other one. As noted in the tests, I need to port #55876, which duplicates the finally block and only addspop_exceptionto one copy.