X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fctype.lisp;h=dbc19f4ee2719974a3b2122eba5014bc17e18e1f;hb=70f323d9b06b95ed37a447742c1925906985c088;hp=124b4881432c4b01c25559a1ff92ea9e22ba6a13;hpb=a1a34a500b880ab761291350300d8d3184574183;p=sbcl.git diff --git a/src/compiler/ctype.lisp b/src/compiler/ctype.lisp index 124b488..dbc19f4 100644 --- a/src/compiler/ctype.lisp +++ b/src/compiler/ctype.lisp @@ -851,8 +851,10 @@ (let ((name (key-info-name key))) (do ((arg args (cddr arg))) ((null arg)) - (when (eq (lvar-value (first arg)) name) - (funcall fun (second arg) (key-info-type key)))))))) + (let ((keyname (first arg))) + (when (and (constant-lvar-p keyname) + (eq (lvar-value keyname) name)) + (funcall fun (second arg) (key-info-type key))))))))) ;;; Assert that CALL is to a function of the specified TYPE. It is ;;; assumed that the call is legal and has only constants in the @@ -864,13 +866,17 @@ (if trusted (derive-node-type call returns) (let ((lvar (node-lvar call))) - ;; If the value is used in a non-tail position, and - ;; the lvar is a single-use, assert the type. Multiple use - ;; sites need to be elided because the assertion has to apply - ;; to all uses. Tail positions are elided because the assertion - ;; would lose cause us not the be in a tail-position anymore. + ;; If the value is used in a non-tail position, and the lvar + ;; is a single-use, assert the type. Multiple use sites need + ;; to be elided because the assertion has to apply to all + ;; uses. Tail positions are elided because the assertion + ;; would cause us not the be in a tail-position anymore. MV + ;; calls are elided because not only are the assertions of + ;; less use there, but they can cause the MV call conversion + ;; to cause astray. (when (and lvar (not (return-p (lvar-dest lvar))) + (not (mv-combination-p (lvar-dest lvar))) (lvar-has-single-use-p lvar)) (when (assert-lvar-type lvar returns policy) (reoptimize-lvar lvar)))))