mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-14 11:53:13 +01:00
these were using were different, but with equivalent definitions.
With `ldc -O3`, the following functions now all compile to the exact same code:
{{{
int[int] y;
void foo(int x) {
if (x in y) {
auto z = x in y;
sink(*z);
}
}
void bar(int x) {
if (x in y) {
sink(y[x]);
}
}
void baz(int x) {
if (auto p = x in y) {
sink(*p);
}
}
}}}
This should help get the runtime built.
FOR D1:
=======
1) Do a checkout of tango trunk into the ldc root dir (along dmd, gen, runtime etc).
* $ ls
* dmd dmd2 gen ir ...
* $ svn co http://svn.dsource.org/projects/tango/trunk tango
2) Compile the runtime
* sh build.sh
FOR D2:
=======
Highly experimental!!!
1) Do a checkout of druntime trunk into the ldc root dir (along dmd, gen, runtime etc).
* $ ls
* dmd dmd2 gen ir ...
* $ svn co http://svn.dsource.org/projects/druntime/trunk druntime
2) Patch druntime
* cd runtime
* sh patch-druntime.sh
3) Compile druntime
* cd ../druntime/src
* sh build-ldc.sh
=======
Enjoy!