Contents    Page-10    Prev    Next    Page+10    Index   

Code Generation

Code generation can be broken into several steps:

  1. Generate the prologue

  2. Generate the program code

  3. Generate the epilogue

Subroutines are provided to generate the prologue and epilogue.

The arguments to the code generator are:

gencode(pcode, varsize, maxlabel)

   pcode    = pointer to code:
              (program foo (progn output)
                           (progn ...))
   varsize  = size of local storage in bytes
   maxlabel = max label number used so far