Commit Graph

173 Commits

Author SHA1 Message Date
Alexey Prokhin
f7e2b7eec6 CMake: Add PHOBOS2_DIR to cache, so it would be accessible using ccmake 2011-02-23 20:49:00 +03:00
Alexey Prokhin
40621f55d5 Generate correct ldc2.conf for phobos 2011-02-23 20:39:04 +03:00
Alexey Prokhin
e921998d75 A few fixes for 64bit 2011-02-23 12:49:57 +03:00
Alexey Prokhin
6d89bfa961 Use _d_assocarrayliteralTX to initialize associative arrays. Replace depricated _d_arrayappendcT() by _d_arrayappendcTX(). Make sure that a l-value of a binassign expressions is only evaluated once (reapllied 1784 but only for D2) 2011-02-20 19:00:45 +03:00
Alexey Prokhin
ff7198eca8 Compile sources from druntime/core/stdc 2010-12-30 14:04:34 +03:00
Alexey Prokhin
023b55a772 Run postblit constructors for elements of an array. 2010-12-30 14:04:24 +03:00
Alexey Prokhin
6d22dd7999 Updated to 2.050 2010-11-08 16:55:35 +03:00
Alexey Prokhin
d8e1d1feac Fixed a few unittests in math.d 2010-11-07 18:02:43 +03:00
Alexey Prokhin
e11d071cdf Ported rt/memory.d from tango. 2010-11-06 19:41:17 +03:00
Eldar Insafutdinov
8e0986a682 fix for building 32 bit phobos on a 64 bit host 2010-11-05 23:03:58 +00:00
Eldar Insafutdinov
81a3a9eb8a temporary fix for building 32bit druntime on 64bit hosts 2010-11-05 22:41:25 +00:00
Alexey Prokhin
14c6dfb895 Added pointers to shared constructors and destructors to ModuleInfo. 2010-11-05 17:40:29 +03:00
Alexey Prokhin
376c155429 Added missing files for building 2010-11-02 18:44:38 +03:00
Alexey Prokhin
4ff4b442f0 Cmake option BUILD_BC_LIBS works again. 2010-10-31 13:38:28 +03:00
Alexey Prokhin
4c22a76f07 Fixed missing symbols in druntime library. Fixed a druntime crash in _d_invariant(). 2010-10-31 12:42:15 +03:00
Alexey Prokhin
d143966b6a Updated druntime.patch and added phobos.patch 2010-10-29 12:14:24 +04:00
Alexey Prokhin
b1e5993873 Started work on phobos 2010-10-27 18:13:46 +04:00
Alexey Prokhin
4d7a6eda23 Different fixes for d2 2010-10-07 22:35:32 +04:00
Alexey Prokhin
df87607ba2 Updated to 2.049 2010-09-30 21:54:45 +04:00
Kelly Wilson
badb597962 Change the ldc.conf file output to match the newer Tango directory structure and only use libtango-user-ldc for the libs to match the 0.99.9 build instructions. 2010-03-10 20:21:05 -07:00
Christian Kamm
ff69db3b37 Fix definition of _Unwind_Action.
Thanks to Garrison.
2009-12-18 18:59:14 +01:00
Christian Kamm
f84bddc8d0 Hack to make compiling the tango 0.99.8 runtime work.
The gc has no module statements and the new frontend fails to find
the imports. So I add an explicit include path to the runtime gc
directory.
2009-11-07 10:54:40 +01:00
Tomas Lindquist Olsen
84a319ad23 Fixed issue in exception runtime with recent LLVM revisions, with this in place EH seems to work properly on x86-64. These fixes need to be merged into tango trunk still! 2009-10-21 05:46:56 +02:00
Christian Kamm
265cbea170 Make == for associative arrays test for equality, not identity.
_aaEq was added to runtime/internal/aaA.d which forwards to
TypeInfo_AssociativeArray.equals in genobj.d. On the codegen side, DtoAAEquals
was added to gen/aa.cpp and is called from EqualExp::toElem in gen/toir.cpp.

I assume that the frontend will produce an error if == is used on associative
arrays of different type.

