Compiler phases for the COOL language