0.pre8.30:
authorChristophe Rhodes <csr21@cam.ac.uk>
Wed, 2 Apr 2003 16:08:25 +0000 (16:08 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Wed, 2 Apr 2003 16:08:25 +0000 (16:08 +0000)
Fix the PCL fix, *sigh*
... don't error if we can't find the class at macroexpand time,
but emit a diagnostic instead.  (caught by McCLIM code)
Also enhancement to make-target-contrib.sh
... allow contribs to depend asdfwise on each other
... (side effect: now ASDF-hooked REQUIRE works on fresh-built
uninstalled SBCL with the command line:
SBCL_HOME=`pwd`/contrib ./src/runtime/sbcl --core output/sbcl.core
)

make-target-contrib.sh
src/pcl/boot.lisp
tests/clos.impure-cload.lisp
version.lisp-expr

index cc67a29..3095bc4 100644 (file)
@@ -26,6 +26,13 @@ export SBCL SBCL_BUILDING_CONTRIB
 
 gnumake=${GNUMAKE:-gmake}
 
+mkdir -p contrib/systems
+rm -f contrib/systems/*
+
+for i in contrib/*/*.asd; do
+    ln -sf ../../$i contrib/systems/
+done
+
 for i in contrib/*; do
     test -d $i && test -f $i/Makefile || continue;
     # export INSTALL_DIR=$SBCL_HOME/`basename $i `
index bdb2f18..7e0131d 100644 (file)
@@ -587,13 +587,26 @@ bootstrapping.
         ;; weirdness when bootstrapping.. -- WHN 20000610
         '(ignorable))
        (t
-        ;; Otherwise, we can make Python very happy.
+        ;; Otherwise, we can usually make Python very happy.
         (let ((type (info :type :kind specializer)))
           (ecase type
             ((:primitive :defined :instance :forthcoming-defclass-type)
              `(type ,specializer ,parameter))
             ((nil)
-             `(type ,(class-name (find-class specializer)) ,parameter)))))))
+             (let ((class (find-class specializer nil)))
+               (if class
+                   `(type ,(class-name class) ,parameter)
+                   (progn
+                     ;; we can get here, and still not have a failure
+                     ;; case, by doing MOP programming like (PROGN
+                     ;; (ENSURE-CLASS 'FOO) (DEFMETHOD BAR ((X FOO))
+                     ;; ...)).  Best to let the user know we haven't
+                     ;; been able to extract enough information:
+                     (style-warn
+                      "~@<can't find type for presumed class ~S in ~S.~@:>"
+                      specializer
+                      'parameter-specializer-declaration-in-defmethod)
+                     '(ignorable))))))))))
 
 (defun make-method-lambda-internal (method-lambda &optional env)
   (unless (and (consp method-lambda) (eq (car method-lambda) 'lambda))
index beaa4ee..db4785a 100644 (file)
 (defmethod baz ((x specializer2)) x)
 (defmethod baz ((x specializer1)) x)
 (assert (typep (baz (make-instance 'specializer1)) 'specializer1))
+
+;;; in a similar vein, we should be able to define methods on classes
+;;; that are effectively unknown to the type system:
+(sb-mop:ensure-class 'unknown-type)
+(defmethod method ((x unknown-type)) x)
+;;; (we can't call it without defining methods on allocate-instance
+;;; etc., but we should be able to define it).
 \f
 ;;; success
 (sb-ext:quit :unix-status 104)
\ No newline at end of file
index 9bc52ce..75de076 100644 (file)
@@ -18,4 +18,4 @@
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.pre8.29"
+"0.pre8.30"