assemble.mli 828 B

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