X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fnode.lisp;h=14c344491a99d779aea3c2c7edbb3a86263ef948;hb=079ef9dad558ca07cb8178ef428bf738112174fa;hp=c885f7f9b9e7d955c387b98cfc04f0d5f21ac5aa;hpb=3d2929a8f013c3a35ea4fcf46426031cbb8b0953;p=sbcl.git diff --git a/src/compiler/node.lisp b/src/compiler/node.lisp index c885f7f..14c3444 100644 --- a/src/compiler/node.lisp +++ b/src/compiler/node.lisp @@ -283,7 +283,11 @@ ;;; component. (def!struct (component (:copier nil) (:constructor - make-component (head tail &aux (last-block tail)))) + make-component + (head + tail &aux + (last-block tail) + (outer-loop (make-loop :kind :outer :head head))))) ;; unique ID for debugging #!+sb-show (id (new-object-id) :read-only t) ;; the kind of component @@ -388,7 +392,7 @@ ;; this is filled by physical environment analysis (dx-lvars nil :type list) ;; The default LOOP in the component. - (outer-loop (make-loop :kind :outer :head head) :type cloop)) + (outer-loop (missing-arg) :type cloop)) (defprinter (component :identity t) name #!+sb-show id @@ -451,7 +455,9 @@ ;; For :DYNAMIC-EXTENT: a list of all DX LVARs, preserved by this ;; cleanup. This is filled when the cleanup is created (now by ;; locall call analysis) and is rechecked by physical environment - ;; analysis. + ;; analysis. (For closures this is a list of the allocating node - + ;; during IR1, and a list of the argument LVAR of the allocator - + ;; after physical environment analysis.) (info nil :type list)) (defprinter (cleanup :identity t) kind @@ -537,7 +543,9 @@ (def!struct (nlx-info (:constructor make-nlx-info (cleanup exit - &aux (lvar (node-lvar exit)))) + &aux + (block (first (block-succ + (node-block exit)))))) (:make-load-form-fun ignore-it)) ;; the cleanup associated with this exit. In a catch or ;; unwind-protect, this is the :CATCH or :UNWIND-PROTECT cleanup, @@ -545,28 +553,29 @@ ;; this thus provides a good indication of what kind of exit is ;; being done. (cleanup (missing-arg) :type cleanup) - ;; the continuation exited to (the CONT of the EXIT nodes). If this - ;; exit is from an escape function (CATCH or UNWIND-PROTECT), then - ;; physical environment analysis deletes the escape function and - ;; instead has the %NLX-ENTRY use this continuation. + ;; the ``continuation'' exited to (the block, succeeding the EXIT + ;; nodes). If this exit is from an escape function (CATCH or + ;; UNWIND-PROTECT), then physical environment analysis deletes the + ;; escape function and instead has the %NLX-ENTRY use this + ;; continuation. ;; - ;; This slot is primarily an indication of where this exit delivers - ;; its values to (if any), but it is also used as a sort of name to - ;; allow us to find the NLX-INFO that corresponds to a given exit. - ;; For this purpose, the ENTRY must also be used to disambiguate, - ;; since exits to different places may deliver their result to the - ;; same continuation. - (exit (missing-arg) :type exit) - (lvar (missing-arg) :type (or lvar null)) + ;; This slot is used as a sort of name to allow us to find the + ;; NLX-INFO that corresponds to a given exit. For this purpose, the + ;; ENTRY must also be used to disambiguate, since exits to different + ;; places may deliver their result to the same continuation. + (block (missing-arg) :type cblock) ;; the entry stub inserted by physical environment analysis. This is ;; a block containing a call to the %NLX-ENTRY funny function that ;; has the original exit destination as its successor. Null only ;; temporarily. (target nil :type (or cblock null)) + ;; for a lexical exit it determines whether tag existence check is + ;; needed + (safe-p nil :type boolean) ;; some kind of info used by the back end info) (defprinter (nlx-info :identity t) - exit + block target info) @@ -853,6 +862,9 @@ ;; the original function or macro lambda list, or :UNSPECIFIED if ;; this is a compiler created function (arg-documentation nil :type (or list (member :unspecified))) + ;; Node, allocating closure for this lambda. May be NIL when we are + ;; sure that no closure is needed. + (allocator nil :type (or null combination)) ;; various rare miscellaneous info that drives code generation & stuff (plist () :type list)) (defprinter (functional :identity t) @@ -1310,7 +1322,8 @@ (entry nil :type (or entry null)) ;; the lvar yielding the value we are to exit with. If NIL, then no ;; value is desired (as in GO). - (value nil :type (or lvar null))) + (value nil :type (or lvar null)) + (nlx-info nil :type (or nlx-info null))) (defprinter (exit :identity t) #!+sb-show id (entry :test entry)