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
sourceimpl 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
sourceimpl Clone for FunctionParameters
impl Clone for FunctionParameters
sourcefn clone(&self) -> FunctionParameters
fn clone(&self) -> FunctionParameters
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for FunctionParameters
impl Send for FunctionParameters
impl Sync for FunctionParameters
impl Unpin for FunctionParameters
impl UnwindSafe for FunctionParameters
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<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more