Commit Graph

3378 Commits

Author SHA1 Message Date
Kai Nacke
2f8f68fabd Update to DMD@a9eedd1.
Also include latest phobos changes.
2013-11-04 00:02:41 +01:00
Kai Nacke
f7f62a609d Declare more TypeClass instances as builtin.
Another difference to DMD. With the new TypeInfo, this should work now.
2013-11-03 15:23:11 +01:00
Kai Nacke
ecefd81c42 Possible fix for the current segfaults.
DMD treats immutable(char)[] and cons(char)[] as builtin.
The latter was missing in LDC.
2013-11-03 13:45:25 +01:00
kai
bf4c6f8ff2 Fix CR/LF horror which prevents compiling with MSVC 2013-11-02 20:23:31 +01:00
kai
1310337d6e Add more IN_LLVM sections and minimize more differences to DMD. 2013-11-02 19:56:47 +01:00
Kai Nacke
27ccce3d1f Make std.math.ldexp @trusted 2013-11-01 20:21:59 +01:00
Kai Nacke
a225ee934d _d_hidden_func needs a parameter.
The DMD implementation is a bit odd. A parameter is passed to the function but the function
itself is declared without a parameter. Then inline assembly is required to retrieve the
parameter.
Just do the same as gdc: declare the passed parameter.
2013-11-01 19:01:29 +01:00
Kai Nacke
81775dfb9a Fix version number 2013-11-01 18:59:58 +01:00
Kai Nacke
054d78934a Update to b52c07.
Also includes latest druntime changes.
2013-11-01 17:55:34 +01:00
Kai Nacke
d48c72d435 Enable delete again.
Some Travis-CI errors may be caused by out-of-memory.
2013-10-31 12:21:33 +01:00
Kai Nacke
72f34e3d8e Update source to eb1b004.
This brings the source beyond beta4.
2013-10-30 21:52:45 +01:00
Kai Nacke
3a85bbec94 Merge latest druntime/phobos changes. 2013-10-29 21:03:00 +01:00
Kai Nacke
4041855110 Update use of Typeinfo. 2013-10-29 19:21:15 +01:00
David Nadlinger
d9b137bb45 Implement new ModuleInfo discovery/druntime startup scheme on Linux.
This is the same implementation that is used for DMD and
supports shared libraries (not yet tested).
2013-10-29 19:21:15 +01:00
David Nadlinger
82c202bb60 Adjust _d_assert_msg return type. 2013-10-29 19:21:15 +01:00
David Nadlinger
2b800b8732 Fix catch clause codegen.
In the 2.064 frontend, the catch variables have a zero
initializer, so DtoDeclarationExp overwrote the actually
caught exception with null.
2013-10-29 19:21:15 +01:00
David Nadlinger
55c02f725a Fix IRLandingPadCatchInfo initialization order warning. 2013-10-29 19:21:15 +01:00
David Nadlinger
e36385214c Do not leave __xopEquals for structs undefined. 2013-10-29 19:21:15 +01:00
David Nadlinger
d918115e64 Remove assertion triggered due to qualifier mismatch. 2013-10-29 19:21:15 +01:00
David Nadlinger
1d142129e3 Handle "initializer outlining" for loop rewrites in 2.064. 2013-10-29 19:21:15 +01:00
David Nadlinger
cb341586e3 First merge of 2.064 beta.
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.

