X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fir1util.lisp;h=4c5d3a3d0f378575b41a429b1713e205822ca0f5;hb=1a6def3955b715472eb2c75b15660912b9f90173;hp=cf497479331808ade1ee5e8475caf24dfb5f4fab;hpb=0a82f2db352cc348d2107a882e50af222ff97ed3;p=sbcl.git diff --git a/src/compiler/ir1util.lisp b/src/compiler/ir1util.lisp index cf49747..4c5d3a3 100644 --- a/src/compiler/ir1util.lisp +++ b/src/compiler/ir1util.lisp @@ -276,7 +276,7 @@ (lambda-physenv (node-home-lambda (block-last block)))) ;;; Return the Top Level Form number of PATH, i.e. the ordinal number -;;; of its original source's top-level form in its compilation unit. +;;; of its original source's top level form in its compilation unit. (defun source-path-tlf-number (path) (declare (list path)) (car (last path))) @@ -585,7 +585,7 @@ (declare (type clambda leaf)) (let ((kind (functional-kind leaf)) (bind (lambda-bind leaf))) - (aver (not (member kind '(:deleted :optional :top-level)))) + (aver (not (member kind '(:deleted :optional :toplevel)))) (aver (not (functional-has-external-references-p leaf))) (setf (functional-kind leaf) :deleted) (setf (lambda-bind leaf) nil) @@ -603,7 +603,7 @@ (unless (leaf-ever-used leaf) (let ((*compiler-error-context* bind)) (compiler-note "deleting unused function~:[.~;~:*~% ~S~]" - (leaf-name leaf)))) + (leaf-debug-name leaf)))) (unlink-blocks (component-head component) bind-block) (when return (unlink-blocks (node-block return) (component-tail component))) @@ -884,7 +884,7 @@ ;; ANSI section "3.2.5 Exceptional Situations in the Compiler" ;; requires this to be a STYLE-WARNING. (compiler-style-warning "The variable ~S is defined but never used." - (leaf-name var))) + (leaf-debug-name var))) (setf (leaf-ever-used var) t)))) (values)) @@ -1111,7 +1111,7 @@ ;;;; leaf hackery -;;; Change the Leaf that a Ref refers to. +;;; Change the LEAF that a REF refers to. (defun change-ref-leaf (ref leaf) (declare (type ref ref) (type leaf leaf)) (unless (eq (ref-leaf ref) leaf) @@ -1144,19 +1144,21 @@ ;;; Return a LEAF which represents the specified constant object. If ;;; the object is not in *CONSTANTS*, then we create a new constant ;;; LEAF and enter it. -#!-sb-fluid (declaim (maybe-inline find-constant)) (defun find-constant (object) - (if (typep object '(or symbol number character instance)) - (or (gethash object *constants*) - (setf (gethash object *constants*) - (make-constant :value object - :name nil - :type (ctype-of object) - :where-from :defined))) - (make-constant :value object - :name nil - :type (ctype-of object) - :where-from :defined))) + (if (typep object + ;; FIXME: What is the significance of this test? ("things + ;; that are worth uniquifying"?) + '(or symbol number character instance)) + (or (gethash object *constants*) + (setf (gethash object *constants*) + (make-constant :value object + :%source-name '.anonymous. + :type (ctype-of object) + :where-from :defined))) + (make-constant :value object + :%source-name '.anonymous. + :type (ctype-of object) + :where-from :defined))) ;;; If there is a non-local exit noted in ENTRY's environment that ;;; exits to CONT in that entry, then return it, otherwise return NIL. @@ -1198,10 +1200,10 @@ (return nil))))))) ;;; Return true if function is an XEP. This is true of normal XEPs -;;; (:EXTERNAL kind) and top-level lambdas (:TOP-LEVEL kind.) +;;; (:EXTERNAL kind) and top level lambdas (:TOPLEVEL kind.) (defun external-entry-point-p (fun) (declare (type functional fun)) - (not (null (member (functional-kind fun) '(:external :top-level))))) + (not (null (member (functional-kind fun) '(:external :toplevel))))) ;;; If CONT's only use is a non-notinline global function reference, ;;; then return the referenced symbol, otherwise NIL. If NOTINLINE-OK @@ -1213,10 +1215,10 @@ (let ((leaf (ref-leaf use))) (if (and (global-var-p leaf) (eq (global-var-kind leaf) :global-function) - (or (not (defined-function-p leaf)) - (not (eq (defined-function-inlinep leaf) :notinline)) + (or (not (defined-fun-p leaf)) + (not (eq (defined-fun-inlinep leaf) :notinline)) notinline-ok)) - (leaf-name leaf) + (leaf-source-name leaf) nil)) nil)))