(lambda-return clambda)))
(result-use (when (return-p creturn)
(principal-lvar-use (return-result creturn)))))
- (when result-use
- (if (known-dx-combination-p result-use dx)
- (combination-args-flow-cleanly-p use result-use dx)
- (dx-combination-p result-use dx)))))
- t))
+ ;; FIXME: We should be able to deal with multiple uses here as well.
+ (and (dx-combination-p result-use dx)
+ (combination-args-flow-cleanly-p use result-use dx))))))
(defun combination-args-flow-cleanly-p (combination1 combination2 dx)
(labels ((recurse (combination)
(eq (defined-fun-functional defined-fun) fun))
(remhash name *free-funs*))))))
+;;; Return functional for DEFINED-FUN which has been converted in policy
+;;; corresponding to the current one, or NIL if no such functional exists.
+(defun defined-fun-functional (defined-fun)
+ (let ((policy (lexenv-%policy *lexenv*)))
+ (dolist (functional (defined-fun-functionals defined-fun))
+ (when (equal policy (lexenv-%policy (functional-lexenv functional)))
+ (return functional)))))
+
;;; Do stuff to delete the semantic attachments of a REF node. When
;;; this leaves zero or one reference, we do a type dispatch off of
;;; the leaf to determine if a special action is appropriate.