Skip to main content

collect_async_functions

Function collect_async_functions 

Source
pub fn collect_async_functions(stmts: &[Stmt<'_>]) -> HashSet<Symbol>
Expand description

Phase 54: Collect function names that are async. Used by LaunchTask codegen to determine if .await is needed.

Two-pass analysis:

  1. First pass: Collect directly async functions (have Sleep, LaunchTask, etc.)
  2. Second pass: Iterate until fixed point - if function calls an async function, mark it async