In this assignment, you will implement a code generator for Cool. When successfully completed, you will have a fully functional Cool compiler!
The code generator makes use of the AST constructed in PA3 and static analysis performed in PA4.
Your code generator should produce MIPS assembly code that faithfully implements any correct Cool program. There is no error recovery in code generation—all erroneous Cool programs have been detected by the front-end phases of the compiler.
As with the static analysis assignment, this assignment has considerable room for design decisions.
Your program is correct if the code it generates works correctly; how you achieve that goal is up to you.
We will suggest certain conventions that we believe will make your life easier, but you do not have to take our advice. This assignment is about twice the amount of the code of the previous programming assignment, though they share much of the same infrastructure. Start early!