CS 224 Project 4 - Code Generation
Build the code generator for the Jack Compiler
Take a look at the project in Chapter 11 of N2T and complete Stage 2, implementing the code generation as described on pp243-244. You will probably find it helpful the use the Jack compiler that is already provided. Compile a program and look at the VM code and compare it to the code that your compiler is generating. Run your generated code on the sample programs and feel the great satisfaction when they run!
Implement the VMWriter class as described on p240. You will then include VMWriter method calls throughout the CompilationEngine methods to generate the .vm file. I strongly suggest that you start incrementally, implementing a call and then checking that the output matches in an already compiled .vm file.
Academic integrity is very important as you embark upon this project. Wrestling and finally mastering the concepts needed to complete this project will greatly improve your understanding of how programming languages work. Since your learning is the highest priority to me, I want to clearly emphasize the following:
Submission and Grading:
Submit your zipped project code in GoucherLearn by the due date even if it is not working perfectly. After I have graded on the correctness of your code and made comments, if you have errors I will ask you to resubmit after making the changes I suggest. In doing so, you will have the opportunity to earn back up to 50% of the points you lost in the first submission.