Compiler Construction 2015 Computer Laboratory University of Cambridge Timothy G. Griffin (tgg22@cam.ac.uk) Practical Exercises, Set 3 (for slang2_derive_v2). ) Implement simple optimisations for the code generated in interp_9.ml. --- peephole --- inline expansion --- constant folding ) Implement elimination of tail-recursion in interp_9.ml. ) In interp_9.ml, Can you optimise the treatment of functions that have no free variables? ) The "machine" of interp_9.ml is still very high-level. How might you transform this machine toward a Jargon-like VM? How can the stack be transformed into an (indexed) array of simple values? How can environment lookup be replaced by something more efficient?