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.
(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
*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))
;; 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))
;;; 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)))
(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)
;;; 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"