Commit fcbf73f
committed
refactor(codegen): extract Codecs as an injected component (layered DI, step 1)
First step of converting codegen passes to DI'd classes. The JSON-codec + event/
web-dispatch emitters are a clean leaf (no recursion into expression/statement
gen), so they become `class JsonCodecs implements Codecs`, injected into
XiCodegen and threaded into genAll. Shared expr-building helpers (jsonEncodeExpr/
jsonDecodeExpr/arrElemCtype) stay free. Acyclic graph confirmed: expr passes
never call statements, so ExpressionGen <- StatementGen <- orchestrator is the
next steps. Self-hosting fixpoint byte-identical.1 parent b4f6575 commit fcbf73f
5 files changed
Lines changed: 244 additions & 225 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments