X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fcheckgen.lisp;h=129c7547b8e17f53b59b59a5b8b721055c2ade15;hb=b387f6ae447b55e203f47fc40af4a36e756fe345;hp=5b44d181b6ccb99cd2b39c5ffd63a70a37dea3f4;hpb=2bdf5a3484eda55b0d4b9313aa6b3505b6d7cbd8;p=sbcl.git diff --git a/src/compiler/checkgen.lisp b/src/compiler/checkgen.lisp index 5b44d18..129c754 100644 --- a/src/compiler/checkgen.lisp +++ b/src/compiler/checkgen.lisp @@ -116,18 +116,6 @@ ;;;; checking strategy determination -(define-optimization-quality type-check - (cond ((= safety 0) 0) - ;; FIXME: It is duplicated in PROBABLE-TYPE-CHECK-P and in - ;; some other places. - - ((and (<= speed safety) - (<= space safety) - (<= compilation-speed safety)) - 3) - (t 2)) - ("no" "maybe" "fast" "full")) - ;;; Return the type we should test for when we really want to check ;;; for TYPE. If type checking policy is "fast", then we return a ;;; weaker type if it is easier to check. First we try the defined @@ -265,7 +253,11 @@ (not (or (values-subtypep (continuation-proven-type cont) (continuation-type-to-check cont)) (and (combination-p dest) - (eq (combination-kind dest) :full) + (let ((kind (combination-kind dest))) + (or (eq kind :full) + (and (fun-info-p kind) + (null (fun-info-templates kind)) + (not (fun-info-ir2-convert kind))))) ;; 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