X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fnode.lisp;h=a07551f899ac097ab1754115129617fd42249082;hb=210d45383946d792b29749da85715786e48b2fbe;hp=0025ca5d998d6315b475a6387655e0f860141cfa;hpb=6053e7f804b430144bb09e2d107ad4ab3fb97db4;p=sbcl.git diff --git a/src/compiler/node.lisp b/src/compiler/node.lisp index 0025ca5..a07551f 100644 --- a/src/compiler/node.lisp +++ b/src/compiler/node.lisp @@ -372,7 +372,9 @@ ;; 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 @@ -422,7 +424,8 @@ (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. @@ -592,6 +595,8 @@ ;; 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)) @@ -784,9 +789,12 @@ ;; :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 @@ -918,11 +926,15 @@ ;; 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))) @@ -1143,13 +1155,16 @@ (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)) @@ -1168,14 +1183,6 @@ "")) 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. @@ -1232,9 +1239,12 @@ ;; 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) @@ -1265,7 +1275,8 @@ ;;; 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