Week 9
Exercises on code generation
- Discuss what a good strategy for computing the stack limit could be.
Motivation: get you thinking about the stack limit computation
before the upcoming deliverable.
- Provide an appropriate code template for the
for -loop,
which could be used if we no longer handled it as syntactic sugar.
Motivation: gain experience with writing somewhat complex code templates.
- Change the code template for
!E (on slide 19) to compute
the result as 1-E . Include a diff for necessary
modifications to the JOOS compiler.
Motivation: gain experience with implementing code templates.
- (Optional.) Study the code for generating code for JOOS programs.
Is anything unclear?
Motivation: as before, the JOOS compiler is an excellent
reference for your own WIG compiler.
|