###### # # TIGERATS: a Tiger compiler implemented in ATS # # Author: Hongwei Xi (hwxi AT cs DOT bu DOT edu) # Time: Spring, 2009 # ###### So far, only x86-32 and mips are targeted. ###### tiger_prelude.c : C code for lib functions in Tiger is here tiger_prelude_spim.s : SPIM assembly code for some lib functions in Tiger is here. This file needs to be loaded when MIPS code generated by TIGERATS is tested. ###### tigerats_main: the main function is implemented here ###### error: for handling errors during compilation ###### stamp: for generating and manipulating stamps ###### symbol: for symbol manipulation ###### types: for handling types during typechecking ###### absyn: abstract syntax trees for Tiger ###### fixity: for resolving the issue of fixity (prefix, infix and postfix) ###### parser: A parser for Tiger that is built with parsing combinators. ###### interp0: An interpreter for Tiger; it should be called on a Tiger program after the program passes typechecking ###### tychecker: A typechecker for Tiger; it also does escape analysis on local variables. ###### irtree: a tree langauge for intermediate representation ###### translate: for translating a tiger programing into the tree language introduced for intermediate representation. ###### canonical: for puting the tree expression returned after translation into some canonical form ###### interp1: An interpreter for the tree language in Tiger; it is mainly for testing the code obtained after canonicalization. ###### codegen: for performing instruction selection. codegen_x86_32: for performing instruction selection on the 32-bit x86 arch; this one is functioning codegen_mips: for performing instruction selection on the mips arch; this one is not yet functioning ###### tempset: for representing and processing sets of temporary registers; this one currently uses (unrealistic) list represention for sets. ###### fgraph: for representing and processing flow graphs ###### liveness: for permforming liveness analysis that yields inteference graphs ###### igraph: for representing and processing interference graphs ###### regalloc: for performing register allocation. The algorithm used largely follows what is presented in the textbook. However, the implementation, for better or worse, is done moslty in a style of improvision. ###### ## end of [README] ##