Hi,
This week I've been mostly reading & learning about name mangling from the language spec, official blog and the DMD's source.
I've implemented parsing an additional command line switch -mangle-suffix
to get my hands dirty with hacking on DMD codebase (see my mangle-switch branch). Admittedly, it wasn't exactly productive since I had summer school finals but I have a lot more time available in these upcoming weeks to compansate.
Next week I plan to experiment with mangling code to see where can I get in implementing the -mangle-suffix
semantics.
//app.d
module app;
int foo(int x)
{
return x * x;
}
Above code currently produces a _D3app3fooFiZi
symbol when compiled. The idea is to make it _D3bar3app3fooFiZi
if -mangle-suffix=app.d:bar
is passed.
I'm checking out https://wiki.dlang.org/DMD_Source_Guide for now but it seems somewhat outdated, hopefully the community here can endure me bombarding them with questions about DMD codebase.
Thanks.