Martin
417e3d242d
Slightly extend AttrSet (attributes set) for improved usability
2015-11-21 15:08:16 +01:00
Martin
2dfa5e8569
Some more cosmetic fixes
...
Found by searching for lines > 80 chars.
2015-11-05 19:12:32 +01:00
David Nadlinger
c9c854f664
eh: Do not use GC for _d_exception records
2015-11-03 00:53:34 +02:00
David Nadlinger
9df487edff
gen/ir: clang-tidy the world
2015-11-02 11:30:40 +02:00
David Nadlinger
44b0f7b615
driver/gen/ir: clang-format the world
...
This uses the LLVM style, which makes sense for sharing code
with other LLVM projects. The DMD code we use will soon all
be in D anyway.
2015-11-02 00:28:01 +02:00
Martin
90197d6c72
Simplify working with LLVM attributes
2015-11-01 16:19:27 +01:00
Martin
60d676e2a1
Drop support for LLVM < 3.5
...
This allows to clean up the code a little.
2015-10-30 22:24:05 +01:00
David Nadlinger
bd47ea49e6
Merge branch 'master' into merge-2.068
2015-09-24 17:57:25 +02:00
David Nadlinger
f4f55abf27
Use thunks instead of calling _d_toObject for D interfaces
...
This allows us avoid the problems stemming from the 64 kiB
size limit hack in _d_toObject.
GitHub: Fix #1065 .
2015-09-13 20:27:00 +02:00
David Nadlinger
5687866721
_aaGetX -> _aaGetY
2015-08-29 03:09:18 +02:00
David Nadlinger
f0658ea8d1
Remove some no longer used runtime functions
2015-08-29 03:09:17 +02:00
David Nadlinger
ef431836b0
Remove _ad{Eq, Cmp} defines from back when we supported both D1/D2 (NFC)
2015-08-22 19:01:02 +02:00
David Nadlinger
8ed9826de1
Exception chaining reimplementation for correct and lean IR
...
Now we no longer require separate landing pads for collisions
in user code. This leads to less cruft being generated and opens
the door towards folding the successful and exceptional paths
through finally blocks into one.
This commit breaks Win64; ldc.deh2 will also need updating.
2015-08-13 18:24:06 +02:00
Martin
9d5560601a
WIP: fix array construction/assignment wrt. RAII
2015-07-22 01:41:17 +02:00
Martin
4b6bd7ab52
Merge branch 'master' into merge-2.067
2015-07-18 16:02:51 +02:00
Kai Nacke
4cf4690ab0
Use C calling convention for variadic functions on x86.
...
0.15.1 used stdcall convention everywhere. But the ABI change in 0.15.2
requires use of the C calling convention for variadic calls on x86
because the stdcall convention does not support vararg functions.
Solution is to check the llvm::FunctionType if the function has varargs.
This commit also makes the C calling convention the global default
because according to the LLVM documentation the fastcc convention used
for D linkage does not support varargs.
This fixes issue #1000 .
2015-07-15 21:34:00 +02:00
Kai Nacke
d1e764cec1
Backport of "Avoid using llvm::Linker" to master.
...
See pull request #974 for the original code.
2015-06-27 22:08:44 +02:00
David Nadlinger
0922254dd1
Directly emit IR into same llvm::Module instead of using Linker
...
GitHub: Fixes #970 .
2015-06-14 21:36:35 +02:00
kai
eadefdc676
The runtime functions for multi-dim arrays have changed.
...
_d_newarraymT and _d_newarraymiT are now named _d_newarraymTX and
_d_newarraymiTX. There is also a change in the signature: instead
of a variable length argumentlist the functions now require an array
of dimensions.
This should fix test runnable/test28.d
2015-04-12 19:59:18 +02:00
Kai Nacke
ac7f8c70f8
Merge branch 'master' into merge-2.067
...
Conflicts:
dmd2/mars.h
driver/ldmd.cpp
gen/module.cpp
2015-04-08 22:23:50 +02:00
Johan Engelen
505f18ca2a
Add coverage analysis ("-cov=...") to ldc2
2015-04-07 22:11:02 +02:00
Martin
6c333f5761
Allocate structs on the heap via runtime function _d_newitem.
...
This is required for the GC to be able to call their dtors, if need
be (by appending a TypeInfo pointer after the actual struct in case
the struct has a dtor).
_d_newitemT() / _d_newitemiT() also perform the initialization, so
we don't need to take care of that in toir.cpp anymore.
2015-04-04 21:00:05 +02:00
Martin
7d0d2a1d26
Call _d_delstruct() runtime function when deleting struct pointers.
...
As long as the struct has a dtor, otherwise continue forwarding
to _d_delmemory().
2015-03-29 04:54:31 +02:00
Kai Nacke
ae4344714c
Fix bad signature in call to _d_arraysetctor / _d_arraysetassign.
...
The count parameter is int, not size_t.
2015-03-24 20:06:55 +01:00
Martin
6d080a6ed2
Fix the signatures of all forward declared runtime functions.
2015-03-22 19:56:46 +01:00
Martin
a4a10336fc
Remove duplicate declaration of runtime function _d_assert_msg().
...
It's already declared 3 blocks up.
2015-03-22 18:23:55 +01:00
Martin
e8f782bb34
Use void* for associative arrays when forward-declaring runtime functions.
...
Instead of a pointer to an empty struct.
2015-03-22 17:08:38 +01:00
kai
f02981ca56
Fix signature of _aaKeys in gen/runtime.cpp
2015-03-22 13:51:55 +01:00
kai
350c01a97d
Updates to runtime functions.
...
Adds new functions and corrects signatures.
2015-03-21 21:50:49 +01:00
kai
9ef4c8f421
Implement _d_arraycatnTX and remove _d_arraycatnT.
...
With this commit, the first simple applications can be linked and run!
2015-03-21 17:37:51 +01:00
Martin
b19e95df46
Fix forward-declared LL signature of function _d_eh_personality.
2015-02-26 15:51:29 +01:00
Martin
e7bfb78632
Refactor attributes system.
...
By introducing abstractions for attribute builder and set since they differ
greatly between LLVM 3.1-3.3.
2015-02-23 22:52:11 +01:00
Martin
f5592048e5
Get rid of obsolete TargetABI::newFunctionType() and doneWithFunctionType().
2015-02-23 22:52:11 +01:00
Alexey Prokhin
4e2d45a409
Move irFty fields to backend ir classes
2014-10-05 16:55:22 +04:00
Alexey Prokhin
87b74363ac
Fix #698 — ICE with minimal D runtime and basic extern(C) int main()
function
2014-09-21 22:10:16 +04:00
Alexey Prokhin
6d5944f80b
Refactoring: Synchronized is rewritten to try-finally statement. Remove it
2014-08-24 13:59:18 +04:00
Alexey Prokhin
76f3fd02bd
Call _d_arraybounds for bounds checking instead of _d_array_bounds.
...
It expects file name as a first argument instead of pointer to Module.
2014-08-22 16:01:35 +04:00
Alexey Prokhin
50f729d415
Use _d_newarrayU instead of _d_newarrayvT
2014-08-22 16:01:34 +04:00
kai
45fca1f3b5
Add line number to error message of -nogc switch.
...
This was suggested by bearophile in the news group.
It also changes all Loc objects to be passed by reference.
2014-07-04 07:15:05 +02:00
kai
0f6349efc6
Remove -noruntime as adverticed
2014-06-30 12:50:56 +02:00
Kai Nacke
fe39da53e3
Merge of 2.065.0-b3.
...
The new visitor class is used for IR generation. This removes some modifications from DMD source.
2014-02-10 08:47:25 +01:00
Kai Nacke
038855e4a0
Deprecate -noruntime switch (which has now no function).
2013-12-12 20:02:45 +01:00
Kai Nacke
bea0b597ae
Add -nogc switch.
...
This is a replacement for the -noruntime switch. With the new DSO implementation
every module generates runtime calls. The main motivation for the -noruntime switch
is to avoid implicit GC calls. Therefore a dedicated -nogc switch is introduced.
2013-12-10 18:33:49 +01:00
Kai Nacke
d25d28f914
Extend error message if -noruntime is used.
...
The name of the implicit called runtime function gives a hint about
what goes wrong.
2013-12-08 20:24:08 +01:00
Kai Nacke
bdc1f44088
Merge remote-tracking branch 'origin/master' into merge-2.064
...
Conflicts:
gen/runtime.cpp
runtime/CMakeLists.txt
2013-12-08 19:29:10 +01:00
Kai Nacke
43acc1f9c8
Check if basic types are read from object.di before usage.
...
If object.di was not read or is incomplete then basic types may be missing.
This results in a crash if they are used during runtime initialization.
This fixes #551 .
2013-12-08 17:30:02 +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
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
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