Skip to content
  • rtoy's avatar
    Save xref information to fasls. · 624c3dc2
    rtoy authored
    This is done by faking it.  The file being compiled is compiled as
    usual, but we append fake forms to the file as if they came from the
    file.  These fake forms insert the necessary information into the xref
    databases when the fasl is loaded.
    
    To support this feature, we also updated COMPILE-FILE to recognize the
    :xref keyword arg.  Set this to non-NIL to enable computing and saving
    xref information.
    
    code/exports.lisp:
    o Update XREF exports
    
    compiler/fndb.lisp:
    o Update with new definition of COMPILE-FILE.
    
    compiler/main.lisp:
    o Append fake forms to the file being compiled to save xref
      information to the fasl.  This clears out any xref info we might
      have for the file, and inserts the necessary xref information into
      the database.
    o Add :XREF keyword arg to COMPILE-FILE.  Default value of :XREF is
      C::*RECORD-XREF-INFO*.
    
    compiler/xref.lisp:
    o Add function to invalidate xref info for a given namestring, so we
      can reset the info when a fasl with xref info is loaded.
    o Add a function to find all xref information for a given pathname.
      Used for saving xref info to a fasl.
    624c3dc2