0.pre7.66:
authorWilliam Harold Newman <william.newman@airmail.net>
Tue, 16 Oct 2001 00:46:33 +0000 (00:46 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Tue, 16 Oct 2001 00:46:33 +0000 (00:46 +0000)
got rid of now-redundant :ACCESSOR-FOR stuff, hoping that
henceforth slot accessors can truly be ordinary
functions with ordinary inline expansions instead of
hybrid non-ANSI weirdosities

src/code/defstruct.lisp
src/code/early-setf.lisp
src/compiler/generic/genesis.lisp
src/compiler/globaldb.lisp
src/compiler/info-functions.lisp
src/compiler/ir1tran.lisp
src/compiler/proclaim.lisp
tests/interface.pure.lisp
version.lisp-expr

index 9d0dd52..2404a83 100644 (file)
        (dolist (dsd (dd-slots dd))
         (let* ((accessor-name (dsd-accessor-name dsd)))
           (when accessor-name
-
-            ;; new implementation sbcl-0.pre7.64
             (multiple-value-bind (reader-designator writer-designator)
                 (accessor-inline-expansion-designators dd dsd)
+              (proclaim-as-defstruct-fun-name accessor-name)
               (setf (info :function
                           :inline-expansion-designator
                           accessor-name)
                     (info :function :inlinep accessor-name)
                     :inline)
               (unless (dsd-read-only dsd)
+                (proclaim-as-defstruct-fun-name `(setf ,accessor-name))
                 (let ((setf-accessor-name `(setf ,accessor-name)))
                   (setf (info :function
                               :inline-expansion-designator
                               setf-accessor-name)
                         writer-designator
                         (info :function :inlinep setf-accessor-name)
-                        :inline))))
-
-            ;; old code from before sbcl-0.pre7.64, will hopefully
-            ;; fade away and/or merge into new code above
-            (when (eq (dsd-raw-type dsd) t) ; when not raw slot
-              (proclaim-as-defstruct-fun-name accessor-name)
-              (setf (info :function :accessor-for accessor-name) class)
-              (unless (dsd-read-only dsd)
-                (proclaim-as-defstruct-fun-name `(setf ,accessor-name))
-                (setf (info :function :accessor-for `(setf ,accessor-name))
-                      class))))))
+                        :inline)))))))
 
        ;; FIXME: Couldn't this logic be merged into
        ;; PROCLAIM-AS-DEFSTRUCT-FUN-NAME?
 ;;; are any undefined warnings, we nuke them.
 (defun proclaim-as-defstruct-fun-name (name)
   (when name
-    (when (info :function :accessor-for name)
-      (setf (info :function :accessor-for name) nil))
     (proclaim-as-fun-name name)
     (note-name-defined name :function)
     (setf (info :function :where-from name) :declared)
index 65b6efb..8a21d7a 100644 (file)
@@ -339,11 +339,6 @@ GET-SETF-EXPANSION directly."
          ((not (fboundp `(setf ,name)))
           ;; All is well, we don't need any warnings.
           (values))
-         ((info :function :accessor-for name)
-          (warn "defining SETF macro for DEFSTRUCT slot ~
-                accessor; redefining as a normal function: ~S"
-                name)
-          (proclaim-as-fun-name name))
          ((not (eq (symbol-package name) (symbol-package 'aref)))
           (style-warn "defining setf macro for ~S when ~S is fbound"
                       name `(setf ,name))))
index b54e70e..234871d 100644 (file)
@@ -2707,17 +2707,7 @@ initially undefined function references:~2%")
 
       (setf undefs (sort undefs #'string< :key #'fun-name-block-name))
       (dolist (name undefs)
-        (format t "~S" name)
-       ;; FIXME: This ACCESSOR-FOR stuff should go away when the
-       ;; code has stabilized. (It's only here to help me
-       ;; categorize the flood of undefined functions caused by
-       ;; completely rewriting the bootstrap process. Hopefully any
-       ;; future maintainers will mostly have small numbers of
-       ;; undefined functions..)
-       (let ((accessor-for (info :function :accessor-for name)))
-         (when accessor-for
-           (format t " (accessor for ~S)" accessor-for)))
-       (format t "~%")))
+        (format t "~S~%" name)))
 
     (format t "~%~|~%layout names:~2%")
     (collect ((stuff))
index f586c10..7c137a3 100644 (file)
   :type :ir1-transform
   :type-spec (or function null))
 
-;;; If a function is a slot accessor or setter, then this is the class
-;;; that it accesses slots of.
-(define-info-type
-  :class :function
-  :type :accessor-for
-  :type-spec (or sb!xc:class null)
-  :default nil)
-
 ;;; If a function is "known" to the compiler, then this is a
 ;;; FUNCTION-INFO structure containing the info used to special-case
 ;;; compilation.
index 52be034..64bba8d 100644 (file)
   (check-fun-name name)
   (when (fboundp name)
     (ecase (info :function :kind name)
-      (:function
-       (let ((accessor-for (info :function :accessor-for name)))
-        (when accessor-for
-          (compiler-style-warning
-           "~@<The function ~
-           ~2I~_~S ~
-           ~I~_was previously defined as a slot accessor for ~
-           ~2I~_~S.~:>"
-           name
-           accessor-for)
-          (clear-info :function :accessor-for name))))
-      (:macro
+      (:function) ; happy case
+      ((nil)) ; another happy case
+      (:macro ; maybe-not-so-good case
        (compiler-style-warning "~S was previously defined as a macro." name)
        (setf (info :function :where-from name) :assumed)
-       (clear-info :function :macro-function name))
-      ((nil))))
+       (clear-info :function :macro-function name))))
   (setf (info :function :kind name) :function)
   (note-if-setf-function-and-macro name)
   name)
