X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fconstraint.lisp;h=eb936ba7098a6be81bcc608d9986b5e8f362e450;hb=568725aaf7d2d3dae486cd85210eb514c856fdb7;hp=123322087a2616684c5ab3277112f45af78d7c7d;hpb=f7e3e709f7c2207f1923375942f7fb1c092f92b0;p=sbcl.git diff --git a/src/compiler/constraint.lisp b/src/compiler/constraint.lisp index 1233220..eb936ba 100644 --- a/src/compiler/constraint.lisp +++ b/src/compiler/constraint.lisp @@ -158,7 +158,7 @@ #-sb-xc-host ignore #-sb-xc-host constraint-universe-end) (let* ((constraint-universe #+sb-xc-host '*constraint-universe* - #-sb-xc-host (gensym)) + #-sb-xc-host (sb!xc:gensym "UNIVERSE")) (with-array-data #+sb-xc-host '(progn) #-sb-xc-host `(with-array-data @@ -203,7 +203,7 @@ ret)) (defun %conset-grow (conset new-size) - (declare (index new-size)) + (declare (type index new-size)) (setf (conset-vector conset) (replace (the simple-bit-vector (make-array @@ -215,7 +215,7 @@ (declaim (inline conset-grow)) (defun conset-grow (conset new-size) - (declare (index new-size)) + (declare (type index new-size)) (when (< (length (conset-vector conset)) new-size) (%conset-grow conset new-size)) (values)) @@ -357,7 +357,7 @@ (let ((new (make-constraint (length *constraint-universe*) kind x y not-p))) (vector-push-extend new *constraint-universe* - (* 2 (length *constraint-universe*))) + (1+ (length *constraint-universe*))) (conset-adjoin new (lambda-var-constraints x)) (when (lambda-var-p y) (conset-adjoin new (lambda-var-constraints y))) @@ -468,7 +468,8 @@ (ok-lvar-lambda-var (first args) constraints) (if (ctype-p val) val - (specifier-type val)) + (let ((*compiler-error-context* use)) + (specifier-type val))) nil))))) ((eq eql) (let* ((arg1 (first args)) @@ -490,7 +491,11 @@ (var2 (add 'eql var1 var2 nil)) ((constant-lvar-p arg2) - (add 'eql var1 (ref-leaf (principal-lvar-use arg2)) + (add 'eql var1 + (let ((use (principal-lvar-use arg2))) + (if (ref-p use) + (ref-leaf use) + (find-constant (lvar-value arg2)))) nil)) (t (add-test-constraint 'typep var1 (lvar-type arg2)