pragma(mangle)

Andrej Mitrovic andrej.mitrovich at gmail.com
Sun Jun 12 12:21:04 PDT 2011


On 6/12/11, Nick Sabalausky <a at a.a> wrote:
> "Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message
> news:it2l1n$1alh$2 at digitalmars.com...
>> On 6/12/11 4:23 AM, Nick Sabalausky wrote:
>>> "Andrej Mitrovic"<andrej.mitrovich at gmail.com>  wrote in message
>>> news:mailman.828.1307833235.14074.digitalmars-d at puremagic.com...
>>>> On 6/12/11, Nick Sabalausky<a at a.a>  wrote:
>>>>> Are you working on updating DDMD to a newer DMD, or just simply trying
>>>>> to
>>>>> use the newer backend? If the former, then that's fantastic and I look
>>>>> forward to it.
>>>>
>>>> I'd like to really work on it properly (it would seem like an exciting
>>>> project to work on!), and update DDMD to be more D2-like, e.g. that
>>>> entire main.d module seems to re-implement argument passing via C APIs
>>>> just like DMD's C++ code, but this seems unnecessary to me? Replacing
>>>> that with getopt() would cut that module down to a tiny fragment of
>>>> its original size.
>>>>
>>>
>>> Actually, what I meant was this: DDMD is currently based on DMD 2.040.
>>> Ie,
>>> ATM, it's DMD 2.040 ported to D. You said you were trying to use the
>>> 2.053
>>> backend with DDMD, so I was just wondering if you were also updating DDMD
>>> frontend to be a D port of something newer than 2.040.
>>
>> I've always wondered what's the methodology of changing ddmd from diffs in
>>
>> dmd. I can only imagine it as a difficult manual process.
>>
>
> I've recently asked about that on the DDMD forum. No response yet, but it's
> not really a high-traffic forum anyway:
> http://www.dsource.org/forums/viewtopic.php?t=5946&sid=4ece5dbd7a2352d5de1f61b14452733f
>
> As I said there: "I would guess that right strategy would be to compare two
> versions of DMD (ie, the one DDMD is currently based on, and the one you're
> trying to update to), and then recreate the changes in DDMD."
>

If you take a diff of DMD's parse.c and DDMD's parser.d, you'll see
that they're almost identical. So yeah, I think what DDMD devs
probably do is take a diff of two DMD versions and then manually
upgrade DDMD's frontend to match. I don't think it's way too much work
(I'm just assuming though), simple C++ code tends to translate nicely
into D and I think DMD's C++ sources are nice and readable.


More information about the Digitalmars-d mailing list