Michael Schimmel 3142e64bbd Refactor recursion checking
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.
2026-02-22 10:41:48 +01:00
2026-02-22 10:41:48 +01:00
2026-02-22 02:07:35 +01:00
2026-02-22 09:08:16 +01:00
2026-02-22 09:08:16 +01:00
S
Description
No description provided
6.5 MiB
Languages
Rust 100%