Commit c0aa4728 authored by ehuelsmann@1c010e3e-69d0-11dd-93a8-456734b0d56f's avatar ehuelsmann@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files

3 changes:

 - Improve speed of "multi-homed symbol" removal
 - Generate autoloader EXPORT commands based on
    EXPORTed symbols in the compiled files, instead of
    on the symbols currently exported (this one fixes the SLIME
      MAKE-THREAD-LOCK issue)
 - Reverse the "multi-homed filtering" and the "autoloads file exclusion"
     in order to stop considering symbols overridden by extensible
     sequences (e.g. COUNT-IF, REMOVE, etc) as being multi-homed:
     we want to autoload the non-extensible versions by default.
parent f3286619
......@@ -90,10 +90,18 @@
(mapcar #'second combos)))))
(defun remove-multi-combo-symbols (combos)
(remove-if (lambda (x)
(< 1 (count x combos :key #'second)))
(princ "; Removing multi-homed symbols")
(let ((sym-hash (make-hash-table :size (* 2 (length combos)))))
(dolist (combo combos)
(incf (gethash (second combo) sym-hash 0)))
(print (remove-if-not (lambda (x)
(< 1 (gethash x sym-hash)))
:key #'second))
(remove-if (lambda (x)
(< 1 (gethash x sym-hash)))
:key #'second)))
(defun set-equal (set1 set2 &key test)
(or (eq set1 set2)
......@@ -118,7 +126,8 @@
:key #'first)
(pushnew (first symbol-fileset)
(cdr (assoc (cdr symbol-fileset) fileset-symbols
:test (lambda (x y) (set-equal x y :test #'string=))))))
:test (lambda (x y)
(set-equal x y :test #'string=))))))
(defun write-autoloader (stream package type fileset-symbols)
......@@ -163,6 +172,7 @@
(defun generate-autoloads (symbol-files-pathspec)
(flet ((filter-combos (combos)
(remove-if (lambda (x)
;; exclude the symbols from the files
;; below: putting autoloaders on some of
......@@ -170,18 +180,26 @@
;; Primitives which have been defined Java-side
(member x '( ;; function definitions to be excluded
"fdefinition" "early-defuns"
"require" "signal"
"extensible-sequences-base" "restart"
"require" "signal" "restart"
;; extensible sequences override
;; lots of default functions;
;; java-collections implements
;; extensible sequences
"extensible-sequences" "java-collections"
;; macro definitions to be excluded
"macros" "backquote" "precompiler")
"macros" ;; "backquote"
:test #'string=))
(remove-multi-combo-symbols combos)
:key #'first))
:key #'first)))
(symbols-pathspec (filespec)
(merge-pathnames filespec symbol-files-pathspec)))
(let ((funcs (filter-combos (load-combos (symbols-pathspec "*.funcs"))))
(macs (filter-combos (load-combos (symbols-pathspec "*.macs")))))
(macs (filter-combos (load-combos (symbols-pathspec "*.macs"))))
(exps (filter-combos (load-combos (symbols-pathspec "*.exps")))))
(with-open-file (f (symbols-pathspec "autoloads-gen.lisp")
:direction :output :if-does-not-exist :create
:if-exists :supersede)
......@@ -198,13 +216,13 @@
;; and ASDF are not being created. Nor are these packages
;; vital to the correct operation of the base system.
(let ((*package* (find-package package))
(do-external-symbols (sym package
(when (eq (symbol-package sym)
(push sym externals)))
(let* ((*package* (find-package package))
(remove-duplicates (mapcar #'second exps)))
(externals (remove-if-not (lambda (sym)
(eq (symbol-package sym)
(when externals
(write-line ";; EXPORTS" f)
(write `(cl:in-package ,package) :stream f)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment