Skip to content

Commit

Permalink
0.8.4.14:
Browse files Browse the repository at this point in the history
	Fix suboptimality reported by piso on #lisp
	... catch bogus types like (fixnum 10) before they get too far
		in the type system
	... doesn't work for logically-built-in-but-made-by-PCL types
		(yet)
	Comment out newly-broken assertion that constant multiplies
		don't produce compiler-notes
	... if that's all that broke, count your lucky stars :-)
  • Loading branch information
csrhodes committed Oct 9, 2003
1 parent 346d8a6 commit d3c56c2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2119,6 +2119,9 @@ changes in sbcl-0.8.5 relative to sbcl-0.8.4:
#lisp)
* fixed bug 141b: printing backquoted information readably and prettily
inserts a space where necessary.
* bug fix: obviously wrong type specifiers such as (FIXNUM 1) or
(CHARACTER 10) are now reported as errors, rather than propagated
as unknown types. (reported by piso on #lisp)
* compiler enhancement: SIGNUM is now better able to derive the type
of its result.
* fixed some bugs revealed by Paul Dietz' test suite:
Expand Down
7 changes: 4 additions & 3 deletions src/code/early-type.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,9 @@
(fun (info :type :translator (car lspec))))
(cond (fun
(funcall fun lspec))
((or (and (consp spec) (symbolp (car spec)))
(symbolp spec))
((or (and (consp spec) (symbolp (car spec))
(not (info :type :builtin (car spec))))
(and (symbolp spec) (not (info :type :builtin spec))))
(when (and *type-system-initialized*
(not (eq (info :type :kind spec)
:forthcoming-defclass-type)))
Expand Down Expand Up @@ -534,7 +535,7 @@
(let ((def (cond ((symbolp form)
(info :type :expander form))
((and (consp form) (symbolp (car form)))
(info :type :expander (car form)))
(info :type :expander (car form)))
(t nil))))
(if def
(type-expand (funcall def (if (consp form) form (list form))))
Expand Down
6 changes: 5 additions & 1 deletion tests/arith.pure.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@
(let* ((x (random most-positive-fixnum))
(x2 (* x 2))
(x3 (* x 3)))
(let ((fn (handler-bind ((sb-ext:compiler-note #'error))
(let ((fn (handler-bind (;; broken by rearrangement of
;; multiplication strength reduction in
;; sbcl-0.8.4.12
#+nil
(sb-ext:compiler-note #'error))
(compile nil
`(lambda (y)
(declare (optimize speed) (type (integer 0 3) y))
Expand Down
10 changes: 10 additions & 0 deletions tests/type.impure.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@
(assert (raises-error? (typep 11 'eql)))
(assert (raises-error? (typep 11 'satisfies)))
(assert (raises-error? (typep 11 'not)))
;;; and while it doesn't specifically disallow illegal compound
;;; specifiers from the CL package, we don't have any.
(assert (raises-error? (subtypep 'fixnum '(fixnum 1))))
(assert (raises-error? (subtypep 'class '(list))))
(assert (raises-error? (subtypep 'foo '(ratio 1/2 3/2))))
(assert (raises-error? (subtypep 'character '(character 10))))
#+nil ; doesn't yet work on PCL-derived internal types
(assert (raises-error? (subtypep 'lisp '(class))))
#+nil
(assert (raises-error? (subtypep 'bar '(method number number))))

;;; Of course empty lists of subtypes are still OK.
(assert (typep 11 '(and)))
Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
"0.8.4.13"
"0.8.4.14"

0 comments on commit d3c56c2

Please sign in to comment.