X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fdefs.lisp;h=d8ac2ec2980dbb0590174b5e3294f3bd631ee50d;hb=9eec6e12fb6d22101631158dc1012276fd00facc;hp=781f4c6ec8d7ed78378ea55dc1afdd91015da758;hpb=feea06ce0acba516d739867b23341509e9c36d50;p=sbcl.git diff --git a/src/pcl/defs.lisp b/src/pcl/defs.lisp index 781f4c6..d8ac2ec 100644 --- a/src/pcl/defs.lisp +++ b/src/pcl/defs.lisp @@ -38,50 +38,18 @@ has already been partially loaded. This may not work, you may~%~ need to get a fresh lisp (reboot) and then load PCL.")) -;;; comments from CMU CL version of PCL: -;;; This is like fdefinition on the Lispm. If Common Lisp had -;;; something like function specs I wouldn't need this. On the other -;;; hand, I don't like the way this really works so maybe function -;;; specs aren't really right either? -;;; I also don't understand the real implications of a Lisp-1 on this -;;; sort of thing. Certainly some of the lossage in all of this is -;;; because these SPECs name global definitions. -;;; Note that this implementation is set up so that an implementation -;;; which has a 'real' function spec mechanism can use that instead -;;; and in that way get rid of setf generic function names. -(defmacro parse-gspec (spec - (non-setf-var . non-setf-case)) - `(let ((,non-setf-var ,spec)) ,@non-setf-case)) - -;;; If symbol names a function which is traced, return the untraced -;;; definition. This lets us get at the generic function object even -;;; when it is traced. -(defun unencapsulated-fdefinition (symbol) - (fdefinition symbol)) - -;;; If symbol names a function which is traced, redefine the `real' -;;; definition without affecting the trace. -(defun fdefine-carefully (name new-definition) - (progn - (sb-c::note-name-defined name :function) - new-definition) - (setf (fdefinition name) new-definition)) - -(defun gboundp (spec) - (parse-gspec spec - (name (fboundp name)))) - -(defun gmakunbound (spec) - (parse-gspec spec - (name (fmakunbound name)))) - +#-sb-fluid (declaim (inline gdefinition)) (defun gdefinition (spec) - (parse-gspec spec - (name (unencapsulated-fdefinition name)))) + ;; This is null layer right now, but once FDEFINITION stops bypasssing + ;; fwrappers/encapsulations we can do that here. + (fdefinition spec)) (defun (setf gdefinition) (new-value spec) - (parse-gspec spec - (name (fdefine-carefully name new-value)))) + ;; This is almost a null layer right now, but once (SETF + ;; FDEFINITION) stops bypasssing fwrappers/encapsulations we can do + ;; that here. + (sb-c::note-name-defined spec :function) ; FIXME: do we need this? Why? + (setf (fdefinition spec) new-value)) ;;;; type specifier hackery @@ -374,7 +342,7 @@ ((name :initform nil :initarg :name - :accessor generic-function-name) + :reader generic-function-name) (methods :initform () :accessor generic-function-methods @@ -499,7 +467,9 @@ :accessor slot-definition-type) (documentation :initform nil - :initarg :documentation) + :initarg :documentation + ;; FIXME: should we export this, as an extension? + :accessor %slot-definition-documentation) (class :initform nil :initarg :class @@ -612,8 +582,8 @@ specializer) ((name :initform nil - :initarg :name - :accessor class-name) + :initarg :name + :reader class-name) (class-eq-specializer :initform nil :reader class-eq-specializer) @@ -708,8 +678,10 @@ :initarg :from-defclass-p))) (defclass definition-source-mixin (standard-object) - ((source :initform *load-pathname* :reader definition-source - :initarg :definition-source))) + ((source + :initform nil + :reader definition-source + :initarg :definition-source))) (defclass plist-mixin (standard-object) ((plist :initform () :accessor object-plist)))