projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.7.13.6
[sbcl.git]
/
src
/
compiler
/
typetran.lisp
diff --git
a/src/compiler/typetran.lisp
b/src/compiler/typetran.lisp
index
6de64ea
..
acaac05
100644
(file)
--- a/
src/compiler/typetran.lisp
+++ b/
src/compiler/typetran.lisp
@@
-72,6
+72,8
@@
nil)
((csubtypep otype type)
t)
nil)
((csubtypep otype type)
t)
+ ((eq type *empty-type*)
+ nil)
(t
(give-up-ir1-transform)))))
(t
(give-up-ir1-transform)))))
@@
-274,6
+276,11
@@
`(typep ,n-obj ',x))
(rest spec))))))))))
`(typep ,n-obj ',x))
(rest spec))))))))))
+(defun source-transform-negation-typep (object type)
+ (declare (type negation-type type))
+ (let ((spec (type-specifier (negation-type-type type))))
+ `(not (typep ,object ',spec))))
+
;;; Do source transformation for TYPEP of a known union type. If a
;;; union type contains LIST, then we pull that out and make it into a
;;; single LISTP call. Note that if SYMBOL is in the union, then LIST
;;; Do source transformation for TYPEP of a known union type. If a
;;; union type contains LIST, then we pull that out and make it into a
;;; single LISTP call. Note that if SYMBOL is in the union, then LIST
@@
-503,6
+510,8
@@
(typecase type
(hairy-type
(source-transform-hairy-typep object type))
(typecase type
(hairy-type
(source-transform-hairy-typep object type))
+ (negation-type
+ (source-transform-negation-typep object type))
(union-type
(source-transform-union-typep object type))
(intersection-type
(union-type
(source-transform-union-typep object type))
(intersection-type