Christian Kamm
ff69db3b37
Fix definition of _Unwind_Action.
...
Thanks to Garrison.
2009-12-18 18:59:14 +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
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
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
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
253e743d05
Apply fawzi's stacktracing update from #254 .
2009-04-05 15:02:44 +02: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
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
Tomas Lindquist Olsen
f84a2fb84a
Updated lifetime.d with a 32bit faster codepath for overflow checks.
2009-03-03 19:47:39 +01:00
Tomas Lindquist Olsen
d845b11dbd
Removed inline asm for overflow checking in runtime that wasn't working.
2009-03-03 19:37:47 +01:00
Christian Kamm
07649678db
_d_delarray also had one of the array consistency asserts mentioned in #184
...
and dmd2632.
2009-01-30 07:51:50 +01:00
Christian Kamm
d958535969
Remove asserts on array consistancy in arraysetlength. Fixes #184 , thanks Deewiant.
2009-01-29 17:45:12 +01:00
Christian Kamm
921a326865
Applied doob's patch to port GDC's Dyld data segment tracking for Mac.
2009-01-24 00:33:06 +01:00
Christian Kamm
783ec2799d
Further Solaris data segment detection fixes. Thanks BlueZeniX!
2009-01-23 10:13:27 +01:00
Christian Kamm
ab9b9cc2e9
Solaris compatibility and proc map parsing #183 , thanks BlueZeniX!
2009-01-22 18:53:32 +01:00
Christian Kamm
f4f5c58a44
Add wilsonk's static data segment finding code for x86-64 from #181 . Thanks!
2009-01-22 18:23:30 +01:00
Christian Kamm
ba9eb478dd
Add headers for HP's libunwind, currently unused though.
2009-01-22 17:57:38 +01:00
Christian Kamm
bbf21853b4
Fix x86-64 exception handling #180 . Thanks pcwalton!
2009-01-22 17:50:38 +01:00
Christian Kamm
8ac2aecf42
Apply pcwalton's eh runtime portability fix.
2009-01-19 19:42:00 +01:00
Christian Kamm
33fe431ffe
Don't use /proc/self/map for finding the static data segment on x86-64 for
...
now. Probably breaks shared libraries. Parsing the file needs to be rewritten!
2009-01-19 19:34:51 +01:00
Christian Kamm
e7f750aee1
Apply BlueZeniX's patch for OpenSolaris compatibility. Fixes #158 .
2009-01-04 15:49:28 +01:00
Christian Kamm
68de00f6c4
Backed out changeset 1fcba307fd28
...
Wasn't the right thing to do.
2008-12-27 16:07:23 +01:00
Christian Kamm
20b85089a7
Changed bswap intrinsic definition in compiler specific runtime to actually
...
implement a linkable bswap.
2008-12-27 15:54:24 +01:00
Christian Kamm
a272b01df6
Apply fix for #151 .
2008-12-15 21:09:33 +01:00
Tomas Lindquist Olsen
b6781a8eae
Added proper "need 'this' to access member foo" errors instead of "variable foo not resolved" for some cases, added FIXME for the old error!
...
Added a bit more information to the runtime's cyclic dependency detection exception.
2008-12-09 01:56:39 +01:00
Christian Kamm
cdbc4f84d2
Fix warnings on x86-64. By fvbommel.
2008-11-28 21:24:08 +01:00
Christian Kamm
437aa0d4aa
Fix bug in array_cast_len. Makes tango.text.Regex work.
2008-11-02 18:36:28 +01:00
Christian Kamm
891d17e4b5
Applied easy part from wilsonk's x86-64 patch in #107
2008-10-30 11:08:34 +01:00
Christian Kamm
0e5d9f970b
Add explicit uint->char cast to get rid of warning.
2008-10-30 10:15:42 +01:00
Christian Kamm
b3b98c3284
Fix broken indentation from last commit.
2008-10-26 21:18:24 +01:00
Christian Kamm
d3bb0b74bd
Enable arg reversal on x86 by default. Make change to TypeInfo_Struct.compare to accomodate for it.
2008-10-26 21:16:21 +01:00
Christian Kamm
cfcda83291
Change _d_newclass into _d_allocclass. Add initialization to ClassInfo.create.
2008-10-26 14:12:03 +01:00
Tomas Lindquist Olsen
5ad345646a
Merged DMD 1.036.
...
Improved comments a little in the runtime source code.
2008-10-22 17:06:17 +02:00
Tomas Lindquist Olsen
f7ea1da010
Removed TypeOpaque from DMD.
...
Changed runtime functions taking opaque[] to void[].
Implemented proper type painting, to avoid "resizing" array casts in runtime calls that previously took opaque[].
Implemented dynamic arrays as first class types, this implements proper ABI for these types on x86.
Added dwarf region end after call to assert function, fixes some problems with llvm not allowing this to be missing.
Reverted change to WithStatement from rev [704] it breaks MiniD, mini/with2.d needs to be fixed some other way...
Fixed tango bug 1339 in runtime, problem with _adReverseChar on invalid UTF-8.
Disabled .bc generation in the compiler runtime part, genobj.d triggers some llvm bug when using debug info. the .o seems to work fine.
2008-10-22 14:55:33 +02:00
Christian Kamm
e1283d80d2
Updates to makefiles. It's not robust with regard to the .bc files, but it works.
2008-10-12 10:42:54 +02:00
Christian Kamm
6d1768967e
Fix makefile for runtime/internal.
2008-10-11 21:23:41 +02:00
Christian Kamm
45fc733717
Renames.
2008-10-06 22:56:54 +02:00
Christian Kamm
a3a418150e
Some missed LLVMDC -> LDC.
2008-10-06 22:54:08 +02:00
Christian Kamm
6eeeafdba6
First part of rename to LDC.
2008-10-06 22:46:55 +02:00