X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fpackage.lisp;h=e71f3451b0af942e1bc0415b11aace3aa3d45f76;hb=34dd23563d2f5cf05c72b971da0d0b065a09bf2a;hp=276633d96238d24e87af248847d0dde9105d323f;hpb=a158430a67a8df5a86fe834fc7427bcd256c7cb0;p=sbcl.git diff --git a/src/code/package.lisp b/src/code/package.lisp index 276633d..e71f345 100644 --- a/src/code/package.lisp +++ b/src/code/package.lisp @@ -35,10 +35,10 @@ (sb!xc:defstruct (package-hashtable (:constructor %make-package-hashtable ()) (:copier nil)) ;; The g-vector of symbols. - ;; FIXME: could just be type SIMPLE-VECTOR, with REQUIRED-ARGUMENT + ;; FIXME: could just be type SIMPLE-VECTOR, with (MISSING-ARG) default (table nil :type (or simple-vector null)) ;; The i-vector of pname hash values. - ;; FIXME: could just be type HASH-VECTOR, with REQUIRED-ARGUMENT + ;; FIXME: could just be type HASH-VECTOR, with (MISSING-ARG) default (hash nil :type (or hash-vector null)) ;; The total number of entries allowed before resizing. ;; @@ -56,8 +56,9 @@ ;;; KLUDGE: We use DEF!STRUCT to define this not because we need to ;;; manipulate target package objects on the cross-compilation host, ;;; but only because its MAKE-LOAD-FORM function needs to be hooked -;;; into the pre-CLOS DEF!STRUCT MAKE-LOAD-FORM system. The DEF!STRUCT -;;; side-effect of defining a new PACKAGE type on the +;;; into the pre-CLOS DEF!STRUCT MAKE-LOAD-FORM system so that we can +;;; compile things like IN-PACKAGE in warm init before CLOS is set up. +;;; The DEF!STRUCT side effect of defining a new PACKAGE type on the ;;; cross-compilation host is just a nuisance, and in order to avoid ;;; breaking the cross-compilation host, we need to work around it ;;; around by putting the new PACKAGE type (and the PACKAGEP predicate @@ -93,8 +94,8 @@ ;; packages that use this package (%used-by-list () :type list) ;; PACKAGE-HASHTABLEs of internal & external symbols - (internal-symbols (required-argument) :type package-hashtable) - (external-symbols (required-argument) :type package-hashtable) + (internal-symbols (missing-arg) :type package-hashtable) + (external-symbols (missing-arg) :type package-hashtable) ;; shadowing symbols (%shadowing-symbols () :type list) ;; documentation string for this package @@ -227,10 +228,10 @@ (inherited-symbol-p (gensym)) (BLOCK (gensym))) `(let* ((,these-packages ,package-list) - (,packages `,(mapcar #'(lambda (package) - (if (packagep package) - package - (find-package package))) + (,packages `,(mapcar (lambda (package) + (if (packagep package) + package + (find-package package))) (if (consp ,these-packages) ,these-packages (list ,these-packages)))) @@ -253,7 +254,8 @@ (car ,',packages)))) (when ,symbols (setf ,',vector (package-hashtable-table ,symbols)) - (setf ,',hash-vector (package-hashtable-hash ,symbols))))) + (setf ,',hash-vector + (package-hashtable-hash ,symbols))))) (:external `(let ((,symbols (package-external-symbols (car ,',packages))))