|
[Sbcl-commits] CVS: sbcl/src/code early-type.lisp, 1.57,
1.58 late-type.lisp, 1.144, 1.145
From: Nikodemus Siivola <demoss@us...> - 2010-03-26 12:59
|
Update of /cvsroot/sbcl/sbcl/src/code
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv5064/src/code
Modified Files:
early-type.lisp late-type.lisp
Log Message:
1.0.36.40: fix PPC build
* Resent unknown-type reparsing changes could result in LVAR-TYPE
being #<UNKNOWN-TYPE RESTART> but _behaving_ as if it actually was
#<STRUCTURE-CLASSOID RESTART> -- make PRIMITIVE-TYPE reparse the type
if appropriate so that the right template can be found.
* This problem was masked on x86oids as they have %INSTANCE-REF arg
type *, whereas PPC had INSTANCE.
Fixes launchpad bug #542894.
Index: early-type.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/code/early-type.lisp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- early-type.lisp 27 Feb 2010 16:47:49 -0000 1.57
+++ early-type.lisp 26 Mar 2010 12:59:26 -0000 1.58
@@ -34,6 +34,26 @@
(defstruct (unknown-type (:include hairy-type)
(:copier nil)))
+(defun maybe-reparse-specifier (type)
+ (when (unknown-type-p type)
+ (let* ((spec (unknown-type-specifier type))
+ (name (if (consp spec)
+ (car spec)
+ spec)))
+ (when (info :type :kind name)
+ (let ((new-type (specifier-type spec)))
+ (unless (unknown-type-p new-type)
+ new-type))))))
+
+;;; Evil macro.
+(defmacro maybe-reparse-specifier! (type)
+ (assert (symbolp type))
+ (with-unique-names (new-type)
+ `(let ((,new-type (maybe-reparse-specifier ,type)))
+ (when ,new-type
+ (setf ,type ,new-type)
+ t))))
+
(defstruct (negation-type (:include ctype
(class-info (type-class-or-lose 'negation))
;; FIXME: is this right? It's
Index: late-type.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/code/late-type.lisp,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- late-type.lisp 18 Mar 2010 18:58:20 -0000 1.144
+++ late-type.lisp 26 Mar 2010 12:59:26 -0000 1.145
@@ -1373,45 +1373,21 @@
(!define-type-method (hairy :unparse) (x)
(hairy-type-specifier x))
-(defun maybe-specifier-for-reparse (type)
- (when (unknown-type-p type)
- (let* ((spec (unknown-type-specifier type))
- (name (if (consp spec)
- (car spec)
- spec)))
- (when (info :type :kind name)
- spec))))
-
-;;; Evil macro.
-(defmacro maybe-reparse-specifier! (type)
- (assert (symbolp type))
- (with-unique-names (spec)
- `(let ((,spec (maybe-specifier-for-reparse ,type)))
- (when ,spec
- (setf ,type (specifier-type ,spec))
- t))))
-
(!define-type-method (hairy :simple-subtypep) (type1 type2)
(let ((hairy-spec1 (hairy-type-specifier type1))
(hairy-spec2 (hairy-type-specifier type2)))
(cond ((equal-but-no-car-recursion hairy-spec1 hairy-spec2)
(values t t))
((maybe-reparse-specifier! type1)
- (if (unknown-type-p type1)
- (values nil nil)
- (csubtypep type1 type2)))
+ (csubtypep type1 type2))
((maybe-reparse-specifier! type2)
- (if (unknown-type-p type2)
- (values nil nil)
- (csubtypep type1 type2)))
+ (csubtypep type1 type2))
(t
(values nil nil)))))
(!define-type-method (hairy :complex-subtypep-arg2) (type1 type2)
(if (maybe-reparse-specifier! type2)
- (if (unknown-type-p type2)
- (values nil nil)
- (csubtypep type1 type2))
+ (csubtypep type1 type2)
(let ((specifier (hairy-type-specifier type2)))
(cond ((and (consp specifier) (eql (car specifier) 'satisfies))
(case (cadr specifier)
@@ -1424,16 +1400,12 @@
(!define-type-method (hairy :complex-subtypep-arg1) (type1 type2)
(if (maybe-reparse-specifier! type1)
- (if (unknown-type-p type1)
- (values nil nil)
- (csubtypep type1 type2))
+ (csubtypep type1 type2)
(values nil nil)))
(!define-type-method (hairy :complex-=) (type1 type2)
(if (maybe-reparse-specifier! type2)
- (if (unknown-type-p type2)
- (values nil nil)
- (type= type1 type2))
+ (type= type1 type2)
(values nil nil)))
(!define-type-method (hairy :simple-intersection2 :complex-intersection2)
|
| Thread | Author | Date |
|---|---|---|
| [Sbcl-commits] CVS: sbcl/src/code early-type.lisp, 1.57, 1.58 late-type.lisp, 1.144, 1.145 | Nikodemus Siivola <demoss@us...> |