X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgtn.lisp;h=c1fb1c72e59ef4763f3461fe35012ca300f7048b;hb=2d996b6c1f64a2a8f7515629bba134da0d0f0d32;hp=a5537f14c630cd16d015d72e8e27047cc2d3a7bf;hpb=57e21c4b62e8c1a1ee7ef59ed2abb0c864fb06bc;p=sbcl.git diff --git a/src/compiler/gtn.lisp b/src/compiler/gtn.lisp index a5537f1..c1fb1c7 100644 --- a/src/compiler/gtn.lisp +++ b/src/compiler/gtn.lisp @@ -68,7 +68,8 @@ (if (lambda-var-indirect thing) *backend-t-primitive-type* (primitive-type (leaf-type thing)))) - (nlx-info *backend-t-primitive-type*)))) + (nlx-info *backend-t-primitive-type*) + (clambda *backend-t-primitive-type*)))) (push (cons thing (make-normal-tn ptype)) reversed-ir2-physenv-alist))) @@ -84,12 +85,11 @@ (values)) -;;; Return true if FUN's result continuation is used in a -;;; tail-recursive full call. We only consider explicit :FULL calls. -;;; It is assumed that known calls are never part of a tail-recursive -;;; loop, so we don't need to enforce tail-recursion. In any case, we -;;; don't know which known calls will actually be full calls until -;;; after LTN. +;;; Return true if FUN's result is used in a tail-recursive full +;;; call. We only consider explicit :FULL calls. It is assumed that +;;; known calls are never part of a tail-recursive loop, so we don't +;;; need to enforce tail-recursion. In any case, we don't know which +;;; known calls will actually be full calls until after LTN. (defun has-full-call-use (fun) (declare (type clambda fun)) (let ((return (lambda-return fun))) @@ -138,8 +138,8 @@ (let ((*compiler-error-context* (lambda-bind (first funs)))) (compiler-notify "Return value count mismatch prevents known return ~ - from these functions:~ - ~{~% ~A~}" + from these functions:~ + ~{~% ~A~}" (mapcar #'leaf-source-name (remove-if-not #'leaf-has-source-name-p funs))))) (let ((ret (lambda-return fun))) @@ -151,7 +151,7 @@ (let ((*compiler-error-context* (lambda-bind fun))) (compiler-notify "Return type not fixed values, so can't use known return ~ - convention:~% ~S" + convention:~% ~S" (type-specifier rtype))) (return))))))))) (values)) @@ -210,6 +210,8 @@ (make-ir2-nlx-info :home (when (member (cleanup-kind (nlx-info-cleanup nlx)) '(:block :tagbody)) - (make-normal-tn *backend-t-primitive-type*)) + (if (nlx-info-safe-p nlx) + (make-normal-tn *backend-t-primitive-type*) + (make-stack-pointer-tn))) :save-sp (make-nlx-sp-tn physenv))))) (values))