Migrating dmd to D?

dennis luehring dl.soluz at gmx.net
Mon Mar 11 07:48:51 PDT 2013


Am 11.03.2013 15:20, schrieb Daniel Murphy:
> "Daniel Murphy" <yebblies at nospamgmail.com> wrote in message
> news:khfoa6$fm7$1 at digitalmars.com...
>> "Daniel Murphy" <yebblies at nospamgmail.com> wrote in message
>> news:kgumek$2tp4$1 at digitalmars.com...
>>> "Zach the Mystic" <reachBUTMINUSTHISzach at gOOGLYmail.com> wrote in message
>>> news:pabfuaorrjbljxzrglbv at forum.dlang.org...
>>>>>
>>>>> Something like this https://github.com/yebblies/magicport2 ?
>>>>
>>>> Yes! I need to look it over more thoroughly, but I couldn't ask for a
>>>> better beginning. Can I trust that you'll be a willing part of future
>>>> discussions on this matter, even if only to play Devil's Advocate?
>>>
>>> More like a full-blown attempt than a beginning.  I started this a long
>>> time ago.
>>>
>>> There are three parts to it:
>>> - c++ parser/d printer, with lots of cheating and special cases
>>> - patches to the c++ source
>>> - patched version of dmd to build the result (no error on variable
>>> shadowing etc)
>>>
>>> It produces a 70000 line d file which appears to get through 3/7ths of
>>> semantic1.  Root needs to be ported, and a cleaner interface to the
>>> backend is needed to compile the glue layer.
>>>
>>
>> Update: With the bulk of root converting or ported, and the glue layer
>> stubbed out, I can build dmd from the converted source then lex and parse
>> the source (+druntime headers) again.
>>
>> The highlight was the dynamically resized struct in root/stringtable.
>> Something went horribly wrong there.
>
> Update: I can now generate the source, then build a frontend from that, then
> process the frontend's source again with the built compiler.  It also works
> on the conversion tool, and pulls in a sizeable chunk of druntime and
> phobos.

do i get it right - you've converted the dmd C++ code with it?



More information about the Digitalmars-d mailing list