X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fpackage.lisp;h=59f2f24f22e51f34f7d8a5234a9c69b7f9ca7bef;hb=15d6e7c9a2c3234f95dfe278046fa2fee1b0c007;hp=4239b37186b6c2cf8dd83daac4fdefc94eadea1e;hpb=902e93736a0888aa6b04dc328b1eb328423bf426;p=sbcl.git diff --git a/src/code/package.lisp b/src/code/package.lisp index 4239b37..59f2f24 100644 --- a/src/code/package.lisp +++ b/src/code/package.lisp @@ -30,12 +30,12 @@ ;;; the entry is unused. If it is one, then it is deleted. ;;; Double-hashing is used for collision resolution. -(sb!xc:deftype hash-vector () '(simple-array (unsigned-byte 8) (*))) +(def!type hash-vector () '(simple-array (unsigned-byte 8) (*))) -(sb!xc:defstruct (package-hashtable - (:constructor %make-package-hashtable - (table hash size &aux (free size))) - (:copier nil)) +(def!struct (package-hashtable + (:constructor %make-package-hashtable + (table hash size &aux (free size))) + (:copier nil)) ;; The g-vector of symbols. (table (missing-arg) :type simple-vector) ;; The i-vector of pname hash values. @@ -99,7 +99,12 @@ ;; shadowing symbols (%shadowing-symbols () :type list) ;; documentation string for this package - (doc-string nil :type (or simple-base-string null))) + (doc-string nil :type (or simple-base-string null)) + ;; package locking + #!+sb-package-locks + (lock nil :type boolean) + #!+sb-package-locks + (%implementation-packages nil :type list)) ;;;; iteration macros @@ -111,7 +116,8 @@ "DO-SYMBOLS (VAR [PACKAGE [RESULT-FORM]]) {DECLARATION}* {TAG | FORM}* Executes the FORMs at least once for each symbol accessible in the given PACKAGE with VAR bound to the current symbol." - (multiple-value-bind (body decls) (parse-body body-decls nil) + (multiple-value-bind (body decls) + (parse-body body-decls :doc-string-allowed nil) (let ((flet-name (gensym "DO-SYMBOLS-"))) `(block nil (flet ((,flet-name (,var) @@ -146,7 +152,8 @@ "DO-EXTERNAL-SYMBOLS (VAR [PACKAGE [RESULT-FORM]]) {DECL}* {TAG | FORM}* Executes the FORMs once for each external symbol in the given PACKAGE with VAR bound to the current symbol." - (multiple-value-bind (body decls) (parse-body body-decls nil) + (multiple-value-bind (body decls) + (parse-body body-decls :doc-string-allowed nil) (let ((flet-name (gensym "DO-SYMBOLS-"))) `(block nil (flet ((,flet-name (,var) @@ -171,7 +178,8 @@ "DO-ALL-SYMBOLS (VAR [RESULT-FORM]) {DECLARATION}* {TAG | FORM}* Executes the FORMs once for each symbol in every package with VAR bound to the current symbol." - (multiple-value-bind (body decls) (parse-body body-decls nil) + (multiple-value-bind (body decls) + (parse-body body-decls :doc-string-allowed nil) (let ((flet-name (gensym "DO-SYMBOLS-"))) `(block nil (flet ((,flet-name (,var)