public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 02/14] Add D frontend (GDC) implementation.
@ 2018-09-18  0:34 Iain Buclaw
  2018-09-19 20:06 ` Iain Buclaw
  2018-10-15 14:25 ` David Malcolm
  0 siblings, 2 replies; 19+ messages in thread
From: Iain Buclaw @ 2018-09-18  0:34 UTC (permalink / raw)
  To: gcc-patches

This patch adds the D front-end implementation, the only part of the
compiler that interacts with GCC directly, and being the parts that I
maintain, is something that I can talk about more directly.

For the actual code generation pass, that converts the front-end AST
to GCC trees, most parts use a separate Visitor interfaces to do a
certain kind of lowering, for instance, types.cc builds *_TYPE trees
from AST Type's.  The Visitor class is part of the DMD front-end, and
is defined in dfrontend/visitor.h.

There are also a few interfaces which have their headers in the DMD
frontend, but are implemented here because they do something that
requires knowledge of the GCC backend (d-target.cc), does something
that may not be portable, or differ between D compilers
(d-frontend.cc) or are a thin wrapper around something that is managed
by GCC (d-diagnostic.cc).

Many high level operations result in generation of calls to D runtime
library functions (runtime.def), all with require some kind of runtime
type information (typeinfo.cc).  The compiler also generates functions
for registering/deregistering compiled modules with the D runtime
library (modules.cc).

As well as the D language having it's own built-in functions
(intrinsics.cc), we also expose GCC builtins to D code via a
`gcc.builtins' module (d-builtins.cc), and give special treatment to a
number of UDAs that could be applied to functions (d-attribs.cc).


That is roughly the high level jist of how things are currently organized.

ftp://ftp.gdcproject.org/patches/v4/02-v4-d-frontend-gdc.patch

---
 gcc/d/d-attribs.c     |  846 +++++++++++
 gcc/d/d-builtins.cc   | 1162 +++++++++++++++
 gcc/d/d-codegen.cc    | 2730 +++++++++++++++++++++++++++++++++++
 gcc/d/d-convert.cc    |  807 +++++++++++
 gcc/d/d-diagnostic.cc |  347 +++++
 gcc/d/d-frontend.cc   |  534 +++++++
 gcc/d/d-incpath.cc    |  195 +++
 gcc/d/d-lang.cc       | 1847 ++++++++++++++++++++++++
 gcc/d/d-longdouble.cc |  204 +++
 gcc/d/d-spec.c        |  493 +++++++
 gcc/d/d-target-def.h  |   20 +
 gcc/d/d-target.cc     |  502 +++++++
 gcc/d/d-target.def    |   60 +
 gcc/d/d-target.h      |   34 +
 gcc/d/d-tree.def      |   34 +
 gcc/d/d-tree.h        |  669 +++++++++
 gcc/d/decl.cc         | 2177 ++++++++++++++++++++++++++++
 gcc/d/expr.cc         | 3158 +++++++++++++++++++++++++++++++++++++++++
 gcc/d/imports.cc      |  203 +++
 gcc/d/intrinsics.cc   |  895 ++++++++++++
 gcc/d/intrinsics.def  |  154 ++
 gcc/d/lang-specs.h    |   29 +
 gcc/d/lang.opt        |  366 +++++
 gcc/d/longdouble.h    |  136 ++
 gcc/d/modules.cc      |  849 +++++++++++
 gcc/d/runtime.cc      |  315 ++++
 gcc/d/runtime.def     |  224 +++
 gcc/d/toir.cc         | 1438 +++++++++++++++++++
 gcc/d/typeinfo.cc     | 1667 ++++++++++++++++++++++
 gcc/d/types.cc        |  980 +++++++++++++
 gcc/d/verstr.h        |    1 +
 31 files changed, 23076 insertions(+)

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-10-28 18:12 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-18  0:34 [PATCH 02/14] Add D frontend (GDC) implementation Iain Buclaw
2018-09-19 20:06 ` Iain Buclaw
2018-10-14 19:28   ` Richard Sandiford
2018-10-15  7:36     ` Iain Buclaw
2018-10-20 10:51       ` Richard Sandiford
2018-10-20 15:53         ` Iain Buclaw
2018-10-20 22:57         ` Iain Buclaw
2018-10-22  1:13         ` Iain Buclaw
2018-10-23 14:47           ` Richard Sandiford
2018-10-23 19:49             ` Iain Buclaw
2018-10-25 14:12               ` Is the D frontend good to go? (was Re: [PATCH 02/14] Add D frontend (GDC) implementation.) David Malcolm
2018-10-25 15:01                 ` Iain Buclaw
2018-10-26 10:07                   ` Richard Biener
2018-10-28 23:55                     ` Iain Buclaw
2018-10-16 11:14   ` [PATCH 02/14] Add D frontend (GDC) implementation Richard Sandiford
2018-10-16 11:39     ` Richard Sandiford
2018-10-21  0:02     ` Iain Buclaw
2018-10-15 14:25 ` David Malcolm
2018-10-15 16:46   ` Iain Buclaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).