(** Transform AST into assembly instructions. *) (** The AST has been simplified and annotated by earlier phases upto this point. The assembly phase uses the annotations to generate a list of instructions of type {!Types.instr}. For many instructions, a stringification of the relevant AST nodes is added as a [Comment] or [InlineComment], so that the programmer can line up assembly code with source code. This is especially helpful when analysing larger programs and programs with language features that generate a lot of code. E.g., for-loops that have been transformed into while-loops can appear quite intimidating in uncommented assembly code. The output of this phase is an [Assembly] intermediate type. *) (** Main phase function, called by {!Main}. *) val phase : Main.phase_func