deliverable: stack limits

The weakest point of the A- implementation is the stupid computation of stack limits, which are always assumed to equal 25. It would be much nicer to compute the exact limit.

This improvement can be implemented by only making changes to the file emit.c. Note that "struct CODE" in the file tree.h contains a field "int visited;" which may be useful for this task.

You should create a new branch of your A- compiler:

$ svn cp group-X/joos/scanparse group-X/joos/stacklimits
$ svn ci -m "* Create new A- branch for stack limits deliverable"

Then, make your modifications, ensure that you compute the same stack limits as the A+ compiler for the class benchmarks, and add a README file describing your work and the changes you needed to make. You might also want to write small test programs. It is fine to leave precise details to comments in the source code. Format your text in 80 column blocks for readability, and stick to the current JOOS programming style.

Your TA will use Subversion to look at your changes and run the class benchmarks and your test programs in order to evaluate you. Remember, multiple small test inputs are more useful than one big test input that attempts to cover all features; a combination of both is even better.

There is no need to email us on completion. Unless you took a late day we will automatically take the version into account that was checked in last before the point of the deadline.

Maintained by Eric Bodden. [HOME]