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§
source§impl 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 display<'a, R: Into<Option<&'a RegInfo>>>(
&'a self,
regs: R
) -> DisplaySignature<'a>
pub fn display<'a, R: Into<Option<&'a RegInfo>>>(
&'a self,
regs: R
) -> DisplaySignature<'a>
Return an object that can display self
with correct register names.
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.