Doesn't build Phobos yet.
2013-10-29 19:21:15 +01:00
David Nadlinger
c400d180d2 Immediately exit on function type mismatch to avoid LLVM crash. 2013-10-29 19:21:14 +01:00
David Nadlinger
01b6d55770 Diff reduction: Remove Scope::ignoreTemplates and friends.
It is unused since my change to the way codegen is
driven. If we want to optimize template codegen again,
we should do it properly, contributing the changes back
to DMD.
2013-10-29 19:21:14 +01:00
David Nadlinger
5ac894c32d Diff reduction: Remove unnecessary forward declarations. 2013-10-29 19:21:14 +01:00
David Nadlinger
f67cbcda98 DtoType -> DtoFunctionType. 2013-10-29 19:21:14 +01:00
kai
8408afcf6d Add SSE4.1, SSE4.2, AES and SHA opcodes.
Also adds comments for all AVX opcodes supported by DMD.
This fixes issue #514.
2013-10-29 17:31:43 +01:00
Kai Nacke
c03ed8eea9 Merge pull request #532 from klickverbot/gc2stack-fixes
gc2stack: Cleanup, handle _d_allocmemory.
2013-10-27 23:14:31 -07:00
David Nadlinger
9f1c26b52a gc2stack: Handle _d_allocmemory.
This allows us to clean up after inlining closures.
2013-10-27 17:05:19 +01:00
David Nadlinger
3539e201f8 gc2stack: Move TypeInfo handling code into FunctionInfo subclass.
This is to properly support calls that don't involve TypeInfo
at all, like it is already the case for _d_newclass, and will be
for _d_allocmemory.
2013-10-27 17:05:19 +01:00
David Nadlinger
5b9208ef85 gc2stack: Extract static size checking code into helper function. 2013-10-27 17:05:19 +01:00
David Nadlinger
e1a6d8144b gc2stack: Replace return type bool with proper enum flag.
This makes the code much easier to read.
2013-10-27 15:43:12 +01:00
David Nadlinger
27b4f730aa gc2stack: Remove unused safeToDelete mechanism. 2013-10-27 15:36:14 +01:00
Kai Nacke
5bf42f86aa Remove -Werror from LLVM_CXXFLAGS.
This flag causes compile errors we can't fix.
2013-10-25 23:30:32 +02:00
kai
a73e4602ee Simplify EmitMemSet in GarbageCollect2Stack.
Simply take advantage of the predefined `CreateMemSet()` function.
2013-10-25 23:28:29 +02:00
kai
835e972e6b Fix va_arg handling.
The change of symbol emission ignored the fact that the va_arg intrinsic must be
handled in a special way. This commit corrects the omission (which leads to seg
faults on Linux/PPC64).
2013-10-25 16:15:52 +02:00
Kai Nacke
e5fe110280 Merge pull request #526 from klickverbot/newclass-signature
Correct signature of _d_newclass runtime call.
2013-10-23 21:43:11 -07:00
Kai Nacke
cdecb99891 Merge pull request #525 from klickverbot/fix-gc2stack-ir
Do not generate invalid IR in dgc2stack pass.
2013-10-23 21:42:51 -07:00
David Nadlinger
b052b30442 Correct signature of _d_newclass runtime call.
Fixes programs trying to directly access it (e.g. the
GtkD bindings). Not sure why this didn't come up earlier.
2013-10-24 00:27:09 +02:00
David Nadlinger
1f59740524 _d_allocclass -> "_d_newclass".
The define is a leftover from the times when we supported
both D1 and D2.
2013-10-24 00:25:36 +02:00
David Nadlinger
3d8e2e5e5c Add virtual destructor to GarbageCollect2Stack to silence GCC warning. 2013-10-24 00:24:55 +02:00
David Nadlinger
36b70b68e8 Do not generate invalid IR in dgc2stack pass.
Branching to a block that starts with a landing pad
instruction is illegal.

GitHub: Fixes #524.
2013-10-23 22:53:18 +02:00
Kai Nacke
287e089927 Add info to -version if compiled with address sanitizer 2013-10-23 02:53:53 +02:00
Kai Nacke
e6ffffdace Files from DRV_SRC and DRV_HDR should be compiled with same flags as other files. 2013-10-23 01:26:28 +02:00
David Nadlinger
847b7ac611 Merge pull request #522 from redstar/sanitize
Build LDC with address sanitizer enabled.
2013-10-22 02:57:56 -07:00
David Nadlinger
66484b580a Simplify git_describe to work on CMake 2.8.0.
FindGit doesn't seem to work as expected on Ubuntu 10.04
(GIT-NOTFOUND even though Git is installed and available
on the $PATH).

This implementation might be overly simplistic and it
should probably use find_program() to locate Git. We need
to revisit this after the 0.12.0 release is out.
v0.12.0
2013-10-21 23:35:28 +02:00
David Nadlinger
ad126e7155 Fix Git tag -> version string conversion on CMake 2.8.0.
This version is notably shipped with Ubuntu 10.04 LTS, used
for building the Linux release binaries.
2013-10-21 23:35:15 +02:00
Kai Nacke
6c7cedc484 Build LDC with address sanitizer enabled.
This commit adds an option to cmake to enable the address sanitizer if LDC is build with clang.
Specify -DSANITIZE=ON on the command line.
2013-10-21 19:49:39 +02:00
David Nadlinger
234772767a Merge pull request #520 from klickverbot/ldmd-m32-m64
LDMD: Properly initialize Params::targetModel.
2013-10-21 05:43:59 -07:00
David Nadlinger
883fd768d3 LDMD: Properly initialize Params::targetModel. 2013-10-21 13:55:49 +02:00
David Nadlinger
1d7fd40893 Merge pull request #516 from klickverbot/fix-version-format
Add 'v' back in at beginning of global.version.
2013-10-20 17:06:22 -07:00