-
Notifications
You must be signed in to change notification settings - Fork 95
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
Handle new caller_location
intrinsic the right way
#374
Comments
This is a nice explanation on what this does: https://hegdenu.net/posts/track-caller/ |
Thanks for the update, @celinval ! If adding support for One thing that I don't see mentioned there is the relation to panic strategies. This isn't mentioned in the RFC neither, so I guess it's independent. |
I was wondering if it would help with: #1740 |
For the current Rust implementation, the compiler will add an extra argument to functions that contain My guess is that MIR passes can't really change the function signature, so they push it down to the codegen stage. I'm tempted to just encode this as a global variable for now. @adpaco-aws I don't think CBMC really supports formatting error messages, so I'm not sure implementing this intrinsic will make much of a difference on how we report failures. In order to fix that, we would have to either inline these functions or generate a different copy per location they are invoked from. |
Implementation notes for myself:
|
Rebase from #346 found a new
caller_location
intrinsic in the process. In order to unblock, we codegen this intrinsic as:But we can probably codegen it the same way Rust does.
The text was updated successfully, but these errors were encountered: