An C-alternative language.
Inspired by SPJ's C-- I started to think about writing something similar.
A working x86_64 code generator
- Uses GAS for assembling and linking.
Has runtime support for GC root stack scanning.
- Implemented by closely following Andrew W. Appel's Modern Compiler Implementation in ML (AKA the tiger book).
- That is, it has zero runtime cost when gc is not triggered.
- Even when there are too many arguments. E.g., CaLang has its own (not compatible with C when passing argument by stack) calling convention.
- In SysV, function that has no greater than 6 arguments is compatible with C.
Feature that should be implemented in the future
Should apply some optimizations.
Should support runtime interface for debugging
Should support more platforms
- Adding a code generator for MIPS should be pretty straightforward. In this way, students studying COMP180 can have a better time...