X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fcompiler%2Fltn.lisp;h=9eaa71fdedeb10a0190c8e1513611a0f94f4f704;hb=862491df05edbbfa9a5fe145d334f202e9e3758c;hp=9dce8b504e9f0aaf02972994b192c3f80152ec5e;hpb=8902b8b6bd2e9285749dd39d313b33b6c69c5213;p=sbcl.git diff --git a/src/compiler/ltn.lisp b/src/compiler/ltn.lisp index 9dce8b5..9eaa71f 100644 --- a/src/compiler/ltn.lisp +++ b/src/compiler/ltn.lisp @@ -225,10 +225,14 @@ ;;; specified primitive TYPES. (defun annotate-fixed-values-lvar (lvar types) (declare (type lvar lvar) (list types)) - (aver (not (lvar-dynamic-extent lvar))) ; XXX - (let ((res (make-ir2-lvar nil))) - (setf (ir2-lvar-locs res) (mapcar #'make-normal-tn types)) - (setf (lvar-info lvar) res)) + (let ((info (make-ir2-lvar nil))) + (setf (ir2-lvar-locs info) (mapcar #'make-normal-tn types)) + (setf (lvar-info lvar) info) + (when (lvar-dynamic-extent lvar) + (aver (proper-list-of-length-p types 1)) + #!+stack-grows-downward-not-upward + (setf (ir2-lvar-stack-pointer info) + (make-stack-pointer-tn)))) (ltn-annotate-casts lvar) (values)) @@ -402,6 +406,17 @@ ltn-policy ; a hack to effectively (DECLARE (IGNORE LTN-POLICY)) (setf (basic-combination-info node) :funny) (setf (node-tail-p node) nil)) + +;;; Make sure that arguments of magic functions are not annotated. +;;; (Otherwise the compiler may dump its internal structures as +;;; constants :-() +(defoptimizer (%pop-values ltn-annotate) ((%lvar) node ltn-policy) + %lvar node ltn-policy) +(defoptimizer (%nip-values ltn-annotate) ((last-nipped last-preserved + &rest moved) + node ltn-policy) + last-nipped last-preserved moved node ltn-policy) + ;;;; known call annotation