X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fltn.lisp;h=b38fa17b7ddaee3d65932e08220d4a9ff2df7585;hb=c0595e94aab165f59454a3a97f06a8bdc22f5bd3;hp=4e7ff47926df0887c31c1474f9a0a23a958997c8;hpb=6053e7f804b430144bb09e2d107ad4ab3fb97db4;p=sbcl.git diff --git a/src/compiler/ltn.lisp b/src/compiler/ltn.lisp index 4e7ff47..b38fa17 100644 --- a/src/compiler/ltn.lisp +++ b/src/compiler/ltn.lisp @@ -676,6 +676,12 @@ (when (and (or (not guard) (funcall guard)) (or (not safe-p) (ltn-policy-safe-p (template-ltn-policy try))) + ;; :SAFE is also considered to be :SMALL-SAFE, + ;; while the template cost describes time cost; + ;; so the fact that (< (t-cost try) (t-cost + ;; template)) does not mean that TRY is better + (not (and (eq ltn-policy :safe) + (eq (template-ltn-policy try) :fast-safe))) (or verbose-p (and (template-note try) (valid-fun-use @@ -838,13 +844,6 @@ (ctran-next ctran)) (ctran (node-next node) (node-next node))) (nil) - (let* ((lvar (when (valued-node-p node) - (node-lvar node))) - (dest (and lvar (lvar-dest lvar)))) - (when (and (cast-p dest) - (not (cast-type-check dest)) - (immediately-used-p lvar node)) - (derive-node-type node (cast-asserted-type dest)))) (etypecase node (ref) (combination