-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Mir: remove Panic terminator and instead just call suitable lang item #29573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, I'd like to give this a shot. |
@wesleywiser great! If you want to chat about it, the easiest way is to privmsg me on IRC ( |
I now think we should refactor panics to simply call into the appropriate lang item and not have an explicit |
Replacing |
On the other hand, it would make implementing certain codegen features such as |
@nagisa I don't see why it makes that any harder. In such a mode we presumably would not emit a Panic either, and/or we'd change the lang item to abort (and strip away the landing pads path so that the call block has no successors). |
@nagisa also, the semantics of diverge are not unreachable. The diverge On Fri, Nov 13, 2015 at 3:00 PM, Simonas Kazlauskas <
|
Though, we could say that if landing pads are disabled, then the Diverge On Fri, Nov 13, 2015 at 3:07 PM, Nicholas Matsakis [email protected]
|
r? @nikomatsakis This is a pretty big PR conflating changes to a few different block terminators (Call, DivergingCall, Panic, Resume, Diverge), because they are somewhat closely related. Each commit has a pretty good description on what is being changed in each commit. The end result is greatly simplified CFG and translation for calls (no success branch if the function is diverging, no cleanup branch if there’s nothing to cleanup etc). Fixes #30480 Fixes #29767 Partialy solves #29575 Fixes #29573
Panic in MIR is unimplemented. It should call into the panic lang item.
The text was updated successfully, but these errors were encountered: