[prev in list] [next in list] [prev in thread] [next in thread]
List: sbcl-devel
Subject: Re: [Sbcl-devel] exporting merge-tail-calls from sb-ext,
From: "Nikodemus Siivola" <nikodemus () random-state ! net>
Date: 2008-03-13 21:14:25
Message-ID: 633d72b0803131414t5d57b162w30ce93820eba23a1 () mail ! gmail ! com
[Download RAW message or body]
On 3/13/08, Alexey Dejneka <adejneka@tochka.ru> wrote:
> How does it interact with INSERT-DEBUG-CATCH? What about
>
> (locally (declare (optimize debug))
> (defun foo (x)
> (if (check x)
> (surely-not-tail-call x)
> (locally
> (declare (optimize merge-tail-calls))
> (tail-call-p x)))))
Neither ends up as a tail-call under my mental model. Practically
speaking, if one wants the semantic guarantee to have a reasonable
meaning the declare has to be in the outermost lexical scope.
My thought was mostly to make it possible to write
(defmacro define-tco-fun (name lambda-list &body body)
`(locally (optimize merge-tail-calls)
(defun ,name ,lambda-list ,@body)))
in which case the MERGE-TAIL-CALLS declaration would trump things like
INSERT-DEBUG-CATCH.
Cheers,
-- Nikodemus
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sbcl-devel mailing list
Sbcl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic