- (:external
- (unless (lambda-has-external-references-p lambda)
- (let* ((ef (functional-entry-function lambda))
- (new (make-functional :kind :toplevel-xep
- :info (leaf-info lambda)
- :name (leaf-name ef)
- :lexenv (make-null-lexenv)))
- (closure (physenv-closure
- (lambda-physenv (main-entry ef)))))
- (dolist (ref (leaf-refs lambda))
- (let ((ref-component (block-component (node-block ref))))
- (cond ((eq ref-component component))
- ((or (not (component-toplevelish-p ref-component))
- closure)
- (setq res t))
- (t
- (setf (ref-leaf ref) new)
- (push ref (leaf-refs new)))))))))
- (:toplevel
- (setq res t))))
+ (:external
+ (unless (lambda-has-external-references-p lambda)
+ (let* ((ef (functional-entry-fun lambda))
+ (new (make-functional
+ :kind :toplevel-xep
+ :info (leaf-info lambda)
+ :%source-name (functional-%source-name ef)
+ :%debug-name (functional-%debug-name ef)
+ :lexenv (make-null-lexenv)))
+ (closure (physenv-closure
+ (lambda-physenv (main-entry ef)))))
+ (dolist (ref (leaf-refs lambda))
+ (let ((ref-component (node-component ref)))
+ (cond ((eq ref-component component))
+ ((or (not (component-toplevelish-p ref-component))
+ closure)
+ (setq res t))
+ (t
+ (setf (ref-leaf ref) new)
+ (push ref (leaf-refs new))
+ (setf (leaf-refs lambda)
+ (delq ref (leaf-refs lambda))))))))))
+ (:toplevel
+ (setq res t))))