mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 19:45:49 +00:00
Replace the O(N×M) nested inline for loop with direct @hasDecl lookups. The old approach iterated over all translate-c declarations for each enum field, which required a 10M comptime branch quota on MSVC (2173 decls × 138 fields × ~20 branches). The new approach constructs the expected declaration name and checks directly, reducing to O(N) and needing only 100K quota on all platforms. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>