GC for pure functions -- implementation ideas

Kagamin spam at here.lot
Mon Apr 18 06:34:07 PDT 2011


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.


More information about the Digitalmars-d mailing list