X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgtn.lisp;h=3d6c0c857974250e7b65e4d8ed2f985ffb3b5c5d;hb=85c1cf858999279da6f4f470c4f3c582ad9f2dbf;hp=4a3352f6ef173aba8ef0e8ceae2b16e8c7ec0e9b;hpb=0118ad1a3d67833723c6c237e99dbc55ec9f02ca;p=sbcl.git diff --git a/src/compiler/gtn.lisp b/src/compiler/gtn.lisp index 4a3352f..3d6c0c8 100644 --- a/src/compiler/gtn.lisp +++ b/src/compiler/gtn.lisp @@ -84,12 +84,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))) @@ -116,12 +115,11 @@ (block punt (dolist (fun funs t) (dolist (ref (leaf-refs fun)) - (let* ((cont (node-cont ref)) - (dest (continuation-dest cont))) - (when (and dest + (let* ((lvar (node-lvar ref)) + (dest (and lvar (lvar-dest lvar)))) + (when (and (basic-combination-p dest) (not (node-tail-p dest)) - (basic-combination-p dest) - (eq (basic-combination-fun dest) cont) + (eq (basic-combination-fun dest) lvar) (eq (basic-combination-kind dest) :local)) (return-from punt nil))))))))) @@ -137,7 +135,7 @@ inhibit-warnings)) (dolist (fun funs (let ((*compiler-error-context* (lambda-bind (first funs)))) - (compiler-note + (compiler-notify "Return value count mismatch prevents known return ~ from these functions:~ ~{~% ~A~}" @@ -150,7 +148,7 @@ (declare (ignore ignore)) (when (eq count :unknown) (let ((*compiler-error-context* (lambda-bind fun))) - (compiler-note + (compiler-notify "Return type not fixed values, so can't use known return ~ convention:~% ~S" (type-specifier rtype)))