Changeset 4693


Ignore:
Timestamp:
11/11/03 17:37:18 (18 years ago)
Author:
piso
Message:

SIMPLE-SUBTYPE: optimization.

File:
1 edited

Legend:

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

    r4692 r4693  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: subtypep.lisp,v 1.22 2003-11-11 17:08:45 piso Exp $
     4;;; $Id: subtypep.lisp,v 1.23 2003-11-11 17:37:18 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    207207                                           (when (simple-subtypep supertype type2)
    208208                                             (return (values t)))))))))
    209   (let ((c1 (if (classp type1) type1 (find-class type1 nil)))
    210         (c2 (if (classp type2) type2 (find-class type2 nil))))
    211     (when (and c1 c2)
    212       (return-from simple-subtypep
    213                    (if (memq c2 (class-precedence-list c1)) t nil))))
    214   nil)
     209  (let (c1 c2)
     210    (if (and (setf c1 (if (classp type1) type1 (find-class type1 nil)))
     211             (setf c2 (if (classp type2) type2 (find-class type2 nil)))
     212             (memq c2 (class-precedence-list c1)))
     213        t
     214        nil)))
    215215
    216216(defun subtypep (type1 type2)
     
    334334
    335335(when (fboundp 'jvm::jvm-compile)
    336   (mapcar #'jvm::jvm-compile '(sys::subtypep-normalize-type
    337                                sys::sub-interval-p
    338                                sys::simple-subtypep
     336  (mapcar #'jvm::jvm-compile '(subtypep-normalize-type
     337                               sub-interval-p
     338                               simple-subtypep
    339339                               subtypep)))
Note: See TracChangeset for help on using the changeset viewer.