- (has-top (find :top-level funs :key #'functional-kind)))
- (cond ((or (find-if #'has-xep-or-nlx funs)
+ (has-top (find :top-level funs :key #'functional-kind))
+ (has-external-references
+ (some #'functional-has-external-references-p funs)))
+ (cond (;; The FUNCTIONAL-HAS-EXTERNAL-REFERENCES-P concept
+ ;; is newer than the rest of this function, and
+ ;; doesn't really seem to fit into its mindset. Here
+ ;; we mark components which contain such FUNCTIONs
+ ;; them as :COMPLEX-TOP-LEVEL, since they do get
+ ;; executed at run time, and since it's not valid to
+ ;; delete them just because they don't have any
+ ;; references from pure :TOP-LEVEL components. -- WHN
+ has-external-references
+ (setf (component-kind com) :complex-top-level)
+ (real com)
+ (real-top com))
+ ((or (some #'has-xep-or-nlx funs)