Latest Results
fix(linter): rewrite constructor-super to use iterative dataflow analysis
The constructor-super rule's DFS path analysis had exponential O(2^n)
complexity, causing oxlint to hang indefinitely on files with complex
control flow graphs (e.g., next.js compiled bundles with 59+ classes).
## Root Cause
The previous algorithm explored all possible paths through the CFG,
removing blocks from the visited set after each path to allow
re-exploration. With k branch points, this creates 2^k paths.
## Solution
Replaced the DFS path enumeration with iterative dataflow analysis:
- New `SuperCallState` enum tracks abstract states: Unreached, Never,
Once, Multiple, Mixed
- Merge operation at CFG join points combines states from different paths
- Transfer function computes state after executing super() calls
- Worklist algorithm propagates states until fixpoint
## Complexity
- Before: O(2^n) where n = number of branch points
- After: O(n ร m) where n = blocks, m = edges
The state lattice has finite height (5 states), guaranteeing termination.
## Performance
| File | Before | After |
|------|--------|-------|
| fetch.js (796KB, 59 classes) | hung indefinitely | 16ms |
| load.js (800KB, 59 classes) | hung indefinitely | 50ms |
| tar/index.js (98KB, 30 classes) | hung indefinitely | 6ms |
| Full next.js (19,535 files) | hung indefinitely | 1.2s |
๐ค generated with help from Claude Opus 4.5c/12-10-fix_linter_rewrite_constructor-super_to_use_iterative_dataflow_analysis Active Branches
#167090%
#160810%
#167060%
ยฉ 2025 CodSpeed Technology