0.7.2.11:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 15 Apr 2002 15:58:22 +0000 (15:58 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 15 Apr 2002 15:58:22 +0000 (15:58 +0000)
Miscellaneous uncontroversial fixes, motivated by compilation
under CLISP:
... delete fixed bug 58
... implement BUG on the host compiler, and use it in genesis.lisp
... refer to existing variable in give-up-ir1-transform in
DEFTRANSFORM MAKE-ARRAY
... change declarations from (SOME-STRUCT VAR) to
(TYPE SOME-STRUCT VAR)
... remove quote from CASE clauses
... conditionalize PSEUDO_ATOMIC_TRAP on #!+sparc for now

BUGS
src/code/early-extensions.lisp
src/compiler/array-tran.lisp
src/compiler/generic/genesis.lisp
src/compiler/ltn.lisp
src/compiler/srctran.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index e1e3d50..c3fef6a 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -350,20 +350,6 @@ WORKAROUND:
   The implementation of #'+ returns its single argument without
   type checking, e.g. (+ "illegal") => "illegal".
 
-58:
-  (SUBTYPEP '(AND ZILCH INTEGER) 'ZILCH) => NIL, NIL
-  Note: I looked into fixing this in 0.6.11.15, but gave up. The
-  problem seems to be that there are two relevant type methods for
-  the subtypep operation, HAIRY :COMPLEX-SUBTYPEP-ARG2 and
-  INTERSECTION :COMPLEX-SUBTYPEP-ARG1, and only the first is
-  called. This could be fixed, but type dispatch is messy and
-  confusing enough already, I don't want to complicate it further.
-  Perhaps someday we can make CLOS cross-compiled (instead of compiled
-  after bootstrapping) so that we don't need to have the type system
-  available before CLOS, and then we can rewrite the type methods to
-  CLOS methods, and then expressing the solutions to stuff like this
-  should become much more straightforward. -- WHN 2001-03-14
-
 60:
   The debugger LIST-LOCATIONS command doesn't work properly.
 
index 71f590b..67bfa89 100644 (file)
 (defmacro aver (expr)
   `(unless ,expr
      (%failed-aver ,(format nil "~A" expr))))
+
 (defun %failed-aver (expr-as-string)
   (bug "~@<failed AVER: ~2I~_~S~:>" expr-as-string))
+
+;;; We need a definition of BUG here for the host compiler to be able
+;;; to deal with BUGs in sbcl. This should never affect an end-user,
+;;; who will pick up the definition that signals a CONDITION of
+;;; condition-class BUG; however, this is not defined on the host
+;;; lisp, but for the target. SBCL developers sometimes trigger BUGs
+;;; in their efforts, and it is useful to get the details of the BUG
+;;; rather than an undefined function error. - CSR, 2002-04-12
+#+sb-xc-host
+(defun bug (format-control &rest format-arguments)
+  (error 'simple-error
+        :format-control "~@<  ~? ~:@_~?~:>"
+        :format-arguments `(,format-control
+                            ,format-arguments
+                            "~@<If you see this and are an SBCL ~
+developer, then it is probable that you have made a change to the ~
+system that has broken the ability for SBCL to compile, usually by ~
+removing an assumed invariant of the system, but sometimes by making ~
+an averrance that is violated (check your code!). If you are a user, ~
+please submit a bug report to the developers' mailing list, details of ~
+which can be found at <http://sbcl.sourceforge.net/>.~:@>"
+                            ())))
+
 (defmacro enforce-type (value type)
   (once-only ((value value))
     `(unless (typep ,value ',type)
        (%failed-enforce-type ,value ',type))))
+
 (defun %failed-enforce-type (value type)
   (error 'simple-type-error ; maybe should be TYPE-BUG, subclass of BUG?
         :value value
index 3e3329b..0fe241e 100644 (file)
                         *specialized-array-element-type-properties*)))
     (unless saetp
       (give-up-ir1-transform
-       "cannot open-code creation of ~S" spec))
+       "cannot open-code creation of ~S" result-type-spec))
 
     (let* ((initial-element-default (saetp-initial-element-default saetp))
           (n-bits-per-element (saetp-n-bits saetp))
index f1d2a01..12b5b01 100644 (file)
           ;; looks bad: maybe COMMON-LISP-USER? maybe an extension
           ;; package in the xc host? something we can't think of
           ;; a valid reason to cold intern, anyway...
-          (error ; not #'BUG, because #'BUG isn't defined yet
+          (bug
            "internal error: PACKAGE-NAME=~S looks too much like a typo."
            package-name))))
 
   ;; written out as #define trap_PseudoAtomic, which is confusing as
   ;; the runtime treats trap_ as the prefix for illegal instruction
   ;; type things. We therefore don't export it, but instead do
+  #!+sparc
   (when (boundp 'sb!vm::pseudo-atomic-trap)
     (format t "#define PSEUDO_ATOMIC_TRAP ~D /* 0x~:*~X */~%" sb!vm::pseudo-atomic-trap)
     (terpri))
index 2a6b557..cf5662b 100644 (file)
 ;;; we annotate for the number of values indicated by TYPES, but only
 ;;; use proven type information.
 (defun annotate-fixed-values-continuation (cont ltn-policy types)
-  (declare (continuation cont) (ltn-policy ltn-policy) (list types))
+  (declare (type continuation cont) (type ltn-policy ltn-policy) (list types))
   (unless (ltn-policy-safe-p ltn-policy)
     (flush-type-check cont))
   (let ((res (make-ir2-continuation nil)))
index aa09fb9..f48639c 100644 (file)
 (defun interval-bounded-p (x how)
   (declare (type interval x))
   (ecase how
-    ('above
+    (above
      (interval-high x))
-    ('below
+    (below
      (interval-low x))
-    ('both
+    (both
      (and (interval-low x) (interval-high x)))))
 
 ;;; signed zero comparison functions. Use these functions if we need
 (defun interval-abs (x)
   (declare (type interval x))
   (case (interval-range-info x)
-    ('+
+    (+
      (copy-interval x))
-    ('-
+    (-
      (interval-neg x))
     (t
      (destructuring-bind (x- x+) (interval-split 0 x t t)
index 57f9f34..ae1f620 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.7.2.10"
+"0.7.2.11"