229:
(subtypep 'function '(function)) => nil, t.
+231: "SETQ does not correctly check the type of a variable being set"
+ b.
+ (defun foo (x z)
+ (declare (type integer x))
+ (locally (declare (type (real 1) x))
+ (setq x z))
+ (list x z))
+ (foo 0 0) => (0 0).
+
+ (fixed in 0.7.12.8)
+
233: bugs in constraint propagation
a.
(defun foo (x)
(node (make-if :test pred
:consequent then-block
:alternative else-block)))
+ ;; IR1-CONVERT-MAYBE-PREDICATE requires DEST to be CIF, so the
+ ;; order of the following two forms is important
(setf (continuation-dest pred) node)
(ir1-convert start pred test)
(link-node-to-previous-continuation node pred)
(declare (type continuation start cont) (type basic-var var))
(let ((dest (make-continuation)))
(ir1-convert start dest value)
- (assert-continuation-type dest (leaf-type var) (lexenv-policy *lexenv*))
+ (assert-continuation-type dest
+ (or (lexenv-find var type-restrictions)
+ (leaf-type var))
+ (lexenv-policy *lexenv*))
(let ((res (make-set :var var :value dest)))
(setf (continuation-dest dest) res)
(setf (leaf-ever-used var) t)
fun
`(%coerce-callable-to-fun ,fun)))
(setf (continuation-dest fun-cont) node)
- (assert-continuation-type fun-cont
- (specifier-type '(or function symbol))
- (lexenv-policy *lexenv*))
(collect ((arg-conts))
(let ((this-start fun-cont))
(dolist (arg args)
;;; all functions in the tail set to be equivalent, this amounts to
;;; bringing the entire tail set up to date. We iterate over the
;;; returns for all the functions in the tail set, reanalyzing them
-;;; all (not treating Node specially.)
+;;; all (not treating NODE specially.)
;;;
;;; When we are done, we check whether the new type is different from
;;; the old TAIL-SET-TYPE. If so, we set the type and also reoptimize
(setf (node-prev use) nil)
(setf (continuation-next node-prev) nil)
(collect ((res vals))
- (loop as cont = (make-continuation use)
+ (loop for cont = (make-continuation use)
and prev = node-prev then cont
repeat (- nvars nvals)
do (reference-constant prev cont nil)
`((let ,(temps)
,@(body)
(%funcall ,(optional-dispatch-main-entry res)
- . ,(arg-vals)))) ; FIXME: What is the '.'? ,@?
+ ,@(arg-vals))))
(arg-vars)
:debug-name (debug-namify "~S processing" '&more))))
(setf (optional-dispatch-more-entry res) ep))))
(with-ir1-environment-from-node call
(ir1-convert-lambda
`(lambda ,vars
- (declare (ignorable . ,ignores))
- (%funcall ,entry . ,args))
+ (declare (ignorable ,@ignores))
+ (%funcall ,entry ,@args))
:debug-name (debug-namify "hairy function entry ~S"
(continuation-fun-name
(basic-combination-fun call)))))))
(safe-format t "~&baz ~S (~A) ~S" condition condition result)))))))
;;; bug 231: SETQ did not check the type of the variable being set
-(defun bug231-1 (x)
+(defun bug231a-1 (x)
(declare (optimize safety) (type (integer 0 8) x))
(incf x))
-(assert (raises-error? (bug231-1 8) type-error))
+(assert (raises-error? (bug231a-1 8) type-error))
-(defun bug231-2 (x)
+(defun bug231a-2 (x)
(declare (optimize safety) (type (integer 0 8) x))
(list (lambda (y) (setq x y))
(lambda () x)))
-(destructuring-bind (set get) (bug231-2 0)
+(destructuring-bind (set get) (bug231a-2 0)
(funcall set 8)
(assert (eql (funcall get) 8))
(assert (raises-error? (funcall set 9) type-error))
(assert (eql (funcall get) 8)))
+(defun bug231b (x z)
+ (declare (optimize safety) (type integer x))
+ (locally
+ (declare (type (real 1) x))
+ (setq x z))
+ (list x z))
+(assert (raises-error? (bug231b nil 1) type-error))
+(assert (raises-error? (bug231b 0 1.5) type-error))
+(assert (raises-error? (bug231b 0 0) type-error))
+
(sb-ext:quit :unix-status 104) ; success
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.7.12.7"
+"0.7.12.8"