0.8.11.9:
[sbcl.git] / src / compiler / node.lisp
index 0025ca5..a07551f 100644 (file)
   ;; has already been analyzed, but new references have been added by
   ;; inline expansion. Unlike NEW-FUNCTIONALS, this is not disjoint
   ;; from COMPONENT-LAMBDAS.
-  (reanalyze-functionals nil :type list))
+  (reanalyze-functionals nil :type list)
+  (delete-blocks nil :type list)
+  (nlx-info-generated-p nil :type boolean))
 (defprinter (component :identity t)
   name
   #!+sb-show id
 (defstruct (cleanup (:copier nil))
   ;; the kind of thing that has to be cleaned up
   (kind (missing-arg)
-       :type (member :special-bind :catch :unwind-protect :block :tagbody))
+       :type (member :special-bind :catch :unwind-protect
+                     :block :tagbody :dynamic-extent))
   ;; the node that messes things up. This is the last node in the
   ;; non-messed-up environment. Null only temporarily. This could be
   ;; deleted due to unreachability.
   ;; true if there was ever a REF or SET node for this leaf. This may
   ;; be true when REFS and SETS are null, since code can be deleted.
   (ever-used nil :type boolean)
+  ;; is it declared dynamic-extent?
+  (dynamic-extent nil :type boolean)
   ;; some kind of info used by the back end
   (info nil))
 
   ;;    :DELETED
   ;;   This function has been found to be uncallable, and has been
   ;;   marked for deletion.
+  ;;
+  ;;    :ZOMBIE
+  ;;    Effectless [MV-]LET; has no BIND node.
   (kind nil :type (member nil :optional :deleted :external :toplevel
                          :escape :cleanup :let :mv-let :assignment
-                         :toplevel-xep))
+                          :zombie :toplevel-xep))
   ;; Is this a function that some external entity (e.g. the fasl dumper)
   ;; refers to, so that even when it appears to have no references, it
   ;; shouldn't be deleted? In the old days (before
   ;; retain it so that if the LET is deleted (due to a lack of vars),
   ;; we will still have caller's lexenv to figure out which cleanup is
   ;; in effect.
-  (call-lexenv nil :type (or lexenv null)))
+  (call-lexenv nil :type (or lexenv null))
+  ;; list of embedded lambdas
+  (children nil :type list)
+  (parent nil :type (or clambda null)))
 (defprinter (clambda :conc-name lambda- :identity t)
   %source-name
   %debug-name
   #!+sb-show id
+  kind
   (type :test (not (eq type *universal-type*)))
   (where-from :test (not (eq where-from :assumed)))
   (vars :prin1 (mapcar #'leaf-source-name vars)))
   (args nil :type list)
   ;; the kind of function call being made. :LOCAL means that this is a
   ;; local call to a function in the same component, and that argument
-  ;; syntax checking has been done, etc. Calls to known global
-  ;; functions are represented by storing the FUN-INFO for the
-  ;; function in this slot. :FULL is a call to an (as yet) unknown
-  ;; function. :ERROR is like :FULL, but means that we have discovered
-  ;; that the call contains an error, and should not be reconsidered
-  ;; for optimization.
-  (kind :full :type (or (member :local :full :error) fun-info))
+  ;; syntax checking has been done, etc.  Calls to known global
+  ;; functions are represented by storing :KNOWN in this slot and the
+  ;; FUN-INFO for that function in the FUN-INFO slot.  :FULL is a call
+  ;; to an (as yet) unknown function, or to a known function declared
+  ;; NOTINLINE. :ERROR is like :FULL, but means that we have
+  ;; discovered that the call contains an error, and should not be
+  ;; reconsidered for optimization.
+  (kind :full :type (member :local :full :error :known))
+  ;; if a call to a known global function, contains the FUN-INFO.
+  (fun-info nil :type (or fun-info null))
   ;; some kind of information attached to this node by the back end
   (info nil))
 
                             "<deleted>"))
                       args)))
 
-(defun call-full-like-p (call)
-  (declare (type combination call))
-  (let ((kind (basic-combination-kind call)))
-    (or (eq kind :full)
-        (and (fun-info-p kind)
-             (null (fun-info-templates kind))
-             (not (fun-info-ir2-convert kind))))))
-
 ;;; An MV-COMBINATION is to MULTIPLE-VALUE-CALL as a COMBINATION is to
 ;;; FUNCALL. This is used to implement all the multiple-value
 ;;; receiving forms.
   ;; NIL
   ;;    No type check is necessary (VALUE type is a subtype of the TYPE-TO-CHECK.)
   ;;
+  ;; :EXTERNAL
+  ;;    Type check will be performed by NODE-DEST.
+  ;;
   ;; T
   ;;    A type check is needed.
-  (%type-check t :type (member t nil))
+  (%type-check t :type (member t :external nil))
   ;; the lvar which is checked
   (value (missing-arg) :type lvar))
 (defprinter (cast :identity t)
 ;;; continuation and the exit continuation's DEST. Instead of using
 ;;; the returned value being delivered directly to the exit
 ;;; continuation, it is delivered to our VALUE lvar. The original exit
-;;; lvar is the exit node's LVAR.
+;;; lvar is the exit node's LVAR; physenv analysis also makes it the
+;;; lvar of %NLX-ENTRY call.
 (defstruct (exit (:include valued-node)
                 (:copier nil))
   ;; the ENTRY node that this is an exit for. If null, this is a