Request for Review: DI Generation Improvements

Adam Wilson flyboynw at gmail.com
Mon May 14 17:36:49 PDT 2012


On Mon, 14 May 2012 17:02:23 -0700, Alex Rønne Petersen
<xtzgzorex at gmail.com> wrote:

> On 15-05-2012 01:50, Adam Wilson wrote:
>> I am formally requesting review of the two pull requests that make up my
>> DI Generation Improvements patch.
>>
>> The first pull is against the DRuntime and modifies the makefiles such
>> some files in the DRT are not generated as DI files but copied from the  
>> D
>> source files directly into the DI file. This solves a problem where
>> certain portions of Phobos the CTFE into the DRT cause a build failure
>> when using the new DI generation. The files that are copied instead of
>> generated are all of core and core.stdc, EXCEPT core.atomic, core.cpuid,
>> core.demangle, and core.thread.
>>
>> Pull DRuntime/210:
>> https://github.com/D-Programming-Language/druntime/pull/210
>>
>> The second pull is against DMD itself and consists of the actual changes
>> to the current DI generation. The improvements consist of removing all
>> function implementations, EXCEPT for those of template and auto-return
>> functions, and improved indenting. These changes represent the closest I
>> can come to agreement from the community as to the proper contents of a  
>> DI
>> file. This patch fixes the biggest problems of DI generation and  
>> provides
>> a baseline for future improvements to DI generation. Currently being
>> discussed are modifications to include a limited form of semantic  
>> analysis
>> of the source code during DI generation to improve the usefulness of the
>> output as well as the addition of an attribute to direct DI generation  
>> to
>> include a function implementation for CTFE or inlining purposes.
>>
>> Pull DMD/945: https://github.com/D-Programming-Language/dmd/pull/945
>>
>> I welcome all comments on these pulls and it is my goal to see them  
>> merged
>> into DMD 2.060.
>>
>
> I would suggest excluding core.[atomic,cpuid,demangle] from DI  
> generation, too, and just copy them. I don't see any reason to do DI  
> generation for them.

This can be easily changed. Does anyone see any potential problems with
making this change?

-- 
Adam Wilson
IRC: LightBender
Project Coordinator
The Horizon Project
http://www.thehorizonproject.org/


More information about the Digitalmars-d mailing list