- (!cold-init-forms
- (setf (info :type :translator ',name)
- (lambda (,whole)
- (block ,name
- (destructuring-bind ,wholeless-arglist
- (rest ,whole) ; discarding NAME
- ,@decls
- ,@forms)))))
- ',name))))
+ (!cold-init-forms
+ (setf (info :type :translator ',name)
+ (lambda (,whole)
+ (block ,name
+ (destructuring-bind ,wholeless-arglist
+ (rest ,whole) ; discarding NAME
+ ,@decls
+ ,@forms)))))
+ ',name))))
;;; DEFVARs for these come later, after we have enough stuff defined.
(declaim (special *wild-type* *universal-type* *empty-type*))
\f
;;; the base class for the internal representation of types
(def!struct (ctype (:conc-name type-)
;;; DEFVARs for these come later, after we have enough stuff defined.
(declaim (special *wild-type* *universal-type* *empty-type*))
\f
;;; the base class for the internal representation of types
(def!struct (ctype (:conc-name type-)
(enumerable nil :read-only t)
;; an arbitrary hash code used in EQ-style hashing of identity
;; (since EQ hashing can't be done portably)
(enumerable nil :read-only t)
;; an arbitrary hash code used in EQ-style hashing of identity
;; (since EQ hashing can't be done portably)
;; Can this object contain other types? A global property of our
;; implementation (which unfortunately seems impossible to enforce
;; with assertions or other in-the-code checks and constraints) is
;; Can this object contain other types? A global property of our
;; implementation (which unfortunately seems impossible to enforce
;; with assertions or other in-the-code checks and constraints) is
(multiple-value-bind (subtypep1 win1) (csubtypep type1 type2)
(multiple-value-bind (subtypep2 win2) (csubtypep type2 type1)
(cond (subtypep1 type1)
(multiple-value-bind (subtypep1 win1) (csubtypep type1 type2)
(multiple-value-bind (subtypep2 win2) (csubtypep type2 type1)
(cond (subtypep1 type1)
;;; Hash two things (types) down to 8 bits. In CMU CL this was an EQ
;;; hash, but since it now needs to run in vanilla ANSI Common Lisp at
;;; Hash two things (types) down to 8 bits. In CMU CL this was an EQ
;;; hash, but since it now needs to run in vanilla ANSI Common Lisp at
(declaim (ftype (function (ctype ctype) (unsigned-byte 8)) type-cache-hash))
(defun type-cache-hash (type1 type2)
(logand (logxor (ash (type-hash-value type1) -3)
(declaim (ftype (function (ctype ctype) (unsigned-byte 8)) type-cache-hash))
(defun type-cache-hash (type1 type2)
(logand (logxor (ash (type-hash-value type1) -3)
#!-sb-fluid (declaim (inline type-list-cache-hash))
(declaim (ftype (function (list) (unsigned-byte 8)) type-list-cache-hash))
(defun type-list-cache-hash (types)
#!-sb-fluid (declaim (inline type-list-cache-hash))
(declaim (ftype (function (list) (unsigned-byte 8)) type-list-cache-hash))
(defun type-list-cache-hash (types)