|
CSE Home | About Us | Search | Contact Info |
None to turn in, but I strongly recommend that you try some of the code generation exercises in the book before you start hacking. E.g., try 9.1e, 9.2e, 9.3c (particularly recommended), 9.3e, and/or 9.5bce. Don't just hand-translate the code; try to be mechanical about it, and think carefully about where codegen gets the information it needs to address variables, pick registers, make decisions, etc., etc.
Complete the extended PL/0 compiler by implementing the code generation routines for your new AST classes. Run the extended compiler with the "-a" option to print the assembly code, and/or test execution via SPIM. Be sure that you test the differences between call-by-reference and call-by-value, and that references to up-level variables work, whether the up-level variable was declared as a local, a call-by-value formal, or a call-by-reference formal.
As usual, turn in only one solution per group, including:
As usual, you will be graded on correctness of your implementation, on clarity and good design of your implementation, and on sufficiency of your test cases.