Escape analysis (full scope analysis proposal)

Robert Jacques sandford at jhu.edu
Mon Nov 3 08:36:04 PST 2008


On Mon, 03 Nov 2008 00:29:29 -0500, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:
> Robert Jacques wrote:
>> On Sun, 02 Nov 2008 10:12:46 -0500, Andrei Alexandrescu  
>> <SeeWebsiteForEmail at erdani.org> wrote:
>>
>>> * Make all ref parameters scoped by default. There will be impossible  
>>> for a function to escape the address of a ref parameter without a  
>>> cast. I haven't proved it to myself yet, but I believe that if  
>>> pointers are not used and with the amendments below regarding arrays  
>>> and delegates, this makes things entirely safe. In Walter's words, "it  
>>> buttons things pretty tight".
>>  Does this mean the whole shared/local/scope issue for classes is being  
>> sidestepped for now?
>
> What issue do you have in mind?

Right now, it's trivial for scope classes to escape due to automatic  
conversion to 'local'. And under the current shared/local scheme, one has  
to write multiple functions (one for each type combination).




More information about the Digitalmars-d mailing list