This fixes DMD bug 1429.
2009-06-21 19:05:24 +02:00
Frits van Bommel
465f15eda0 Return void* from _d_allocclass so LLVM doesn't do weird things with it...
This allows `-instcombine` followed by `-gvn` to do devirtualization, so add
`-gvn` in strategic places in the default pass order.
2009-06-20 11:39:13 +02:00
Christian Kamm
8357777440 Set the default RUNTIME_DIR to be side-by-side of the ldc source dir. 2009-06-14 14:28:11 +02:00
Frits van Bommel
f79e40a491 Use llvm.memset instead of _d_array_init_i1 and _d_array_init_i8.
This exposes what's happening to LLVM, and memset is probably faster than the
runtime functions we were using anyway.
2009-06-07 13:57:59 +02:00
Frits van Bommel
46cd6504fa Adjust some more code that was depending on the function and delegate calling
conventions being equal.
There's also an instance in `tango.text.convert.Layout` that should be adjusted:
{{{
Index: tango/text/convert/Layout.d
===================================================================
--- tango/text/convert/Layout.d	(revision 4578)
+++ tango/text/convert/Layout.d	(working copy)
 -660,8 +660,12 @@

                        case TypeCode.STRUCT:
                             auto s = cast(TypeInfo_Struct) type;
-                            if (s.xtoString)
-                                return Utf.fromString8 (s.xtoString(p), result);
+                            if (s.xtoString) {
+                                char[] delegate() toString;
+                                toString.ptr = p;
+                                toString.funcptr = cast(char[] function()) s.xtoString;
+                                return Utf.fromString8 (toString(), result);
+                            }
                             goto default;

                        case TypeCode.INTERFACE:
}}}
2009-05-31 15:27:01 +02:00
Frits van Bommel
a517adb426 Adjust runtime for recent ABI change on x86-64, since member functions are no
longer equivalent to regular functions with `this` as their first argument.
(They weren't anyway, but it happened to work as long as there was no `sret`
parameter)
2009-05-31 14:27:01 +02:00
Kelly Wilson
cab7aeb843 just a simple change to cmake for mingw 2009-05-27 12:41:41 -06:00
Frits van Bommel
e7b3f5415f Make "aa[key]" use the same runtime call as "key in aa". The runtime calls
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);
    }
}
}}}
2009-05-25 12:50:40 +02:00
Tomas Lindquist Olsen
e8780d50e8 Merged DMD 1.045 !!! 2009-05-16 22:21:31 +02:00
Frits van Bommel
541f3723cd Intrinsics shouldn't see struct padding, so use a special TargetABI for them
that removes it.
This unbreaks the `llvm_*_with_overflow` intrinsics.
2009-05-16 13:06:49 +02:00
Tomas Lindquist Olsen
3fb2cb0322 Okay... Fix the assertion as well, since 20 really is enough yet it wanted MORE... Despite the message. 2009-05-10 17:31:56 +02:00
Tomas Lindquist Olsen
0ab77de246 Increased a buffer size in TypeInfo_StaticArray from 10 to 20 to avoid assertion failures! Thanks LeoD. 2009-05-10 17:25:47 +02:00
Tomas Lindquist Olsen
dfea022a86 Changed array slice copying to call a runtime function when assertions or array bound checks are enabled instead of just doing a memcpy. This makes sure an exception is thrown if the copy is invalid (ie. different lengths or overlap). Fixes ticket #283 . Rebuilding the runtime is necessary. 2009-05-10 02:23:05 +02:00
Benjamin Kramer
0cc01f160f Add runtime support for darwin x86_64 2009-05-02 16:39:26 +02:00
Tomas Lindquist Olsen
ea2279b11a Updated the interal runtime's ClassInfo type to match the one in object.di .
Runtime now compiles and runminitest is back to normal except for typeinfo10.d .
2009-04-17 02:54:16 +02:00
Christian Kamm
18baa5c40b Remove unnecessary GCC_EXE CMake flag. Closes #208, thanks impulze. 2009-04-12 13:50:18 +02:00
Christian Kamm
253e743d05 Apply fawzi's stacktracing update from #254. 2009-04-05 15:02:44 +02:00
Christian Kamm
1bf5934519 Fix path to llvmasm.di in runtime CMakeList 2009-03-28 10:50:44 +01:00
Tomas Lindquist Olsen
14b8aff809 Fixed issue with runtime supplied typeinfo generating multiple symbols.
Added new ldc.llvmasm import in runtime cmake file.
2009-03-28 09:45:33 +01:00
Tomas Lindquist Olsen
e61562033d Added support for tuple return with __asmtuple!(int,int) etc. 2009-03-28 08:25:58 +01:00
Tomas Lindquist Olsen
1809214995 Added support for single D type register return from __asm. 2009-03-28 07:24:53 +01:00
Tomas Lindquist Olsen
99b863e2b1 Added initial support for raw LLVM inline asm. 2009-03-28 06:32:06 +01:00
Tomas Lindquist Olsen
36f6ebc77f - Versioned Expresssion::toElem with #if IN_DMD/IN_LLVM.
- Eliminated the DLRValue DValue.

- Implemented proactive handling of l-value CastExpS.

- Minor tweak in runtime memory.d .
2009-03-28 05:00:43 +01:00
Christian Kamm
ef62f7965c Bring FrameInfo definition up to date with recent Tango developments. Thanks fawzi! 2009-03-22 14:51:03 +01:00
Christian Kamm
490549e65c Add dmd-style configuration file for rebuild usage. See #236 and thanks to ccuter for the patch! 2009-03-21 09:47:48 +01:00
Frits van Bommel
d1911d40d6 Fix some issues with fawzi's patch.
- It now actually compiles:
   - import stdc.stdio for string formatting functions)
   - remove extra '{'
 - Use snprintf() instead of sprintf().
 - Use return value from snprintf instead of strlen().
 - Don't print the filename in Exception.writeOut() if it has zero length and
   the line number is 0
   (It would previously only skip these if the filename was null, but not if it
   was a different empty string)
 - Ignore empty filename + line number 0 in FrameInfo.writeOut() as well.
2009-03-18 15:33:19 +01:00
Frits van Bommel
e847f60fb1 Apply fawzi's patch from #235.
This has some issues which are addressed in my next commit.
2009-03-18 15:20:07 +01:00