X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Falien-type.lisp;h=5aed5cd2cf981d859ffc39c45c5f7bc8b58a61aa;hb=380ea897e2c12a01547f918f73e8a1db0a3a0373;hp=d041a83f4aabb8785c8179ea48e3f06dd274759f;hpb=0b5610d8a220a4b20cbeac958953ca4d67c00038;p=sbcl.git diff --git a/src/code/alien-type.lisp b/src/code/alien-type.lisp index d041a83..5aed5cd 100644 --- a/src/code/alien-type.lisp +++ b/src/code/alien-type.lisp @@ -13,6 +13,8 @@ (in-package "SB!KERNEL") +(/show0 "code/alien-type.lisp 16") + (!begin-collecting-cold-init-forms) (defstruct (alien-type-type @@ -24,6 +26,9 @@ (!define-type-class alien) +(!define-type-method (alien :negate) (type) + (make-negation-type :type type)) + (!define-type-method (alien :unparse) (type) `(alien ,(unparse-alien-type (alien-type-type-alien-type type)))) @@ -36,11 +41,6 @@ ;;; others (toplevel form time instead of cold load init time) because ;;; ALIEN-VALUE itself is a structure which isn't defined until fairly ;;; late. -;;; -;;; FIXME: I'm somewhat tempted to just punt ALIEN from the type system. -;;; It's sufficiently unlike the others that it's a bit of a pain, and -;;; it doesn't seem to be put to any good use either in type inference or -;;; in type declarations. (!define-superclasses alien ((alien-value)) progn) (!define-type-method (alien :simple-=) (type1 type2) @@ -63,8 +63,10 @@ (if alien-type (let ((lisp-rep-type (compute-lisp-rep-type alien-type))) (if lisp-rep-type - (specifier-type lisp-rep-type) + (single-value-specifier-type lisp-rep-type) (%make-alien-type-type alien-type))) *universal-type*)) (!defun-from-collected-cold-init-forms !alien-type-cold-init) + +(/show0 "code/alien-type.lisp end of file")