X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fir1util.lisp;h=95c7f2f4e8ce3c5e77a9fc1c943c4462179ef8b5;hb=012fbee7176df4472ef4add1a7df558d762bc4f6;hp=31f8748e3afd5ebc6c3855b4ae2f33220e0a8047;hpb=4f7211e1d005696dcd29d8322fa531992ea8fed4;p=sbcl.git diff --git a/src/compiler/ir1util.lisp b/src/compiler/ir1util.lisp index 31f8748..95c7f2f 100644 --- a/src/compiler/ir1util.lisp +++ b/src/compiler/ir1util.lisp @@ -230,9 +230,10 @@ ;;;; miscellaneous shorthand functions -;;; Return the home (i.e. enclosing non-let) lambda for Node. Since the -;;; LEXENV-LAMBDA may be deleted, we must chain up the LAMBDA-CALL-LEXENV -;;; thread until we find a lambda that isn't deleted, and then return its home. +;;; Return the home (i.e. enclosing non-LET) CLAMBDA for NODE. Since +;;; the LEXENV-LAMBDA may be deleted, we must chain up the +;;; LAMBDA-CALL-LEXENV thread until we find a CLAMBDA that isn't +;;; deleted, and then return its home. (declaim (maybe-inline node-home-lambda)) (defun node-home-lambda (node) (declare (type node node)) @@ -244,14 +245,14 @@ (return fun)))) #!-sb-fluid (declaim (inline node-block node-tlf-number)) -(declaim (maybe-inline node-environment)) +(declaim (maybe-inline node-physenv)) (defun node-block (node) (declare (type node node)) (the cblock (continuation-block (node-prev node)))) -(defun node-environment (node) +(defun node-physenv (node) (declare (type node node)) #!-sb-fluid (declare (inline node-home-lambda)) - (the environment (lambda-environment (node-home-lambda node)))) + (the physenv (lambda-physenv (node-home-lambda node)))) ;;; Return the enclosing cleanup for environment of the first or last node ;;; in BLOCK. @@ -268,11 +269,11 @@ #!-sb-fluid (declare (inline node-home-lambda)) (node-home-lambda (block-last block))) -;;; Return the IR1 environment for BLOCK. -(defun block-environment (block) +;;; Return the IR1 physical environment for BLOCK. +(defun block-physenv (block) (declare (type cblock block)) #!-sb-fluid (declare (inline node-home-lambda)) - (lambda-environment (node-home-lambda (block-last block)))) + (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. @@ -1086,7 +1087,7 @@ (unless (combination-p inside) (give-up-ir1-transform)) (let ((inside-fun (combination-fun inside))) - (unless (eq (continuation-function-name inside-fun) fun) + (unless (eq (continuation-fun-name inside-fun) fun) (give-up-ir1-transform)) (let ((inside-args (combination-args inside))) (unless (= (length inside-args) num-args) @@ -1118,7 +1119,7 @@ (delete-ref ref) (setf (ref-leaf ref) leaf) (let ((ltype (leaf-type leaf))) - (if (function-type-p ltype) + (if (fun-type-p ltype) (setf (node-derived-type ref) ltype) (derive-node-type ref ltype))) (reoptimize-continuation (node-cont ref))) @@ -1162,7 +1163,7 @@ (defun find-nlx-info (entry cont) (declare (type entry entry) (type continuation cont)) (let ((entry-cleanup (entry-cleanup entry))) - (dolist (nlx (environment-nlx-info (node-environment entry)) nil) + (dolist (nlx (physenv-nlx-info (node-physenv entry)) nil) (when (and (eq (nlx-info-continuation nlx) cont) (eq (nlx-info-cleanup nlx) entry-cleanup)) (return nlx))))) @@ -1205,15 +1206,15 @@ ;;; If CONT's only use is a non-notinline global function reference, ;;; then return the referenced symbol, otherwise NIL. If NOTINLINE-OK ;;; is true, then we don't care if the leaf is NOTINLINE. -(defun continuation-function-name (cont &optional notinline-ok) +(defun continuation-fun-name (cont &optional notinline-ok) (declare (type continuation cont)) (let ((use (continuation-use cont))) (if (ref-p use) (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) nil))