GC for pure functions -- implementation ideas

Steven Schveighoffer schveiguy at yahoo.com
Mon Apr 18 06:40:47 PDT 2011


On Mon, 18 Apr 2011 09:34:07 -0400, Kagamin <spam at here.lot> wrote:

> Steven Schveighoffer Wrote:
>
>> Full escape analysis requires a non-stanard object format and a
>> non-standard linker.  Simply because, escape analysis must be a
>> compiler-added attribute, and the linker has to understand that.  We can
>> get away with certain things reusing the C linker by doing things like
>> name mangling, but escape analysis must add far more annotations
>> (essentially tell how parameters and return values are linked).
>
> Why support from linker? Even .net uses plain old COFF, it just stores  
> metadata in a separate section. Escape analysis is a compile-time job  
> for the compiler, so this metadata can be simply ignored and discarded  
> by the linker. For the same reason, this metadata can be stored in any  
> place, even in a separate file.

Wouldn't the linker have to verify that the escapes are valid when linking  
objects together?  I admit I don't know much about the object format and  
linking process, but I assumed that the linker had to be involved in  
enforcement of escape analysis.

Does the .NET linker ignore the metadata?

-Steve


More information about the Digitalmars-d mailing list