X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fltn.lisp;h=6dc41818e1d9d37c64b9c2e844d86fd13ef060c3;hb=74cf7a4d01664fbf72a662ba093ad67ca243b524;hp=b707b767ba75ff98683a8d90d22b01330655c6a6;hpb=45bc305be4e269d2e1a477c8e0ae9a64df1ccd1c;p=sbcl.git diff --git a/src/compiler/ltn.lisp b/src/compiler/ltn.lisp index b707b76..6dc4181 100644 --- a/src/compiler/ltn.lisp +++ b/src/compiler/ltn.lisp @@ -68,13 +68,14 @@ ;;; return the leaf, otherwise return NIL. (defun lvar-delayed-leaf (lvar) (declare (type lvar lvar)) - (let ((use (lvar-uses lvar))) - (and (ref-p use) - (let ((leaf (ref-leaf use))) - (etypecase leaf - (lambda-var (if (null (lambda-var-sets leaf)) leaf nil)) - (constant leaf) - ((or functional global-var) nil)))))) + (unless (lvar-dynamic-extent lvar) + (let ((use (lvar-uses lvar))) + (and (ref-p use) + (let ((leaf (ref-leaf use))) + (etypecase leaf + (lambda-var (if (null (lambda-var-sets leaf)) leaf nil)) + (constant leaf) + ((or functional global-var) nil))))))) ;;; Annotate a normal single-value lvar. If its only use is a ref that ;;; we are allowed to delay the evaluation of, then we mark the lvar @@ -366,7 +367,7 @@ (unless (and (combination-p use) (let ((info (basic-combination-info use))) (and (template-p info) - (eq (template-result-types info) :conditional)))) + (template-conditional-p info)))) (annotate-ordinary-lvar test))) (values)) @@ -522,7 +523,7 @@ (if (and safe-p (template-args-ok template call nil)) :arg-check :arg-types))) - ((eq (template-result-types template) :conditional) + ((template-conditional-p template) (let ((dest (lvar-dest lvar))) (if (and (if-p dest) (immediately-used-p (if-test dest) call))