X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Ftn.lisp;h=3409a638c0b0f5ffafee7d8a5ead7d7cae6314de;hb=b6aa15328871678a3475e82c150b251dffb49ba1;hp=042d247a8a4f2223379fd9de7c728f06b6d9f324;hpb=d147d512602d761a2dcdfded506dd1a8f9a140dc;p=sbcl.git diff --git a/src/compiler/tn.lisp b/src/compiler/tn.lisp index 042d247..3409a63 100644 --- a/src/compiler/tn.lisp +++ b/src/compiler/tn.lisp @@ -64,14 +64,14 @@ (case (tn-kind tn) (:environment (clear-live tn - #'ir2-environment-live-tns - #'(setf ir2-environment-live-tns))) + #'ir2-physenv-live-tns + #'(setf ir2-physenv-live-tns))) (:debug-environment (clear-live tn - #'ir2-environment-debug-live-tns - #'(setf ir2-environment-debug-live-tns))))) + #'ir2-physenv-debug-live-tns + #'(setf ir2-physenv-debug-live-tns))))) (clear-live (tn getter setter) - (let ((env (environment-info (tn-environment tn)))) + (let ((env (physenv-info (tn-physenv tn)))) (funcall setter (delete tn (funcall getter env)) env)))) (declare (inline used-p delete-some delete-1 clear-live)) (delete-some #'ir2-component-alias-tns @@ -136,23 +136,24 @@ (push-in tn-next res (ir2-component-restricted-tns component)) res)) -;;; Make TN be live throughout environment. Return TN. In the DEBUG case, -;;; the TN is treated normally in blocks in the environment which reference the -;;; TN, allowing targeting to/from the TN. This results in move efficient -;;; code, but may result in the TN sometimes not being live when you want it. -(defun environment-live-tn (tn env) - (declare (type tn tn) (type environment env)) +;;; Make TN be live throughout environment. Return TN. In the DEBUG +;;; case, the TN is treated normally in blocks in the environment +;;; which reference the TN, allowing targeting to/from the TN. This +;;; results in move efficient code, but may result in the TN sometimes +;;; not being live when you want it. +(defun physenv-live-tn (tn env) + (declare (type tn tn) (type physenv env)) (aver (eq (tn-kind tn) :normal)) (setf (tn-kind tn) :environment) - (setf (tn-environment tn) env) - (push tn (ir2-environment-live-tns (environment-info env))) + (setf (tn-physenv tn) env) + (push tn (ir2-physenv-live-tns (physenv-info env))) tn) -(defun environment-debug-live-tn (tn env) - (declare (type tn tn) (type environment env)) +(defun physenv-debug-live-tn (tn env) + (declare (type tn tn) (type physenv env)) (aver (eq (tn-kind tn) :normal)) (setf (tn-kind tn) :debug-environment) - (setf (tn-environment tn) env) - (push tn (ir2-environment-debug-live-tns (environment-info env))) + (setf (tn-physenv tn) env) + (push tn (ir2-physenv-debug-live-tns (physenv-info env))) tn) ;;; Make TN be live throughout the current component. Return TN. @@ -297,10 +298,11 @@ ;;;; miscellaneous utilities -;;; Emit a move-like template determined at run-time, with X as the argument -;;; and Y as the result. Useful for move, coerce and type-check templates. If -;;; supplied, then insert before VOP, otherwise insert at then end of the -;;; block. Returns the last VOP inserted. +;;; Emit a move-like template determined at run-time, with X as the +;;; argument and Y as the result. Useful for move, coerce and +;;; type-check templates. If supplied, then insert before VOP, +;;; otherwise insert at then end of the block. Returns the last VOP +;;; inserted. (defun emit-move-template (node block template x y &optional before) (declare (type node node) (type ir2-block block) (type template template) (type tn x y))