Shared with no type in Druntime.

Jacob Carlborg doob at me.com
Tue May 1 04:11:16 PDT 2012


On 2012-04-30 20:21, Adam Wilson wrote:

> I agree, however, DMD has not yet performed it's semantic analysis at
> the time of DI generation so I have no clue what the type is when the
> files are generated. Theoretically that could be changed but such a
> decision is WAY above my paygrade and would probably require significant
> rewrites of the DI generation code, as in tearing it down and starting
> over. My understanding is that the reason for this is that the semantic
> analysis does significant rewriting of the AST and would probably
> drastically alter the look and even function of the output code...
>
> Also, there is this comment in the code to start the DI generation:
> /* Generate 'header' import files.
> * Since 'header' import files must be independent of command
> * line switches and what else is imported, they are generated
> * before any semantic analysis.
> */
> My guess is that that has to do with the way the command-line switches
> impact the semantic analysis.
>

Ok, I didn't know about this. Regardless I think this needs to be solved 
in the end. Perhaps a new semantic analysis phase that is only run when 
generating DI files. But that would probably be quite hard.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list