made generate_ir const so ast would compile