Skip to content

Commit 6090878

Browse files
authored
perf: global dead code elimination (Issue #4 — Tasks A + B)
Closes #4 Task A: call graph construction + fixed-point reachability propagation from main. Task B: cross-block caller count tables (reaching-definitions style) combined with transitive reachability. Key bug fixed: TOK_FN==0 was never produced by the lexer (fn lexes as TOK_IDENT), so the DCE scans never ran. Added streq fallback matching the main compilation loop pattern. Additional safeguards: expansion products (impl/generic/trait), __ runtime hooks, and fn_addr references all handled correctly. 394/394 conformance tests pass. Self-host converges at 1,990,912 bytes.
1 parent 6baa5a3 commit 6090878

4 files changed

Lines changed: 211 additions & 89 deletions

File tree

bootstrap/stage0/jda1

-430 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)