From: Christophe Rhodes Date: Mon, 15 Apr 2002 15:58:22 +0000 (+0000) Subject: 0.7.2.11: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=e4d1085d9572b5ebf110093a04914725e4c583d4;p=sbcl.git 0.7.2.11: 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 --- diff --git a/BUGS b/BUGS index e1e3d50..c3fef6a 100644 --- 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. diff --git a/src/code/early-extensions.lisp b/src/code/early-extensions.lisp index 71f590b..67bfa89 100644 --- a/src/code/early-extensions.lisp +++ b/src/code/early-extensions.lisp @@ -714,12 +714,37 @@ (defmacro aver (expr) `(unless ,expr (%failed-aver ,(format nil "~A" expr)))) + (defun %failed-aver (expr-as-string) (bug "~@" 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 + "~@.~:@>" + ()))) + (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 diff --git a/src/compiler/array-tran.lisp b/src/compiler/array-tran.lisp index 3e3329b..0fe241e 100644 --- a/src/compiler/array-tran.lisp +++ b/src/compiler/array-tran.lisp @@ -243,7 +243,7 @@ *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)) diff --git a/src/compiler/generic/genesis.lisp b/src/compiler/generic/genesis.lisp index f1d2a01..12b5b01 100644 --- a/src/compiler/generic/genesis.lisp +++ b/src/compiler/generic/genesis.lisp @@ -996,7 +996,7 @@ ;; 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)))) @@ -2621,6 +2621,7 @@ ;; 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)) diff --git a/src/compiler/ltn.lisp b/src/compiler/ltn.lisp index 2a6b557..cf5662b 100644 --- a/src/compiler/ltn.lisp +++ b/src/compiler/ltn.lisp @@ -270,7 +270,7 @@ ;;; 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))) diff --git a/src/compiler/srctran.lisp b/src/compiler/srctran.lisp index aa09fb9..f48639c 100644 --- a/src/compiler/srctran.lisp +++ b/src/compiler/srctran.lisp @@ -355,11 +355,11 @@ (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 @@ -732,9 +732,9 @@ (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) diff --git a/version.lisp-expr b/version.lisp-expr index 57f9f34..ae1f620 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"