-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Audit function signature codegen #1365
Comments
The relevant function // NOTE(eddyb) this is private to avoid using it from outside of
// `fn_abi_of_instance` - any other uses are either too high-level
// for `Instance` (e.g. typeck would use `Ty::fn_sig` instead),
// or should go through `FnAbi` instead, to avoid losing any
// adjustments `fn_abi_of_instance` might be performing. So the question is whether we should use Note that the |
Totally! We should investigate if using For the ZST parameters, the parameter "mode" is set to Ignore. |
I don't think this would actually fix #1350 though. I believe we add those functions to the symbol table and their signature matches CBMC ones. FYI, we declare these functions and their signatures here: https://github.com/model-checking/kani/blob/main/cprover_bindings/src/goto_program/builtin.rs |
Note that the function ABI will include the tracker location when required, so #374 and this issue are somewhat related. |
Migrate these modules to use StableMIR except for calls that depend on the function signature and ABI. Note that we shouldn't really be using function signature as captured here: #1365. So I suggest that we move to using the FnAbi as soon as we add that to StableMIR. --------- Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
The code of
closure_sig
is copy-pasted fromfn_sig_for_fn_abi
incompiler/rustc_middle/src/ty/layout.rs
. We may have to do something similar for generators (#416), so it would be good if we could use the rustc functionfn_abi_of_instance
directly (as the comment onfn_sig_for_fn_abi
suggests. This would prevent problems with keeping in sync with rustc.The text was updated successfully, but these errors were encountered: