X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fentry.lisp;h=248d83ed1cf1e9de314601a54aa0fcb0d2c9c9af;hb=964e644f3f1ec2c169b1def87f11e2f5b09a748e;hp=aad390820a5d8205f83a61c7f67bf04dadd92742;hpb=b05f52060838600d14b5d8ad4604a61351dd7017;p=sbcl.git diff --git a/src/compiler/entry.lisp b/src/compiler/entry.lisp index aad3908..248d83e 100644 --- a/src/compiler/entry.lisp +++ b/src/compiler/entry.lisp @@ -31,24 +31,6 @@ (select-component-format component) (values)) -;;; Takes the list representation of the debug arglist and turns it -;;; into a string. -;;; -;;; FIXME: Why don't we just save this as a list instead of converting -;;; it to a string? -(defun make-arg-names (x) - (declare (type functional x)) - (let ((args (functional-arg-documentation x))) - (aver (not (eq args :unspecified))) - (if (null args) - "()" - (let ((*print-pretty* t) - (*print-escape* t) - (*print-base* 10) - (*print-radix* nil) - (*print-case* :downcase)) - (write-to-string args))))) - ;;; Initialize INFO structure to correspond to the XEP LAMBDA FUN. (defun compute-entry-info (fun info) (declare (type clambda fun) (type entry-info info)) @@ -60,7 +42,9 @@ (setf (entry-info-name info) (leaf-debug-name internal-fun)) (when (policy bind (>= debug 1)) - (setf (entry-info-arguments info) (make-arg-names internal-fun)) + (let ((args (functional-arg-documentation internal-fun))) + (aver (not (eq args :unspecified))) + (setf (entry-info-arguments info) args)) (setf (entry-info-type info) (type-specifier (leaf-type internal-fun))))) (values)) @@ -96,14 +80,16 @@ (closure (physenv-closure (lambda-physenv (main-entry ef))))) (dolist (ref (leaf-refs lambda)) - (let ((ref-component (block-component (node-block ref)))) + (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))))))))) + (push ref (leaf-refs new)) + (setf (leaf-refs lambda) + (delq ref (leaf-refs lambda)))))))))) (:toplevel (setq res t)))) res))