Jump to page: 1 2 3
Thread overview
Callout to DMD hackers
Mar 08, 2014
Andrej Mitrovic
Mar 08, 2014
Dicebot
Mar 08, 2014
Suliman
Mar 08, 2014
Andrej Mitrovic
Mar 08, 2014
Mike Parker
Mar 08, 2014
Phillip Larkson
Mar 08, 2014
Asman01
Mar 08, 2014
Andrej Mitrovic
Mar 08, 2014
Vladimir Panteleev
Mar 08, 2014
Andrej Mitrovic
Mar 08, 2014
Asman01
Mar 08, 2014
Timon Gehr
Mar 08, 2014
Andrej Mitrovic
Mar 12, 2014
Asman01
Mar 12, 2014
Brad Anderson
Mar 12, 2014
Russel Winder
Mar 12, 2014
Rainer Schuetze
Mar 08, 2014
Asman01
Mar 08, 2014
Andrej Mitrovic
Mar 08, 2014
Asman01
Mar 12, 2014
Asman01
Mar 12, 2014
Nick Sabalausky
Mar 12, 2014
Nick Sabalausky
March 08, 2014
Recently Vladimir Panteleev has ported the DMD Source Guide from the old wiki to the new one[1], and updated it with up-to-date information. I've added a "DMD Hacking Tips & Tricks" section[2], which should help people new to the codebase to start hacking on DMD-FE. I've only added a few tips that I know of.

If you regularly hack on DMD and know some good tips for new DMD developers, please either post those tips in this thread and we'll add them to the wiki, or you can directly add them to the wiki. Everybody benefits from sharing knowledge about compiler internals. For example, GCC has pretty extensive documentation about its internals[3].

[1] : http://wiki.dlang.org/DMD_Source_Guide
[2] : http://wiki.dlang.org/DMD_Source_Guide#DMD_Hacking_Tips_.26_Tricks
[3] : http://gcc.gnu.org/onlinedocs/gccint/
March 08, 2014
Thanks both to you and Vladimir for your effort! Some of those tips could have saved me a lot of time if read earlier :)
March 08, 2014
Few years ago I had read that Walter had add some print instruction to Phobos, that allow to do print without importing std.stdio; It was needed to debugging phobos.

Maybe it's not proper thread, but maybe someone of D hackers remember it, because I can't remember how it was done.
March 08, 2014
Thanks for the information! I plan on playing around with the compiler soon, and the more information the merrier.
March 08, 2014
On 3/8/14, Suliman <evermind@live.ru> wrote:
> Few years ago I had read that Walter had add some print instruction to Phobos, that allow to do print without importing std.stdio; It was needed to debugging phobos.
>
> Maybe it's not proper thread, but maybe someone of D hackers remember it, because I can't remember how it was done.

Not sure, but you can always do the following to e.g. avoid doing any imports:

-----
extern(C) int printf(in char* format, ...);

void main()
{
    printf("hello\n");
}
-----
March 08, 2014
On 3/8/2014 11:21 PM, Suliman wrote:
> Few years ago I had read that Walter had add some print instruction to
> Phobos, that allow to do print without importing std.stdio; It was
> needed to debugging phobos.
>
> Maybe it's not proper thread, but maybe someone of D hackers remember
> it, because I can't remember how it was done.

IIRC C's printf was declared in object.d. But that was back in the early D1 days.
March 08, 2014
On Saturday, 8 March 2014 at 13:25:32 UTC, Andrej Mitrovic wrote:
> Recently Vladimir Panteleev has ported the DMD Source Guide from the old wiki to the new one[1], and updated it with up-to-date information. I've added a "DMD Hacking Tips & Tricks" section[2], which should help people new to the codebase to start hacking on DMD-FE. I've only added a few tips that I know of.
>
> If you regularly hack on DMD and know some good tips for new DMD developers, please either post those tips in this thread and we'll add them to the wiki, or you can directly add them to the wiki. Everybody benefits from sharing knowledge about compiler internals. For example, GCC has pretty extensive documentation about its internals[3].
>
> [1] : http://wiki.dlang.org/DMD_Source_Guide
> [2] : http://wiki.dlang.org/DMD_Source_Guide#DMD_Hacking_Tips_.26_Tricks
> [3] : http://gcc.gnu.org/onlinedocs/gccint/

Awesome! Thanks for the information. This part of article[1] was funny to add Walter as one of the people seem to have understood the DMD IR. Was not DMD IR implemented by Walter? also, me too. I don't got how DMD IR actually works or what is like.

I don't understand this part "converted to UTF-8 when necessary" in [2].
What does it mean? I don't know much about UTF-8, just basics, unlike as should do, but shouldn't convert everything to UTF-8 and just handle the source code as UTF-8?


[1]: I've been looking at trying to hook the DMD frontend up to LLVM (www.llvm.org), but I've been having some trouble. The LLVM IR (Intermediate Representation) is very well documented, but I'm having a rough time figuring out how DMD holds its IR. Since at least three people (David, Ben, and Walter) seem to have understand, I thought I'd ask for guidance.
March 08, 2014
On Saturday, 8 March 2014 at 13:25:32 UTC, Andrej Mitrovic wrote:
> Recently Vladimir Panteleev has ported the DMD Source Guide from the old wiki to the new one[1], and updated it with up-to-date information. I've added a "DMD Hacking Tips & Tricks" section[2], which should help people new to the codebase to start hacking on DMD-FE. I've only added a few tips that I know of.
>
> If you regularly hack on DMD and know some good tips for new DMD developers, please either post those tips in this thread and we'll add them to the wiki, or you can directly add them to the wiki. Everybody benefits from sharing knowledge about compiler internals. For example, GCC has pretty extensive documentation about its internals[3].
>
> [1] : http://wiki.dlang.org/DMD_Source_Guide
> [2] : http://wiki.dlang.org/DMD_Source_Guide#DMD_Hacking_Tips_.26_Tricks
> [3] : http://gcc.gnu.org/onlinedocs/gccint/

Also, where is root/async.c actually used?
March 08, 2014
On 3/8/14, Asman01 <jckj33@gmail.com> wrote:
> [1]: I've been looking at trying to hook the DMD frontend up to
> LLVM (www.llvm.org)

Uhm, haven't you heard of the LDC project? http://wiki.dlang.org/LDC
March 08, 2014
On 3/8/14, Asman01 <jckj33@gmail.com> wrote:
> Also, where is root/async.c actually used?

In mars.c, take a look at the "#if ASYNCREAD" section.
« First   ‹ Prev
1 2 3