/[cmucl]/src/compiler/checkgen.lisp
ViewVC logotype

Diff of /src/compiler/checkgen.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by ram, Mon May 21 17:03:06 1990 UTC revision 1.7 by ram, Tue May 22 13:10:20 1990 UTC
# Line 127  Line 127 
127  ;;; that test negated.  Otherwise, we try to do a simple test, and if that is  ;;; that test negated.  Otherwise, we try to do a simple test, and if that is
128  ;;; impossible, we do a hairy test with non-negated types.  ;;; impossible, we do a hairy test with non-negated types.
129  ;;;  ;;;
130    ;;;    When doing a non-negated hairy check, we call MAYBE-WEAKEN-CHECK to
131    ;;; weaken the test to a convenient supertype (conditional on policy.)
132    ;;;
133  (defun maybe-negate-check (cont types)  (defun maybe-negate-check (cont types)
134    (declare (type continuation cont) (list types))    (declare (type continuation cont) (list types))
135    (multiple-value-bind (ptypes count)    (multiple-value-bind (ptypes count)
# Line 139  Line 142 
142                                  (list nil (maybe-weaken-check x cont) x))                                  (list nil (maybe-weaken-check x cont) x))
143                              types)))                              types)))
144          (let ((res (mapcar #'(lambda (p c)          (let ((res (mapcar #'(lambda (p c)
145                                 (let ((diff (type-difference p c)))                                 (let ((diff (type-difference p c))
146                                         (weak (maybe-weaken-check c cont)))
147                                   (if (and diff                                   (if (and diff
148                                            (< (type-test-cost diff)                                            (< (type-test-cost diff)
149                                               (type-test-cost c)))                                               (type-test-cost weak)))
150                                       (list t (maybe-weaken-check diff cont) c)                                       (list t diff c)
151                                       (list nil (maybe-weaken-check c cont) c))))                                       (list nil weak c))))
152                             ptypes types)))                             ptypes types)))
153            (if (and (not (find-if #'first res))            (if (and (not (find-if #'first res))
154                     (every #'type-check-template types))                     (every #'type-check-template types))

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.5