-
Notifications
You must be signed in to change notification settings - Fork 57
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
separate ABI from Layout #457
Conversation
### ABI (of a type) | ||
[abi]: #abi-of-a-type | ||
|
||
The *function call ABI* or short *ABI* of a type defines how it is passed *by-value* across a function boundary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe call this "calling convention" instead? The ABI is the combination of the memory layout, calling convention, linkage model and every other part of the interface between compiled object files, dynamic libraries or the kernel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ABI" is the term used in existing documents such as this one. I wouldn't mind a different term but that might be fighting windmills...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling convention isn't quite correct either, because two types can have the same calling convention but not the same layout, and what's meant when discussing a type's function call ABI is the exact set of properties needed to ensure two function signatures are ABI compatible, which includes both calling convention and layout.
Co-authored-by: Dante Broggi <34220985+Dante-Broggi@users.noreply.github.com>
@rust-lang/opsem is anyone not okay with this PR? If I don't hear any complaints the next few days I'm going to merge. :) |
In my experience, excluding the function call ABI better reflects the actual uses of the term "layout". So this aligns the glossary with how terms are used in practice.
Fixes #304