X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fltn.lisp;h=7e9171b7c5fd3bfddc93ee018be1675fa60d22ba;hb=86fca9c405f91d02784bcdd24b25a81dce549332;hp=2a6b55760236381678114de951180e0c26e6204c;hpb=951a3a61ed25e9e2d3c1479d7ecdc355bd9e1c59;p=sbcl.git diff --git a/src/compiler/ltn.lisp b/src/compiler/ltn.lisp index 2a6b557..7e9171b 100644 --- a/src/compiler/ltn.lisp +++ b/src/compiler/ltn.lisp @@ -184,9 +184,8 @@ ;;; deliver values normally. We still annotate the function continuation, ;;; since IR2tran might decide to call after all. ;;; -;;; If not funny, we always flush arg type checks, but do it after -;;; annotation when the LTN-POLICY is safe, since we don't want to -;;; choose the TNs according to a type assertions that may not hold. +;;; If not funny, we flush arg type checks, when LTN-POLICY is not +;;; safe. ;;; ;;; Note that args may already be annotated because template selection can ;;; bail out to here. @@ -216,8 +215,7 @@ (make-ir2-continuation (primitive-type (continuation-type arg))))) - (annotate-1-value-continuation arg) - (when safe-p (flush-type-check arg)))) + (annotate-1-value-continuation arg))) (when (eq kind :error) (setf (basic-combination-kind call) :full)) (setf (basic-combination-info call) :full) @@ -270,7 +268,7 @@ ;;; we annotate for the number of values indicated by TYPES, but only ;;; use proven type information. (defun annotate-fixed-values-continuation (cont ltn-policy types) - (declare (continuation cont) (ltn-policy ltn-policy) (list types)) + (declare (type continuation cont) (type ltn-policy ltn-policy) (list types)) (unless (ltn-policy-safe-p ltn-policy) (flush-type-check cont)) (let ((res (make-ir2-continuation nil))) @@ -414,8 +412,7 @@ ;;; Make sure that a tail local call is linked directly to the bind ;;; node. Usually it will be, but calls from XEPs and calls that might have ;;; needed a cleanup after them won't have been swung over yet, since we -;;; weren't sure they would really be TR until now. Also called by byte -;;; compiler. +;;; weren't sure they would really be TR until now. (defun set-tail-local-call-successor (call) (let ((caller (node-home-lambda call)) (callee (combination-lambda call))) @@ -825,7 +822,7 @@ ;;; unsafe, then we never do any checks. If our policy is safe, and ;;; we are using a safe template, then we can also flush arg and ;;; result type checks. Result type checks are only flushed when the -;;; continuation as a single use. Result type checks are not flush if +;;; continuation has a single use. Result type checks are not flush if ;;; the policy is safe because the selection of template for results ;;; readers assumes the type check is done (uses the derived type ;;; which is the intersection of the proven and asserted types).