Struct cranelift_codegen::ir::Signature
source · [−]pub struct Signature {
pub params: Vec<AbiParam>,
pub returns: Vec<AbiParam>,
pub call_conv: CallConv,
}
Expand description
Function signature.
The function signature describes the types of formal parameters and return values along with other details that are needed to call a function correctly.
A signature can optionally include ISA-specific ABI information which specifies exactly how arguments and return values are passed.
Fields
params: Vec<AbiParam>
The arguments passed to the function.
returns: Vec<AbiParam>
Values returned from the function.
call_conv: CallConv
Calling convention.
Implementations
sourceimpl Signature
impl Signature
sourcepub fn clear(&mut self, call_conv: CallConv)
pub fn clear(&mut self, call_conv: CallConv)
Clear the signature so it is identical to a fresh one returned by new()
.
sourcepub fn special_param_index(&self, purpose: ArgumentPurpose) -> Option<usize>
pub fn special_param_index(&self, purpose: ArgumentPurpose) -> Option<usize>
Find the index of a presumed unique special-purpose parameter.
sourcepub fn special_return_index(&self, purpose: ArgumentPurpose) -> Option<usize>
pub fn special_return_index(&self, purpose: ArgumentPurpose) -> Option<usize>
Find the index of a presumed unique special-purpose parameter.
sourcepub fn uses_special_param(&self, purpose: ArgumentPurpose) -> bool
pub fn uses_special_param(&self, purpose: ArgumentPurpose) -> bool
Does this signature have a parameter whose ArgumentPurpose
is
purpose
?
sourcepub fn uses_special_return(&self, purpose: ArgumentPurpose) -> bool
pub fn uses_special_return(&self, purpose: ArgumentPurpose) -> bool
Does this signature have a return whose ArgumentPurpose
is purpose
?
sourcepub fn num_special_params(&self) -> usize
pub fn num_special_params(&self) -> usize
How many special parameters does this function have?
sourcepub fn num_special_returns(&self) -> usize
pub fn num_special_returns(&self) -> usize
How many special returns does this function have?
sourcepub fn uses_struct_return_param(&self) -> bool
pub fn uses_struct_return_param(&self) -> bool
Does this signature take an struct return pointer parameter?
sourcepub fn is_multi_return(&self) -> bool
pub fn is_multi_return(&self) -> bool
Does this return more than one normal value? (Pre-struct return legalization)
Trait Implementations
impl Eq for Signature
impl StructuralEq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.