Changeset 3979
- Timestamp:
- 09/21/03 19:49:33 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/subtypep.lisp
r3973 r3979 2 2 ;;; 3 3 ;;; Copyright (C) 2003 Peter Graves 4 ;;; $Id: subtypep.lisp,v 1.1 2 2003-09-21 19:30:29piso Exp $4 ;;; $Id: subtypep.lisp,v 1.13 2003-09-21 19:49:33 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 134 134 135 135 (defun simple-subtypep (type1 type2) 136 ;; (assert (symbolp type1))137 ;; (assert (symbolp type2))138 136 (cond ((and (symbolp type1) (symbolp type2)) 139 137 (if (memq type2 (supertypes type1)) … … 200 198 (when (or (null type1) (eq type2 t)) 201 199 (return-from subtypep (values t t))) 200 (let ((c1 (classp type1)) (c2 (classp type2))) 201 (when (and c1 c2) 202 (return-from subtypep 203 (if (memq type2 (class-precedence-list type1)) 204 (values t t) (values nil t)))) 205 (when (and c1 (or (eq type2 'structure-object) (eq type2 'standard-object))) 206 (return-from subtypep 207 (if (member (find-class type2) (class-precedence-list type1)) 208 (values t t) (values nil t)))) 209 (when (or c1 c2) 210 (return-from subtypep (values nil t)))) 202 211 (setq type1 (normalize-type type1) 203 212 type2 (normalize-type type2))
Note: See TracChangeset
for help on using the changeset viewer.