Now that the dmd backend is in D...?
Jonathan Marler
johnnymarler at gmail.com
Thu Aug 1 03:03:29 UTC 2019
Now that the dmd backend is in D, are there plans to remove the
old C++ organization?
Today, the backend is split into backend headers and backend
sources, much like a C/C++ project. The backend sources are
compiled separately from DMD into a library, and the backend
headers are compiled with DMD in order to link to the precompiled
backend library.
You can see which files belong to which by looking at the
posix.mak file:
BACK_HDRS=$C/cc.d $C/cdef.d $C/cgcv.d $C/code.d $C/cv4.d $C/dt.d
$C/el.d $C/global.d \
$C/obj.d $C/oper.d $C/outbuf.d $C/rtlsym.d $C/code_x86.d
$C/iasm.d $C/codebuilder.d \
$C/ty.d $C/type.d $C/exh.d $C/mach.d $C/mscoff.d $C/dwarf.d
$C/dwarf2.d $C/xmm.d \
$C/dlist.d $C/melf.d $C/varstats.di $C/dt.d
BACK_DOBJS = bcomplex.o evalu8.o divcoeff.o dvec.o go.o gsroa.o
glocal.o gdag.o gother.o gflow.o \
out.o \
gloop.o compress.o cgelem.o cgcs.o ee.o cod4.o cod5.o nteh.o
blockopt.o mem.o cg.o cgreg.o \
dtype.o debugprint.o fp.o symbol.o elem.o dcode.o cgsched.o
cg87.o cgxmm.o cgcod.o cod1.o cod2.o \
cod3.o cv8.o dcgcv.o pdata.o util2.o var.o md5.o backconfig.o
ph2.o drtlsym.o dwarfeh.o ptrntab.o \
aarray.o dvarstats.o dwarfdbginf.o elfobj.o cgen.o os.o goh.o
barray.o cgcse.o elpicpie.o
However, now that it's all in D, is there a plan to remove the
backend headers? Then once that is done, would we remove all the
extern (C++) modifiers? I realize that the extern (C++)
modifiers cannot be removed until the backend headers are removed
because making everything extern (D) would cause the module name
to be used in the mangled symbol so the headers and sources would
no longer match.
So is there any reason to keep the separate headers/sources in
the DMD backend?
More information about the Digitalmars-d
mailing list