[][src]Struct cranelift_codegen::ir::Signature

pub struct Signature {
    pub params: Vec<AbiParam>,
    pub returns: Vec<AbiParam>,
    pub call_conv: CallConv,
}

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.

Methods

impl Signature[src]

pub fn new(call_conv: CallConv) -> Self[src]

Create a new blank signature.

pub fn clear(&mut self, call_conv: CallConv)[src]

Clear the signature so it is identical to a fresh one returned by new().

pub fn display<'a, R: Into<Option<&'a RegInfo>>>(
    &'a self,
    regs: R
) -> DisplaySignature<'a>
[src]

Return an object that can display self with correct register names.

pub fn special_param_index(&self, purpose: ArgumentPurpose) -> Option<usize>[src]

Find the index of a presumed unique special-purpose parameter.

pub fn special_return_index(&self, purpose: ArgumentPurpose) -> Option<usize>[src]

Find the index of a presumed unique special-purpose parameter.

pub fn uses_special_param(&self, purpose: ArgumentPurpose) -> bool[src]

Does this signature have a parameter whose ArgumentPurpose is purpose?

pub fn uses_special_return(&self, purpose: ArgumentPurpose) -> bool[src]

Does this signature have a return whose ArgumentPurpose is purpose?

pub fn num_special_params(&self) -> usize[src]

How many special parameters does this function have?

pub fn num_special_returns(&self) -> usize[src]

How many special returns does this function have?

pub fn uses_struct_return_param(&self) -> bool[src]

Does this signature take an struct return pointer parameter?

pub fn is_multi_return(&self) -> bool[src]

Does this return more than one normal value? (Pre-struct return legalization)

Trait Implementations

impl Clone for Signature[src]

impl Debug for Signature[src]

impl Display for Signature[src]

impl Eq for Signature[src]

impl Hash for Signature[src]

impl PartialEq<Signature> for Signature[src]

impl StructuralEq for Signature[src]

impl StructuralPartialEq for Signature[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.