[armedbear-cvs] r14028 - trunk/abcl/src/org/armedbear/lisp

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Tue Jul 31 12:26:36 UTC 2012


Author: ehuelsmann
Date: Tue Jul 31 05:26:35 2012
New Revision: 14028

Log:
When creating a generic function on top of an autoloader, don't
resolve the autoloader: that's probably what we are already doing
(but the function doesn't get replaced until autoloading has succeeded).

Modified:
   trunk/abcl/src/org/armedbear/lisp/clos.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/clos.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/clos.lisp	Tue Jul 31 05:24:30 2012	(r14027)
+++ trunk/abcl/src/org/armedbear/lisp/clos.lisp	Tue Jul 31 05:26:35 2012	(r14028)
@@ -1653,8 +1653,6 @@
                                 argument-precedence-order
                                 documentation
                                 &allow-other-keys)
-  (when (autoloadp function-name)
-    (resolve function-name))
   (setf all-keys (copy-list all-keys))  ; since we modify it
   (remf all-keys :generic-function-class)
   (let ((gf (find-generic-function function-name nil)))
@@ -1677,7 +1675,14 @@
           gf)
         (progn
           (when (and (null *clos-booting*)
-                     (fboundp function-name))
+                     (and (fboundp function-name)
+                          ;; since we're overwriting an autoloader,
+                          ;; we're probably meant to redefine it,
+                          ;; so throwing an error here might be a bad idea.
+                          ;; also, resolving the symbol isn't
+                          ;; a good option either: we've seen that lead to
+                          ;; recursive loading of the same file
+                          (not (autoloadp function-name))))
             (error 'program-error
                    :format-control "~A already names an ordinary function, macro, or special operator."
                    :format-arguments (list function-name)))




More information about the armedbear-cvs mailing list