Commit cf55499
JST-PG-005: Browser codegen.js — Julia SSA IR → JavaScript
Hand-written codegen.js (~770 lines) completes the browser pipeline:
parse → lower → infer → codegen → eval. Handles arithmetic (type-directed
|0 coercion), strings, structs, control flow (if/elseif/while/for/try),
cross-function calls, field access, 80+ operators/functions.
Key fixes: index-based phi edge matching, temp variables for simultaneous
phi updates, parameter name reservation, lowerer elseif desugaring bug.
65 new tests (677 total).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 41efa0b commit cf55499
3 files changed
Lines changed: 1548 additions & 2 deletions
0 commit comments