X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fcheckgen.lisp;h=5a9d0098d240e04ed58e3fbe67bd375bd7bb6a00;hb=1b650be8b800cf96e2c268ae317fb26d0bf36827;hp=4958c90774b619634da1f6e25355bcf2d1b03b0f;hpb=11745f006f4eb17fdc6189475f22a79f52bbde6c;p=sbcl.git diff --git a/src/compiler/checkgen.lisp b/src/compiler/checkgen.lisp index 4958c90..5a9d009 100644 --- a/src/compiler/checkgen.lisp +++ b/src/compiler/checkgen.lisp @@ -280,27 +280,26 @@ (declare (type cast cast)) (let* ((cont (node-cont cast)) (dest (continuation-dest cont))) - (not (or (not (cast-type-check cast)) - (and (combination-p dest) - (let ((kind (combination-kind dest))) - (or (eq kind :full) - ;; The theory is that the type assertion is - ;; from a declaration in (or on) the callee, - ;; so the callee should be able to do the - ;; check. We want to let the callee do the - ;; check, because it is possible that by the - ;; time of call that declaration will be - ;; changed and we do not want to make people - ;; recompile all calls to a function when they - ;; were originally compiled with a bad - ;; declaration. (See also bug 35.) - (and (fun-info-p kind) - (null (fun-info-templates kind)) - (not (fun-info-ir2-convert kind))))) - (and - (immediately-used-p cont cast) - (values-subtypep (continuation-externally-checkable-type cont) - (cast-type-to-check cast)))))))) + (cond ((not (cast-type-check cast)) + nil) + ((and (combination-p dest) + (call-full-like-p dest) + ;; The theory is that the type assertion is + ;; from a declaration in (or on) the callee, + ;; so the callee should be able to do the + ;; check. We want to let the callee do the + ;; check, because it is possible that by the + ;; time of call that declaration will be + ;; changed and we do not want to make people + ;; recompile all calls to a function when they + ;; were originally compiled with a bad + ;; declaration. (See also bug 35.) + (immediately-used-p cont cast) + (values-subtypep (continuation-externally-checkable-type cont) + (cast-type-to-check cast))) + nil) + (t + t)))) ;;; Return true if CONT is a continuation whose type the back end is ;;; likely to want to check. Since we don't know what template the @@ -467,9 +466,9 @@ (do-blocks (block component) (when (block-type-check block) (do-nodes (node cont block) - (when (cast-p node) - (when (cast-type-check node) - (cast-check-uses node)) + (when (and (cast-p node) + (cast-type-check node)) + (cast-check-uses node) (cond ((worth-type-check-p node) (casts (cons node (not (probable-type-check-p node))))) (t