Changeset 3979


Ignore:
Timestamp:
09/21/03 19:49:33 (20 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

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

    r3973 r3979  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: subtypep.lisp,v 1.12 2003-09-21 19:30:29 piso Exp $
     4;;; $Id: subtypep.lisp,v 1.13 2003-09-21 19:49:33 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    134134
    135135(defun simple-subtypep (type1 type2)
    136 ;;   (assert (symbolp type1))
    137 ;;   (assert (symbolp type2))
    138136  (cond ((and (symbolp type1) (symbolp type2))
    139137         (if (memq type2 (supertypes type1))
     
    200198  (when (or (null type1) (eq type2 t))
    201199    (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))))
    202211  (setq type1 (normalize-type type1)
    203212        type2 (normalize-type type2))
Note: See TracChangeset for help on using the changeset viewer.