getting to know dmd and druntime
maarten van damme
maartenvd1994 at gmail.com
Sun Jul 22 02:26:54 PDT 2012
Right now I'm a bit confused. I assume that the garbage collector and
some other parts from druntime need startup code. But what gets run
first is my main method in the d file I compile. Does this mean that
the first call to something in druntime calls that startup code? If
not, what does get ran first? how can I intercept this and run
something else?
When compiling without druntime the program will crash when
initializing an object. How can I implement my own limited druntime
that provides it's own version of the new expression?
Druntime contains it's own trimmed down garbage collector that is most
likely not very efficient. How can I use that one instead of the other
more advanced one?
Is the garbage collector embedded in druntime or is it somehow linked
at compile time from a c-source (I found gc.c in the dmd source).
What else gets linked? What exactly does dmd do? Which parts of
druntime does it rely on?
I really want to get to know that part of D a bit better. Is this
somewhere documented?
Ideally I want to compile a d file without druntime (and thus with a
very limited subset of D). Then, I want to start writing my own
version of druntime (that is, providing the needed methods to get
something more advanced working but stubbing everything out).
I came accross this blog
https://www.semitwist.com/articles/article/view/d-on-gba-nds-progress-thanks-to-oopman
but the link to the documentation seems to not be working (and judging
by the date it will most likely be about D1).
To sum everything up : are the inner workings of dmd-druntime
somewhere documented?
More information about the Digitalmars-d
mailing list