pub struct EscapeAnalyzer {
pub results: HashMap<String, EscapeAnalysisResult>,
}Expand description
Performs escape analysis over a collection of LCNF function declarations.
Fields§
§results: HashMap<String, EscapeAnalysisResult>Analysis results keyed by function name.
Implementations§
Source§impl EscapeAnalyzer
impl EscapeAnalyzer
Sourcepub fn analyze(&mut self, decls: &[LcnfFunDecl])
pub fn analyze(&mut self, decls: &[LcnfFunDecl])
Analyze all declarations and store results.
Sourcepub fn analyze_decl(&mut self, decl: &LcnfFunDecl) -> EscapeAnalysisResult
pub fn analyze_decl(&mut self, decl: &LcnfFunDecl) -> EscapeAnalysisResult
Analyze a single function declaration.
Sourcepub fn analyze_expr(
&self,
expr: &LcnfExpr,
result: &mut EscapeAnalysisResult,
in_tail: bool,
)
pub fn analyze_expr( &self, expr: &LcnfExpr, result: &mut EscapeAnalysisResult, in_tail: bool, )
Recursively analyze an expression.
in_tail is true when the expression appears in tail position
(i.e., its value is directly returned from the function).
Sourcepub fn propagate_escapes(&self, result: &mut EscapeAnalysisResult)
pub fn propagate_escapes(&self, result: &mut EscapeAnalysisResult)
Propagate escape information: if an allocation’s variable is found in the escape set with a heap-escaping status, upgrade the allocation site.
Trait Implementations§
Source§impl Debug for EscapeAnalyzer
impl Debug for EscapeAnalyzer
Source§impl Default for EscapeAnalyzer
impl Default for EscapeAnalyzer
Source§fn default() -> EscapeAnalyzer
fn default() -> EscapeAnalyzer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EscapeAnalyzer
impl RefUnwindSafe for EscapeAnalyzer
impl Send for EscapeAnalyzer
impl Sync for EscapeAnalyzer
impl Unpin for EscapeAnalyzer
impl UnsafeUnpin for EscapeAnalyzer
impl UnwindSafe for EscapeAnalyzer
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