@@ -89,7 +79,6 @@
       (frob :where-from :assumed)
       (frob :inlinep)
       (frob :kind)
-      (frob :accessor-for)
       (frob :inline-expansion-designator)
       (frob :source-transform)
       (frob :assumed-type)))
index b61c8af..c36d9e1 100644 (file)
                      :inlinep inlinep
                      :where-from (info :function :where-from name)
                      :type (info :function :type name))
-                    (let ((info (info :function :accessor-for name)))
-                      (when info
-                        (error "no expansion for ~S even though :ACCESSOR-FOR"
-                               name))
-                      (etypecase info
-                        (null
-                         (find-free-really-function name))
-                        (sb!xc:structure-class
-                         (find-structure-slot-accessor info name))
-                        (sb!xc:class
-                         (if (typep (layout-info (info :type :compiler-layout
-                                                       (sb!xc:class-name
-                                                        info)))
-                                    'defstruct-description)
-                             (find-structure-slot-accessor info name)
-                             (find-free-really-function name))))))))))))
+                    (find-free-really-function name))))))))
 
 ;;; Return the LEAF structure for the lexically apparent function
 ;;; definition of NAME.
index 0a6e7e3..faef555 100644 (file)
             ;; definition yet, we know one is planned. (But if this
             ;; function name was already declared as a structure
             ;; accessor, then that was already been taken care of.)
-            (unless (info :function :accessor-for name)
-              (proclaim-as-fun-name name)
-              (note-name-defined name :function))
+            (proclaim-as-fun-name name)
+            (note-name-defined name :function)
 
             ;; the actual type declaration
             (setf (info :function :type name) type
index 3dc0439..6febe33 100644 (file)
@@ -49,9 +49,6 @@
               ;; though, and I haven't figured out what does work
               ;; right. For now we just punt.
               (values))
-             #+nil 
-             ((sb-int:info :function :accessor-for ext-sym)
-              (values))
              ((typep fun 'generic-function)
                 (sb-pcl::generic-function-pretty-arglist fun))
              (t
index e776cb8..534e6c6 100644 (file)
@@ -18,4 +18,4 @@
 ;;; for internal versions, especially for internal versions off the
 ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.pre7.65"
+"0.pre7.66"