Code generation for cool compiler