Escape analysis

Bill Baxter wbaxter at gmail.com
Tue Oct 28 12:07:17 PDT 2008


On Wed, Oct 29, 2008 at 1:04 AM, Sean Kelly <sean at invisibleduck.org> wrote:
> Andrei Alexandrescu wrote:
>>
>> Escape analysis is a tricky business. My opinion is that we either take
>> care of it properly or blissfully ignore the entire issue. That opinion may
>> disagree a bit with Walter's, who'd prefer a quick patch for delegates so he
>> returns to threading. I think if we opt for a quick patch now, it'll turn to
>> gangrene later. Among other things, it will hurt the threading
>> infrastructure it was supposed to give precedence to.
>
> Like const, I'd rather have no solution than a bad solution insofar as
> escape analysis is concerned.

The only serious problem people have right now is that closures are
allocated automatically when they may not need to be.

Making closure allocation manual for now seems like the most
future-compatible way to fix things.  In some nebulous future, the
manual allocation could become unnecessary, or it could become
compiler-checked, but it seems to me that for now just making it
manual does the least harm and lets Walter get back to work on other
things.

--bb



More information about the Digitalmars-d mailing list