Struct cranelift_codegen::ir::function::FunctionParameters
source · pub struct FunctionParameters { /* private fields */ }
Expand description
Function parameters used when creating this function, and that will become applied after
compilation to materialize the final CompiledCode
.
Implementations§
source§impl FunctionParameters
impl FunctionParameters
sourcepub fn base_srcloc(&self) -> SourceLoc
pub fn base_srcloc(&self) -> SourceLoc
Returns the base SourceLoc
.
If it was never explicitly set with ensure_base_srcloc
, will return an invalid
SourceLoc
.
sourcepub fn ensure_base_srcloc(&mut self, srcloc: SourceLoc) -> SourceLoc
pub fn ensure_base_srcloc(&mut self, srcloc: SourceLoc) -> SourceLoc
Sets the base SourceLoc
, if not set yet, and returns the base value.
sourcepub fn ensure_user_func_name(
&mut self,
name: UserExternalName
) -> UserExternalNameRef
pub fn ensure_user_func_name( &mut self, name: UserExternalName ) -> UserExternalNameRef
Retrieve a UserExternalNameRef
for the given name, or add a new one.
This method internally deduplicates same UserExternalName
so they map to the same
reference.
sourcepub fn reset_user_func_name(
&mut self,
index: UserExternalNameRef,
name: UserExternalName
)
pub fn reset_user_func_name( &mut self, index: UserExternalNameRef, name: UserExternalName )
Resets an already existing user function name to a new value.
sourcepub fn user_named_funcs(
&self
) -> &PrimaryMap<UserExternalNameRef, UserExternalName>
pub fn user_named_funcs( &self ) -> &PrimaryMap<UserExternalNameRef, UserExternalName>
Returns the internal mapping of UserExternalNameRef
to UserExternalName
.
Trait Implementations§
source§impl Clone for FunctionParameters
impl Clone for FunctionParameters
source§fn clone(&self) -> FunctionParameters
fn clone(&self) -> FunctionParameters
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for FunctionParameters
impl Send for FunctionParameters
impl Sync for FunctionParameters
impl Unpin for FunctionParameters
impl UnwindSafe for FunctionParameters
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