[r6rs-discuss] Re: [Formal] Allow compilers to reject obvious violations

From: <bear>
Date: Sun Mar 11 14:26:51 2007

On Sun, 11 Mar 2007, John Cowan wrote:

>bear scripsit:
>
>> ;; implementation of assert and continuation? are left as
>> ;; an exercise for the reader.
>
>It's not obvious to me that there's any principled way to define
>"continuation?", unless your implementation of call/cc is polite
>enough to tag escape procedures for you. In a CPS compiler they
>are interchangeable with other procedures.

This is exactly true. It's useful for code-analysis purposes
done by later parts of the compiler to 'tag' functions that
do not return to the current execution point. Such tagging
allows, for example, principled and optimized use of the hardware
stack vs. the heap for allocation of invocation frames, where
CPS might not keep the information necessary to do that
optimization very well.

                                Bear
Received on Sun Mar 11 2007 - 14:26:37 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC