pub struct FunctionSpan {
pub name: Spur,
pub body_start: InstRef,
pub decl: InstRef,
}Expand description
Stored representation of directive in the extra array. Layout: [name: u32, span_start: u32, span_len: u32, args_len: u32, args…] Variable size due to args. A span marking the boundaries of a function in the RIR.
This allows efficient per-function analysis by identifying which instructions belong to each function without scanning the entire instruction array.
Fields§
§name: SpurFunction name symbol
body_start: InstRefIndex of the first instruction of this function’s body. This is the first instruction generated for the function’s expressions/statements.
decl: InstRefIndex of the FnDecl instruction for this function. This is always the last instruction of the function.
Implementations§
Source§impl FunctionSpan
impl FunctionSpan
Trait Implementations§
Source§impl Clone for FunctionSpan
impl Clone for FunctionSpan
Source§fn clone(&self) -> FunctionSpan
fn clone(&self) -> FunctionSpan
Returns a duplicate 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 Freeze for FunctionSpan
impl RefUnwindSafe for FunctionSpan
impl Send for FunctionSpan
impl Sync for FunctionSpan
impl Unpin for FunctionSpan
impl UnwindSafe for FunctionSpan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
An iterator over the items within this container, by reference.
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
Check whether an item is contained within this sequence.
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
Convert an item of the sequence into a [
MaybeRef].