Skip to content
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

Merged
merged 2 commits into from
Sep 27, 2023
Merged

separate ABI from Layout #457

merged 2 commits into from
Sep 27, 2023

Conversation

RalfJung
Copy link
Member

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

### 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.
Copy link
Member

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.

Copy link
Member Author

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...

Copy link

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>
@RalfJung
Copy link
Member Author

RalfJung commented Sep 8, 2023

@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. :)

@RalfJung RalfJung merged commit 7cee58a into rust-lang:master Sep 27, 2023
2 checks passed
@RalfJung RalfJung deleted the abi branch September 27, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terminology around layout, ABI, representation, and bit validity
5 participants