;;; 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
(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))
(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))