www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - split dmd frontend into separate project

reply Thomas Koch <thomas koch.ro> writes:
Hi,

while browsing the sources of gdc, ldc and dmd I noticed that gdc and ldc 
both include the verbatim frontend source code from dmd.

Wouldn't it make sense to split the free dmd frontend into a standalone 
project that could then easier be referenced also by gdc and ldc?

I'm also asking because I was surprised that debian also contains (a very 
old version of) ldc[1]. If one day we'd have proper d packages in Debian, it 
would surely be nice to have only one d frontend package instead of three 
times the same source code in different packages.

[1] http://packages.qa.debian.org/l/ldc.html

Regards, Thomas Koch
Nov 18 2012
next sibling parent reply Iain Buclaw <ibuclaw ubuntu.com> writes:
On 19 November 2012 07:24, Thomas Koch <thomas koch.ro> wrote:
 Hi,

 while browsing the sources of gdc, ldc and dmd I noticed that gdc and ldc
 both include the verbatim frontend source code from dmd.

 Wouldn't it make sense to split the free dmd frontend into a standalone
 project that could then easier be referenced also by gdc and ldc?

 I'm also asking because I was surprised that debian also contains (a very
 old version of) ldc[1]. If one day we'd have proper d packages in Debian, it
 would surely be nice to have only one d frontend package instead of three
 times the same source code in different packages.

 [1] http://packages.qa.debian.org/l/ldc.html

 Regards, Thomas Koch
Yes it would make sense - no it can't be done because gdc/ldc makes changes to their own copies of dfe. The solution would be to fix dfe so that multiple backends can use it. But that it not currently the case. Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Nov 19 2012
parent reply Jacob Carlborg <doob me.com> writes:
On 2012-11-19 15:46, Iain Buclaw wrote:

 Yes it would make sense - no it can't be done because gdc/ldc makes
 changes to their own copies of dfe.  The solution would be to fix dfe
 so that multiple backends can use it.  But that it not currently the
 case.
Wouldn't those changes be easier to make and maintain if the front end was a separate project, even if it can't be used unmodified. -- /Jacob Carlborg
Nov 19 2012
parent Thomas Koch <thomas koch.ro> writes:
Jacob Carlborg wrote:

 On 2012-11-19 15:46, Iain Buclaw wrote:
 
 Yes it would make sense - no it can't be done because gdc/ldc makes
 changes to their own copies of dfe.  The solution would be to fix dfe
 so that multiple backends can use it.  But that it not currently the
 case.
Wouldn't those changes be easier to make and maintain if the front end was a separate project, even if it can't be used unmodified.
From an outsiders view I'd believe that it would be much simpler to fork git branches for the dmd frontend versions of gdc and ldc and use the git machinery for merges. - But the developers must decide. I don't want to annoy them. Regards, Thomas
Nov 20 2012
prev sibling parent Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On 11/19/2012 08:24 AM, Thomas Koch wrote:
 while browsing the sources of gdc, ldc and dmd I noticed that gdc and ldc
 both include the verbatim frontend source code from dmd.

 Wouldn't it make sense to split the free dmd frontend into a standalone
 project that could then easier be referenced also by gdc and ldc?
I think Iain Buclaw is working on this, though the realization will probably come only after some other GDC priorities are addressed: http://forum.dlang.org/post/mailman.1565.1352137245.5162.d.gnu puremagic.com
Nov 19 2012