X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Falien-type.lisp;h=40e3ea14fd4eab59e7691f6b12c82dcb81f195dd;hb=77360ee4a1f94c41b807be7ad0e8687199fceef1;hp=0a28be15b535d56a4edfc283860a30bacfadc350;hpb=b08344ddbb8d0193054b72c01be7e367422ccf03;p=sbcl.git diff --git a/src/code/alien-type.lisp b/src/code/alien-type.lisp index 0a28be1..40e3ea1 100644 --- a/src/code/alien-type.lisp +++ b/src/code/alien-type.lisp @@ -21,17 +21,17 @@ (:constructor %make-alien-type-type (alien-type))) (alien-type nil :type alien-type)) -(define-type-class alien) +(!define-type-class alien) -(define-type-method (alien :unparse) (type) +(!define-type-method (alien :unparse) (type) `(alien ,(unparse-alien-type (alien-type-type-alien-type type)))) -(define-type-method (alien :simple-subtypep) (type1 type2) +(!define-type-method (alien :simple-subtypep) (type1 type2) (values (alien-subtype-p (alien-type-type-alien-type type1) (alien-type-type-alien-type type2)) t)) -;;; KLUDGE: This DEFINE-SUPERCLASSES gets executed much later than the +;;; KLUDGE: This !DEFINE-SUPERCLASSES gets executed much later than the ;;; others (toplevel form time instead of cold load init time) because ;;; ALIEN-VALUE itself is a structure which isn't defined until fairly ;;; late. @@ -40,16 +40,16 @@ ;;; 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-superclasses alien ((alien-value)) progn) -(define-type-method (alien :simple-=) (type1 type2) +(!define-type-method (alien :simple-=) (type1 type2) (let ((alien-type-1 (alien-type-type-alien-type type1)) (alien-type-2 (alien-type-type-alien-type type2))) (values (or (eq alien-type-1 alien-type-2) (alien-type-= alien-type-1 alien-type-2)) t))) -(def-type-translator alien (&optional (alien-type nil)) +(!def-type-translator alien (&optional (alien-type nil)) (typecase alien-type (null (make-alien-type-type))