X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fnode.lisp;h=dcb0a690d1351a1c18a4ad9bc5c09b44f8ab162d;hb=ba7659c92f2b7fac7e9532a3db9114c5bdc4ab55;hp=abda10bb5d0364e5663e3902f63dbf02319a976e;hpb=20748f2dd7965dcd1446a1cb27e5a5af18a0e5bb;p=sbcl.git diff --git a/src/compiler/node.lisp b/src/compiler/node.lisp index abda10b..dcb0a69 100644 --- a/src/compiler/node.lisp +++ b/src/compiler/node.lisp @@ -84,7 +84,7 @@ ;; cached type of this continuation's value. If NIL, then this must ;; be recomputed: see CONTINUATION-DERIVED-TYPE. (%derived-type nil :type (or ctype null)) - ;; Node where this continuation is used, if unique. This is always + ;; the node where this continuation is used, if unique. This is always ;; null in :DELETED and :UNUSED continuations, and is never null in ;; :INSIDE-BLOCK continuations. In a :BLOCK-START continuation, the ;; Block's START-USES indicate whether NIL means no uses or more @@ -323,6 +323,14 @@ ;;; A COMPONENT structure provides a handle on a connected piece of ;;; the flow graph. Most of the passes in the compiler operate on ;;; COMPONENTs rather than on the entire flow graph. +;;; +;;; According to the CMU CL internals/front.tex, the reason for +;;; separating compilation into COMPONENTs is +;;; to increase the efficiency of large block compilations. In +;;; addition to improving locality of reference and reducing the +;;; size of flow analysis problems, this allows back-end data +;;; structures to be reclaimed after the compilation of each +;;; component. (defstruct (component (:copier nil)) ;; the kind of component ;; @@ -488,7 +496,7 @@ ;;; TNs, or eventually stack slots and registers). -- WHN 2001-09-29 (defstruct (physenv (:copier nil)) ;; the function that allocates this physical environment - (function (missing-arg) :type clambda) + (lambda (missing-arg) :type clambda :read-only t) #| ; seems not to be used as of sbcl-0.pre7.51 ;; a list of all the lambdas that allocate variables in this ;; physical environment @@ -508,7 +516,7 @@ ;; some kind of info used by the back end (info nil)) (defprinter (physenv :identity t) - function + lambda (closure :test closure) (nlx-info :test nlx-info)) @@ -914,6 +922,14 @@ ;; (or one of its LETs) using a non-LET local call. This may include ;; deleted functions because nobody bothers to clear them out. (calls () :type list) + ;; a list of all the LAMBDA-VARs directly referred to from this + ;; function (or one of its LETs). This may include deleted variables + ;; because nobody bothers to clean them out. + ;; + ;; FIXME: This is completely analogous to the CALLS slot, except the + ;; elements here are LAMBDA-VARs instead of FUNCTIONALs. Maybe the + ;; two lists should be merged into a single list. + (refers-to-vars () :type list) ;; the TAIL-SET that this LAMBDA is in. This is null during creation. ;; ;; In CMU CL, and old SBCL, this was also NILed out when LET @@ -1046,8 +1062,8 @@ ;;; LAMBDA-VARs with no REFs are considered to be deleted; physical ;;; environment analysis isn't done on these variables, so the back ;;; end must check for and ignore unreferenced variables. Note that a -;;; deleted lambda-var may have sets; in this case the back end is -;;; still responsible for propagating the Set-Value to the set's Cont. +;;; deleted LAMBDA-VAR may have sets; in this case the back end is +;;; still responsible for propagating the SET-VALUE to the set's CONT. (def!struct (lambda-var (:include basic-var)) ;; true if this variable has been declared IGNORE (ignorep nil :type boolean)