Introduces a `UsageInfo` struct to consolidate tracking of used and
assigned locals, globals, and identities.
Replaces multiple `HashSet` arguments in `collect_usage` with a single
`UsageInfo` struct.
Adds an `is_recursive` method to check for recursive calls within a
node, considering global indices, local slots, and identity.
Updates inlining logic to use `is_recursive` to prevent inlining of
recursive functions or closures. This includes:
- Checking for recursion when inlining a call to a lambda.
- Checking for recursion when inlining a global variable that is a
lambda.
- Checking for recursion when inlining a closure.
Updates `is_inlinable_value` to also check for closure recursion.
The Optimizer now accepts a typed lambda registry, allowing it to
perform more aggressive inlining and beta-reduction on globally defined
functions. This is a significant step towards optimizing recursive and
globally defined lambdas more effectively.
This commit updates the benchmark metadata in several example files. The
benchmark runs and repeat counts have been slightly adjusted due to
optimizations or minor variations in execution.