[SAoC 2021] Solve Dependency Hell: Milestone 1, Week 1
Ahmet Sait
nightmarex1337 at hotmail.com
Fri Sep 24 21:35:39 UTC 2021
[Milestone
Overview](https://gist.github.com/ahmetsait/10925a246b0d412a698e927658f3f363#milestone-overview)
Hi,
This week I've been mostly reading & learning about name mangling
from the [language
spec](https://dlang.org/spec/abi.html#name_mangling), [official
blog](https://dlang.org/blog/2017/12/20/ds-newfangled-name-mangling/) and the [DMD's source](https://github.com/dlang/dmd/blob/master/src/dmd/dmangle.d).
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](https://github.com/ahmetsait/dmd/tree/mangle-suffix)).
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.
```d
//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.
More information about the Digitalmars-d
mailing list