0.pre7.61:
[sbcl.git] / src / pcl / fast-init.lisp
index 9740481..0154304 100644 (file)
             (sym (make-instance-function-symbol key)))
        (push key *make-instance-function-keys*)
        (when sym
-          ;; MNA: cmucl-commit Sat, 27 Jan 2001 07:07:45 -0800 (PST)
-          ;; Silence compiler warnings about undefined function
-          ;; <hairy-make-instance-name>
-          ;; when compiling a method containing a make-instance call.
-          (progn ;; Lifted from c::%%defun.
-            (sb-c::proclaim-as-function-name sym)
-           (when (eq (sb-int:info :function :where-from sym) :assumed)
-             (setf (sb-int:info :function :where-from sym) :defined)
-             (when (sb-int:info :function :assumed-type sym)
-               (setf (sb-int:info :function :assumed-type sym) nil))))
+         ;; (famous last words:
+         ;;   1. Don't worry, I know what I'm doing.
+         ;;   2. You and what army?
+         ;;   3. If you were as smart as you think you are, you
+         ;;      wouldn't be a copy.
+         ;; This is case #1.:-) Even if SYM hasn't been defined yet,
+         ;; it must be an implementation function, or we we wouldn't
+         ;; have expanded into it. So declare SYM as defined, so that
+         ;; even if it hasn't been defined yet, the user doesn't get
+         ;; obscure warnings about undefined internal implementation
+         ;; functions like HAIRY-MAKE-instance-name.
+         (sb-kernel:become-defined-fun-name sym)
          `(,sym ',class (list ,@initargs)))))))
 
 (defmacro expanding-make-instance-top-level (&rest forms &environment env)
                                     'initialize-info name)))
                 *initialize-info-cached-slots*)))
     `(progn
-       (defstruct initialize-info
+       (defstruct (initialize-info (:copier nil))
         key wrapper
         ,@(mapcar #'(lambda (name)
                       `(,name :unknown))
 (defvar *note-iis-entry-p* nil)
 
 (defvar *compiled-initialize-instance-simple-functions*
-  (make-hash-table :test #'equal))
+  (make-hash-table :test 'equal))
 
 (defun initialize-instance-simple-function (use info class form-list)
   (let* ((pv-cell (get-pv-cell-for-class class))