#[non_exhaustive]pub enum CallConv {
Fast,
C,
SysV64,
Win64,
Aapcs64,
}Expand description
A calling convention tag on a signature.
The IR records the convention; the backend implements it. Tail calls require the caller’s and the callee’s conventions to be equal.
§Examples
use ir_lang::CallConv;
assert_eq!(CallConv::default(), CallConv::Fast);
assert_eq!(CallConv::C.name(), "c");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fast
The internal convention for code compiled together: the backend may choose anything, and tail calls are guaranteed. The default.
C
The target platform’s C convention (resolved by the backend per target).
SysV64
The System V AMD64 convention.
Win64
The Windows x64 convention.
Aapcs64
The AArch64 procedure-call standard.
Implementations§
Trait Implementations§
impl Copy for CallConv
impl Eq for CallConv
Source§impl Ord for CallConv
impl Ord for CallConv
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for CallConv
impl PartialOrd for CallConv
impl StructuralPartialEq for CallConv
Auto Trait Implementations§
impl Freeze for CallConv
impl RefUnwindSafe for CallConv
impl Send for CallConv
impl Sync for CallConv
impl Unpin for CallConv
impl UnsafeUnpin for CallConv
impl UnwindSafe for CallConv
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more