Skip to content
Snippets Groups Projects
Commit 624c3dc2 authored by rtoy's avatar rtoy
Browse files

Save xref information to fasls.

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.
parent 1d9a7eac
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment