Changeset 4722


Ignore:
Timestamp:
11/13/03 19:54:04 (18 years ago)
Author:
piso
Message:

SIMPLE-SUBTYPEP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/subtypep.lisp

    r4721 r4722  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: subtypep.lisp,v 1.28 2003-11-13 19:21:46 piso Exp $
     4;;; $Id: subtypep.lisp,v 1.29 2003-11-13 19:54:04 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    204204
    205205(defun simple-subtypep (type1 type2)
    206   (when (and (symbolp type1) (symbolp type2))
    207     (multiple-value-bind (type1-supertypes type1-known-p)
    208         (gethash type1 *known-types*)
    209       (when type1-known-p
    210         (return-from simple-subtypep (if (memq type2 type1-supertypes)
    211                                          t
    212                                          (dolist (supertype type1-supertypes)
    213                                            (when (simple-subtypep supertype type2)
    214                                              (return t))))))))
    215   nil)
     206  (multiple-value-bind (type1-supertypes type1-known-p) (gethash type1 *known-types*)
     207    (if type1-known-p
     208        (if (memq type2 type1-supertypes)
     209            t
     210            (dolist (supertype type1-supertypes)
     211              (when (simple-subtypep supertype type2)
     212                (return t))))
     213        nil)))
    216214
    217215(defun subtypep (type1 type2)
Note: See TracChangeset for help on using the changeset viewer.