any tool to at least partially convert C++ to D (htod for source

Brad Roberts braddr at bellevue.puremagic.com
Wed Mar 10 17:21:54 PST 2010


On Wed, 10 Mar 2010, Walter Bright wrote:

> Ellery Newcomer wrote:
> > I guess transitivity would require you to check the declaration of each
> > local symbol that gets called in A's static constructor,
> 
> Everything referenced by everything referenced, etc., in the constructor, all
> the way.
> 
> It's not even possible to do in full generality, because the D compiler won't
> have the source to everything.

In the D spirit of things, ie, stay conservative:

If you can prove that the closure of code that the static constructor 
touches doesn't escape the file, which you can do fairly easily and you 
can guarantee that you've got all the code for that check, then the ctor 
could be flagged as self-contained and take itself out of the running for 
loop detection.

Later, potentially more aggressive logic could be written, time and/or 
volunteers permitting.

Later,
Brad



More information about the Digitalmars-d mailing list