pub struct Function {
pub name: String,
pub len: u64,
pub rows: Vec<Row>,
pub decl: Option<Place>,
pub sig: Option<Sig>,
pub external: bool,
pub locals: Vec<Local>,
pub scopes: Vec<Scope>,
}Expand description
One function: where each of its instructions came from, and what it is.
Fields§
§name: StringIts name, as the C program spelled it, which is what a relocation here asks the linker for.
len: u64How many bytes of instructions it is.
rows: Vec<Row>The rows, in increasing order of address.
decl: Option<Place>Where it was declared, and nothing when that is not known.
sig: Option<Sig>What it takes and gives back, and None when this compiler cannot yet say.
A function with nothing here gets no entry in .debug_info at all, for the reason in the
tree.rs module documentation: an entry with no return type is an entry saying void, so
half an answer here is a wrong one rather than a partial one.
external: boolWhether anything outside this unit can see it, which is the opposite of static.
locals: Vec<Local>The locals lowering gave a frame slot, in the order the slots were asked for, which is the order they were declared in.
Parameters are not among them, whether or not they have a slot. See Local.
scopes: Vec<Scope>The inner scopes of the function, each after the scope it is written inside.
The function’s own body is not one of them, for the reason Scope gives. A scope nothing
above names is written down anyway and costs nothing: an entry is only made for one that has
a local of its own or holds a scope that does.
Trait Implementations§
impl Eq for Function
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnsafeUnpin for Function
impl UnwindSafe for Function
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.