0.6.12.62:
authorWilliam Harold Newman <william.newman@airmail.net>
Thu, 2 Aug 2001 14:18:09 +0000 (14:18 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Thu, 2 Aug 2001 14:18:09 +0000 (14:18 +0000)
made DEFMACRO DEFKNOWN check for duplicate DEFKNOWNs
(I want to remove the duplicate DEFKNOWNs, but currently doing
that makes make.sh die in src/pcl/walk.lisp. So I've
put the duplicate DEFKNOWNs back, and things work
again. Since by now I have a strong conditioned reflex
"working version"=>"CVS checkin", I'll check this in
before going on to try to figure out which duplicate
DEFKNOWNs are important and why.)

src/compiler/knownfun.lisp
src/compiler/x86/system.lisp
version.lisp-expr

index 5a30ffc..839ab45 100644 (file)
                                  :optimizer optimizer))
        (target-env (or *backend-info-environment* *info-environment*)))
     (dolist (name names)
+      (when (info :function :info name)
+        ;; This is an error because it's generally a bad thing to blow
+        ;; away all the old optimization stuff. It's also a potential
+        ;; source of sneaky bugs:
+        ;;    DEFKNOWN FOO
+        ;;    DEFTRANSFORM FOO
+        ;;    DEFKNOWN FOO ; possibly hidden inside some macroexpansion
+        ;;    ; Now the DEFTRANSFORM doesn't exist in the target Lisp.
+        ;; However, it's continuable because it might be useful to do
+        ;; it when testing new optimization stuff interactively.
+       #+nil (cerror "Go ahead, overwrite it."
+                     "overwriting old FUNCTION-INFO for ~S" name)
+       (warn "overwriting old FUNCTION-INFO for ~S" name))
       (setf (info :function :type name target-env) ctype)
       (setf (info :function :where-from name target-env) :declared)
       (setf (info :function :kind name target-env) :function)
   names)
 
 ;;; Return the FUNCTION-INFO for NAME or die trying. Since this is
-;;; used by people who want to modify the info, and the info may be
+;;; used by callers who want to modify the info, and the info may be
 ;;; shared, we copy it. We don't have to copy the lists, since each
 ;;; function that has generators or transforms has already been
 ;;; through here.
index edb3f8c..89cac6d 100644 (file)
                   :disp (- function-pointer-type other-pointer-type)))
     (inst add func code)))
 
+;;; REMOVEME
 (defknown %function-self (function) function (flushable))
 
 (define-vop (%function-self)
                   :disp (- function-pointer-type
                            (* function-code-offset word-bytes))))))
 
-;;; The closure function slot is a pointer to raw code on X86 instead of
-;;; a pointer to the code function object itself. This VOP is used
+;;; The closure function slot is a pointer to raw code on X86 instead
+;;; of a pointer to the code function object itself. This VOP is used
 ;;; to reference the function object given the closure object.
 (def-source-transform %closure-function (closure)
   `(%function-self ,closure))
 (def-source-transform %funcallable-instance-function (fin)
   `(%function-self ,fin))
 
+;;; REMOVEME
 (defknown (setf %function-self) (function function) function  (unsafe))
 
 (define-vop (%set-function-self)
     (storew temp function function-self-slot function-pointer-type)
     (move result new-self)))
 
-;; We would have really liked to use a source-transform for this, but
-;; they don't work with SETF functions.
+;;; REMOVEME
 (defknown ((setf %funcallable-instance-function)) (function function) function
-  (unsafe))
+       (unsafe))
+
+;;; CMU CL comment:
+;;;   We would have really liked to use a source-transform for this, but
+;;;   they don't work with SETF functions.
+;;; FIXME: Can't we just use DEFSETF or something?
 (deftransform (setf %funcallable-instance-function) ((value fin))
   '(setf (%function-self fin) value))
 \f
index 6ab2baf..8763fc4 100644 (file)
@@ -16,4 +16,4 @@
 ;;; four numeric fields, is used for versions which aren't released
 ;;; but correspond only to CVS tags or snapshots.
 
-"0.6.12.61"
+"0.6.12.62"