Files
ldc/dmd2
David Nadlinger 787c147986 Use Module::members -> Dsymbol::codegen to define symbols.
This commit fundamentally changes the way symbol emission in
LDC works: Previously, whenever a declaration was used in some
way, the compiler would check whether it actually needs to be
defined in the currently processed module, based only on the
symbol itself. This lack of contextual information proved to
be a major problem in correctly handling emission of templates
(see e.g. #454).

Now, the DtoResolve…() family of functions and similar only
ever declare the symbols, and definition is handled by doing
a single pass over Module::members for the root module. This
is the same strategy that DMD uses as well, which should
also reduce the maintainance burden down the road (which is
important as during the last few releases, there was pretty
much always a symbol emission related problem slowing us
down).

Our old approach might have been a bit better tuned w.r.t.
avoiding emission of unneeded template instances, but 2.064
will bring improvements here (DMD: FuncDeclaration::toObjFile).
Barring such issues, the change shoud also marginally improve
compile times because of declarations no longer being emitted
when they are not needed.

In the future, we should also consider refactoring the code
so that it no longer directly accesses Dsymbol::ir but uses
wrapper functions that ensure that the appropriate
DtoResolve…() function has been called.

GitHub: Fixes #454.
2013-10-13 19:18:24 +02:00
..
2013-06-12 20:16:37 +02:00
2013-03-06 18:18:56 +01:00
2013-06-15 15:06:57 +02:00
2013-06-12 20:16:37 +02:00
2013-10-05 21:19:35 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-03-06 18:18:56 +01:00
2013-06-12 20:16:37 +02:00
2012-09-07 03:51:31 +02:00
2013-06-29 19:01:42 +02:00
2013-10-05 21:19:35 +02:00
2012-04-05 15:30:00 +04:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-06-15 15:06:57 +02:00
2013-06-12 20:16:37 +02:00
2013-01-04 06:22:53 +01:00
2013-06-12 20:16:37 +02:00
2012-09-07 03:51:31 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-03-06 18:18:56 +01:00
2013-03-06 18:18:56 +01:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-03-06 18:18:56 +01:00
2013-07-29 11:18:18 +04:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-01-04 06:22:53 +01:00
2013-01-04 06:22:53 +01:00
2013-06-07 03:20:39 +02:00
2013-06-12 20:16:37 +02:00
2013-03-06 18:18:56 +01:00
2013-06-29 19:01:42 +02:00
2013-06-12 20:16:37 +02:00
2013-01-04 06:22:53 +01:00
2013-01-04 06:22:53 +01:00
2013-01-04 06:22:53 +01:00
2013-10-05 19:04:18 +04:00
2013-06-29 19:01:42 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-06-15 15:06:57 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00
2013-06-29 19:01:42 +02:00
2012-09-07 03:51:31 +02:00
2013-06-12 20:16:37 +02:00
2013-06-12 20:16:37 +02:00

		The D Programming Language
		Compiler Front End Source
		Copyright (c) 1999-2013, by Digital Mars
		http://www.digitalmars.com/
		All Rights Reserved


This is the source code to the front end Digital Mars D compiler.
It covers the lexical analysis, parsing, and semantic analysis
of the D Programming Language defined in the documents at
http://dlang.org/

These sources are free, they are redistributable and modifiable
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version (attached as gpl.txt),
or the Artistic License (attached as artistic.txt).

The optimizer and code generator sources are 
covered under a separate license, backendlicense.txt.

It does not apply to anything else distributed by Digital Mars,
including D compiler executables.

-Walter Bright