On Tuesday, 4 June 2013 at 07:39:19 UTC, Flamaros wrote:
On Tuesday, 4 June 2013 at 07:12:34 UTC, Walter Bright wrote:
On 6/3/2013 11:49 PM, deadalnix wrote:
We can do it in a D specific way (using our own metadata and
providing an
optimization pas for LLVM) but most likely we won't even need
to as the same
feature is planned to be added to clang and we can most
likely simply reuse
clang's metadata.
There is another way.
D can be made aware that it is building an executable (after
all, that is why it invokes the linker). If you shove all the
source code into the compiler in one command, for an
executable, functions that are not overridden can be made
final.
I think is interesting, because all open source software can be
build from sources and can also be done on some commercial
products in certain conditions. And compiling the world with D
is realistic, due to small compilation time.
I also don't understand why compilers don't generate executable
directly and use a linker, as they already know the binary
format and do optimization. I case of DMD which take all source
file in a raw, I don't see any issues. Do DMD do best inlining
optimizations than the linker when it get all sources as
parameter?
Because C language tooling still persists around us.
In the Pascal family of languages, the linker is part of the
compiler, like in Turbo Pascal, Delphi, Oberon, ....
--
Paulo