Changeset 14117
- Timestamp:
- 08/18/12 10:49:15 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/compile-system.lisp
r14108 r14117 91 91 92 92 (defun remove-multi-combo-symbols (combos) 93 (remove-if (lambda (x) 94 (< 1 (count x combos :key #'second))) 95 combos 96 :key #'second)) 93 (princ "; Removing multi-homed symbols") 94 (let ((sym-hash (make-hash-table :size (* 2 (length combos))))) 95 (dolist (combo combos) 96 (incf (gethash (second combo) sym-hash 0))) 97 (print (remove-if-not (lambda (x) 98 (< 1 (gethash x sym-hash))) 99 combos 100 :key #'second)) 101 (remove-if (lambda (x) 102 (< 1 (gethash x sym-hash))) 103 combos 104 :key #'second))) 97 105 98 106 (defun set-equal (set1 set2 &key test) … … 119 127 (pushnew (first symbol-fileset) 120 128 (cdr (assoc (cdr symbol-fileset) fileset-symbols 121 :test (lambda (x y) (set-equal x y :test #'string=)))))) 129 :test (lambda (x y) 130 (set-equal x y :test #'string=)))))) 122 131 fileset-symbols)) 123 132 … … 164 173 (defun generate-autoloads (symbol-files-pathspec) 165 174 (flet ((filter-combos (combos) 166 (remove-if (lambda (x) 167 ;; exclude the symbols from the files 168 ;; below: putting autoloaders on some of 169 ;; the symbols conflicts with the bootstrapping 170 ;; Primitives which have been defined Java-side 171 (member x '( ;; function definitions to be excluded 172 "fdefinition" "early-defuns" 173 "require" "signal" 174 "extensible-sequences-base" "restart" 175 "extensible-sequences" 176 ;; macro definitions to be excluded 177 "macros" "backquote" "precompiler") 178 :test #'string=)) 179 (remove-multi-combo-symbols combos) 180 :key #'first)) 175 (remove-multi-combo-symbols 176 (remove-if (lambda (x) 177 ;; exclude the symbols from the files 178 ;; below: putting autoloaders on some of 179 ;; the symbols conflicts with the bootstrapping 180 ;; Primitives which have been defined Java-side 181 (member x '( ;; function definitions to be excluded 182 "fdefinition" "early-defuns" 183 "require" "signal" "restart" 184 185 ;; extensible sequences override 186 ;; lots of default functions; 187 ;; java-collections implements 188 ;; extensible sequences 189 "extensible-sequences-base" 190 "extensible-sequences" "java-collections" 191 192 ;; macro definitions to be excluded 193 "macros" ;; "backquote" 194 "precompiler") 195 :test #'string=)) 196 combos 197 :key #'first))) 181 198 (symbols-pathspec (filespec) 182 199 (merge-pathnames filespec symbol-files-pathspec))) 183 200 (let ((funcs (filter-combos (load-combos (symbols-pathspec "*.funcs")))) 184 (macs (filter-combos (load-combos (symbols-pathspec "*.macs"))))) 201 (macs (filter-combos (load-combos (symbols-pathspec "*.macs")))) 202 (exps (filter-combos (load-combos (symbols-pathspec "*.exps"))))) 185 203 (with-open-file (f (symbols-pathspec "autoloads-gen.lisp") 186 204 :direction :output :if-does-not-exist :create … … 199 217 ;; vital to the correct operation of the base system. 200 218 201 (let ((*package* (find-package package))202 externals)203 (do-external-symbols (sym package204 externals)205 (when(eq (symbol-package sym)206 *package*)207 (push sym externals)))219 (let* ((*package* (find-package package)) 220 (all-exported-symbols 221 (remove-duplicates (mapcar #'second exps))) 222 (externals (remove-if-not (lambda (sym) 223 (eq (symbol-package sym) 224 *package*)) 225 all-exported-symbols))) 208 226 (when externals 209 227 (write-line ";; EXPORTS" f)
Note: See TracChangeset
for help on using the changeset viewer.