149 |
|
|
150 |
;;; TYPEP predicate. |
;;; TYPEP predicate. |
151 |
;;; FIXME --optimize with most likely cases first |
;;; FIXME --optimize with most likely cases first |
152 |
(defun typep (object type &aux tp i tem) |
(defun typep (object type &optional env &aux tp i tem) |
153 |
|
(declare (ignore env)) |
154 |
(when (classp type) |
(when (classp type) |
155 |
(return-from typep (if (member type (class-precedence-list (funcall 'class-of object))) t nil))) |
(return-from typep (if (member type (class-precedence-list (funcall 'class-of object))) t nil))) |
156 |
(if (atom type) |
(if (atom type) |
298 |
|
|
299 |
|
|
300 |
;;; SUBTYPEP predicate. |
;;; SUBTYPEP predicate. |
301 |
(defun subtypep (type1 type2 &aux t1 t2 i1 i2 ntp1 ntp2 tem) |
(defun subtypep (type1 type2 &optional env &aux t1 t2 i1 i2 ntp1 ntp2 tem) |
302 |
|
(declare (ignore env)) |
303 |
(let ((c1 (classp type1)) (c2 (classp type2))) |
(let ((c1 (classp type1)) (c2 (classp type2))) |
304 |
(when (and c1 c2) |
(when (and c1 c2) |
305 |
(return-from subtypep |
(return-from subtypep |