pub struct EscapeAnalysisResult {
pub func_name: String,
pub allocations: Vec<AllocationSite>,
pub escape_sets: HashMap<String, EscapeStatus>,
}Expand description
The result of escape analysis for a single function.
Fields§
§func_name: StringName of the analyzed function.
allocations: Vec<AllocationSite>All allocation sites found in the function.
escape_sets: HashMap<String, EscapeStatus>Per-variable escape status.
Implementations§
Source§impl EscapeAnalysisResult
impl EscapeAnalysisResult
Sourcepub fn num_escaped(&self) -> usize
pub fn num_escaped(&self) -> usize
Number of allocations that escape.
Sourcepub fn num_stack_eligible(&self) -> usize
pub fn num_stack_eligible(&self) -> usize
Number of allocations eligible for stack allocation.
Sourcepub fn stack_allocation_candidates(&self) -> Vec<&AllocationSite>
pub fn stack_allocation_candidates(&self) -> Vec<&AllocationSite>
Return references to allocations that can be stack-allocated.
Trait Implementations§
Source§impl Clone for EscapeAnalysisResult
impl Clone for EscapeAnalysisResult
Source§fn clone(&self) -> EscapeAnalysisResult
fn clone(&self) -> EscapeAnalysisResult
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 EscapeAnalysisResult
impl RefUnwindSafe for EscapeAnalysisResult
impl Send for EscapeAnalysisResult
impl Sync for EscapeAnalysisResult
impl Unpin for EscapeAnalysisResult
impl UnsafeUnpin for EscapeAnalysisResult
impl UnwindSafe for EscapeAnalysisResult
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