aalhour / aalhour/PyCOOLC

Epic 2: Wire IR into the compilation pipeline (AST → TAC → MIPS)

未关闭
#18 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
41
派生
10
PR 合并指标
30 天内没有已合并 PR

描述

## Epic 2: Wire IR into the compilation pipeline (AST → TAC → MIPS)

### Goal: IR is not a teaching demo; it actually drives codegen and optimizations.

- [ ] Define pipeline stages explicitly:
- [ ] parse → sema → lower-to-TAC → optimize → regalloc/stack-alloc → emit MIPS
- [ ] Ensure TAC lowering covers all COOL constructs (if not already complete)
- [ ] Write a TAC-to-MIPS code generator (new backend):
- [ ] calling convention (args, return, saved regs)
- [ ] stack frame layout rules
- [ ] object layout / runtime calls
- [ ] string ops (concat, length, substr) correctness
- [ ] Keep current AST-to-MIPS backend temporarily as reference/fallback
- [ ] Add integration tests comparing TAC-path output vs AST-path output (until AST path is retired)

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。