ruff
1b1a83a4 - [ty] Avoid quadratic analysis of repeated statement calls (#26775)

Commit
9 days ago
[ty] Avoid quadratic analysis of repeated statement calls (#26775) ## Summary Prior to this change, each statement-level call immediately applied an `IsNonTerminalCall` narrowing gate to every live place so calls returning `Never` could invalidate later narrowing. Repeated calls therefore rebuilt all live place states after every statement, which is quadratic. We now store the call narrowing gate alongside the pending scope-wide reachability constraint. Reachability continues to use the regular materialization path at every use, while narrowing gates are replayed only before a place changes or merges. A `Never`-returning call therefore still gates narrowing later on the same branch without eagerly rewriting every live place state. Closes https://github.com/astral-sh/ty/issues/3986.
Author
Parents
Loading