Jump to page: 1 2 3
Thread overview
Request for Review: DI Generation Improvements
May 14, 2012
Adam Wilson
May 15, 2012
Tyro[17]
May 15, 2012
Tyro[17]
May 15, 2012
Adam Wilson
May 15, 2012
Jonathan M Davis
May 15, 2012
Jonathan M Davis
May 15, 2012
Adam Wilson
May 15, 2012
Jonathan M Davis
May 15, 2012
Adam Wilson
May 15, 2012
kenji hara
May 15, 2012
Adam Wilson
May 16, 2012
Adam Wilson
May 16, 2012
Jonathan M Davis
May 16, 2012
Adam Wilson
May 17, 2012
Adam Wilson
May 21, 2012
dawg
May 21, 2012
Adam Wilson
Jun 11, 2012
timotheecour
Jun 11, 2012
Timon Gehr
Jun 12, 2012
Adam Wilson
Jun 12, 2012
timotheecour
Jun 12, 2012
Adam Wilson
May 14, 2012
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.

-- 
Adam Wilson
IRC: LightBender
Project Coordinator
The Horizon Project
http://www.thehorizonproject.org/
May 15, 2012
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.

-- 
- Alex
May 15, 2012
On Tuesday, 15 May 2012 at 00:02:23 UTC, Alex Rønne Petersen 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.
>>
[snip]
>
> 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.

Reread the last line of the paragraph starting with "The first pull". Your concern is already addressed.
May 15, 2012
On 15-05-2012 02:20, Tyro[17] wrote:
> On Tuesday, 15 May 2012 at 00:02:23 UTC, Alex Rønne Petersen 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.
>>>
> [snip]
>>
>> 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.
>
> Reread the last line of the paragraph starting with "The first pull".
> Your concern is already addressed.

No, you got it backwards. Before my comment, his pull request still caused DI generation to happen for the modules I mentioned, and I suggested simply copying them like the rest.

-- 
- Alex
May 15, 2012
On Mon, 14 May 2012 17:02:23 -0700, Alex Rønne Petersen
<xtzgzorex@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/
May 15, 2012
On Monday, May 14, 2012 17:36:49 Adam Wilson wrote:
> This can be easily changed. Does anyone see any potential problems with making this change?

The only modules in druntime that I am aware of where there would be actual problems if their .d files were used instead of .di files would be those which already have hand-maintained .di files (core.thread and object are the only two that I'm aware of, though there might be others). Beyond that, core.rt definitely should be using .di files, but AFAIK, it wouldn't actually hurt anything beyond compilation times for them to be .d files, and AFAIK, all of the rest of druntime can be .d files without causing any problems. Most of them just hold C declarations anyway.

- Jonathan M Davis
May 15, 2012
On 15-05-2012 02:59, Jonathan M Davis wrote:
> On Monday, May 14, 2012 17:36:49 Adam Wilson wrote:
>> This can be easily changed. Does anyone see any potential problems with
>> making this change?
>
> The only modules in druntime that I am aware of where there would be actual
> problems if their .d files were used instead of .di files would be those which
> already have hand-maintained .di files (core.thread and object are the only two
> that I'm aware of, though there might be others). Beyond that, core.rt
> definitely should be using .di files, but AFAIK, it wouldn't actually hurt
> anything beyond compilation times for them to be .d files, and AFAIK, all of
> the rest of druntime can be .d files without causing any problems. Most of them
> just hold C declarations anyway.
>
> - Jonathan M Davis

core.rt? Do you mean rt.*? Those are completely and entirely private anyway.

-- 
- Alex
May 15, 2012
On Tuesday, 15 May 2012 at 00:25:15 UTC, Alex Rønne Petersen
wrote:
> On 15-05-2012 02:20, Tyro[17] wrote:
>> On Tuesday, 15 May 2012 at 00:02:23 UTC, Alex Rønne Petersen
[snip]
>>> 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.
>>
>> Reread the last line of the paragraph starting with "The first pull".
>> Your concern is already addressed.
>
> No, you got it backwards. Before my comment, his pull request still caused DI generation to happen for the modules I mentioned, and I suggested simply copying them like the rest.

I see. Pardon the noise.

May 15, 2012
On Tuesday, May 15, 2012 03:20:24 Alex Rønne Petersen wrote:
> On 15-05-2012 02:59, Jonathan M Davis wrote:
> > On Monday, May 14, 2012 17:36:49 Adam Wilson wrote:
> >> This can be easily changed. Does anyone see any potential problems with making this change?
> > 
> > The only modules in druntime that I am aware of where there would be
> > actual
> > problems if their .d files were used instead of .di files would be those
> > which already have hand-maintained .di files (core.thread and object are
> > the only two that I'm aware of, though there might be others). Beyond
> > that, core.rt definitely should be using .di files, but AFAIK, it
> > wouldn't actually hurt anything beyond compilation times for them to be
> > .d files, and AFAIK, all of the rest of druntime can be .d files without
> > causing any problems. Most of them just hold C declarations anyway.
> > 
> > - Jonathan M Davis
> 
> core.rt? Do you mean rt.*? Those are completely and entirely private anyway.

Probably. I didn't look at the source tree before posting. My point was that the rt stuff shouldn't be provided as .d files (however they may be organized), whereas pretty much everything other than core.thread and object should be fine as .d files AFAIK.

- Jonathan M Davis
May 15, 2012
On Mon, 14 May 2012 16:50:24 -0700, Adam Wilson <flyboynw@gmail.com> 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 have updated the make files so that only core.thread and core.sync.* are run through DI generation. ALL other core.* modules are copied into the import directory now.

Git wrecked my branch on a rebase so I had to recreate the pull.
Pull DRuntime/218: https://github.com/D-Programming-Language/druntime/pull/218

-- 
Adam Wilson
IRC: LightBender
Project Coordinator
The Horizon Project
http://www.thehorizonproject.org/
« First   ‹ Prev
1 2 3