Commit graph

314 commits

Author SHA1 Message Date
Alexey Prokhin
023b55a772 Run postblit constructors for elements of an array. 2010-12-30 14:04:24 +03:00
Alexey Prokhin
44593f6220 Call d_delarray_t() instead of _d_delarray() 2010-12-19 15:51:00 +03:00
Alexey Prokhin
8c0902ce21 Fixed assert when compiling inline test 2010-12-17 12:54:34 +03:00
Alexey Prokhin
71f653f19b Fixes for closures 2010-12-15 17:05:16 +03:00
Alexey Prokhin
3eb6b5e8c8 Fixed a crash when compiling test runnable/A16. 2010-12-14 14:35:52 +03:00
Alexey Prokhin
c3ea7b27c6 Work on debug 2010-12-14 14:35:48 +03:00
Alexey Prokhin
0cc3dc369a Fixed signature of _d_delarray() 2010-11-02 20:30:06 +03:00
Alexey Prokhin
360a99caa9 Resolving nested context for structs.
* * *
Another fix for nested structs
* * *
Yet another fix for nested structs
2010-11-02 13:21:36 +03:00
Alexey Prokhin
2fe6817294 Fixed a druntime crash in _d_delclass 2010-10-31 12:23:35 +03:00
Alexey Prokhin
d0c7a5a3cb Ported to new debug information format introduced in llvm 2.7 2010-10-30 20:57:32 +04:00
Alexey Prokhin
e4c3179d43 Different fixes: phobos compiles now 2010-10-28 14:53:01 +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
Tomas Lindquist Olsen
1fac40d2bd Update to work with LLVM 2.7.
Removed use of dyn_cast, llvm no compiles
without exceptions and rtti by
default. We do need exceptions for the libconfig stuff, but rtti isn't
necessary (anymore).

Debug info needs to be rewritten, as in LLVM 2.7 the format has
completely changed. To have something to look at while rewriting, the
old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means
that you have to define this to compile at the moment.

Updated tango 0.99.9 patch to include updated EH runtime code, which is
needed for LLVM 2.7 as well.
2010-05-19 12:42:32 +02:00
Kelly Wilson
b38845e88e Apply patch from klickverbot. This is his 'proper fix' patch for bug #395. 2010-03-08 23:37:40 -07:00
Christian Kamm
57630ea48b Make ref vars work with nesting. 2009-11-07 14:06:11 +01:00
Christian Kamm
4e2e4d5b3d Fix codegen for foreach with ref value being lowered to for. 2009-11-07 13:51:05 +01:00
Benjamin Kramer
c220dcac05 IntegerType is now contextifed.
Requires llvm >= 78969. resistor says this will be the last context API change :)
2009-08-14 00:39:18 +02:00
Benjamin Kramer
4c5457ba61 getNullValue is in Constant again
Requires LLVM >= r77721
2009-07-31 23:01:29 +02:00
Benjamin Kramer
66101517d7 LLVMContext changes up to r77366 2009-07-30 15:25:10 +02:00
Benjamin Kramer
a31f3eb98f getClosestStaticTargetForModule was replaced with lookupTarget
Build fix for LLVM r77111.
2009-07-28 15:26:21 +02:00
Tomas Lindquist Olsen
3cf7b6a95c Fixed potential crash with complex recursive struct types. 2009-07-26 19:12:37 +02:00
Benjamin Kramer
d7049de966 More factory methods moved to LLVMContext 2009-07-15 18:09:41 +02:00
Benjamin Kramer
0ee2f34611 Don't use llvm::getGlobalContext() anymore 2009-07-13 20:16:15 +02:00
Benjamin Kramer
331319dab1 Build fix for the latest LLVMContext changes (LLVM r75445)
This shouldn't break the build with older LLVM revs. We include
LLVMContext.h in gen/llvm.h now to make the transition a little bit
easier.
2009-07-13 12:17:58 +02:00
Christian Kamm
8bbf6ab984 Treat ConditionalDeclarations correctly in DtoDeclarationExp.
Fixes #332.
2009-06-26 17:18:36 +02:00
Christian Kamm
d7b00783d3 Automated merge with http://hg.dsource.org/projects/ldc 2009-06-20 19:12:04 +02:00
Christian Kamm
42b3da8ac7 Move function codegen data from IrFunction to new FuncGen.
This change reduces memory consumption significantly by releasing the
memory held by the STL containers that are now inside FuncGen.
2009-06-20 19:11:44 +02:00
Robert Clipsham
f13c5e82f5 Added a stripModifiers() function to remove shared|const|immutable storage classes in D2 (should eventually be moved to a dhelpers file rather than llvm helpers).
Replaced a few occurances of STCinvariant with STCimmutable.
2009-06-18 15:44:04 +01:00
Kelly Wilson
0c1b6e27d9 fix problem reported in ticket 327 - thanks d0k 2009-06-16 08:57:20 -06:00
Frits van Bommel
96fdcd6347 Run semantic3 on imported modules, and emit new symbols with
`available_externally` linkage. This allows the inliner to inline functions from
other modules while telling the code generator to ignore those functions (treat
them as declarations)
Still generates a few extra `TypeInfo`s and strings...
Disabled when generating debug info because I don't really understand it, and it
doesn't like this.
2009-06-07 16:00:13 +02:00
Frits van Bommel
1958e17734 Rewrite StructLiteralExp::toElem to store individual fields instead of
generating a constant to fill the entire struct with a single `store`.
This is much more efficient at compile time (fixing #320) and vastly reduces
the size of the emitted code. Since LLVM no longer needs to keep the data for
all fields in "registers" until the store happens, it should also be more
efficient at run time in cases where the fields aren't assigned with constants.

There's also some code clean-up by removing duplicated logic.
2009-06-06 20:16:13 +02:00
Christian Kamm
b4f8bd6e52 Fix #318 by making a list of all seen template instances in a module for
singleobj compilation and then making sure they get emitted in their entirety.
2009-06-06 09:47:32 +02:00
Tomas Lindquist Olsen
062b6d93c4 Make sure typeinfo output are mutable types, this is a temporary workaround to get druntime genobj.d to compile until we figure out what typeinfos are actually needed here and there ... 2009-06-03 04:12:28 +02:00
Tomas Lindquist Olsen
f6997cb604 D2:
Applied function type from D1 frontend that got removed in D2, it's critical for member function type to be correct.

Fixed a bunch of type discrepancies in druntime object.di vs. genobj.d .

Disabled (#if 0) some potentally very large type dumps for -vv .

Updated classinfo and typeinfo generation for D2, almost complete now.

Added finer grained checks for vtbl type mismatching, aids debugging.
2009-06-03 02:28:48 +02:00
Frits van Bommel
cf5ad1a5b0 Remove some unnecessary #ifs. The D1 frontend has a Type::nextOf() which just
returns `next`.
2009-06-02 18:41:10 +02:00
Robert Clipsham
c5be82c5ae LDC 2 compiles again. 2009-05-30 17:23:32 +01:00
Christian Kamm
5b799deeb4 Fix #308 by giving finally code emitted by EnclosingTryFinally a different landing pad. 2009-05-23 00:23:39 +02:00
Frits van Bommel
adfc5b3ee9 Fix scope(exit) foreach (ref v; arr) foo(v); 2009-05-22 21:38:01 +02:00
Christian Kamm
c433604243 Fix bug #307 by doing what DMD does: add the arrayop to
sc->module->importedFrom instead of sc->module. That way array ops in template
instantiations will be semantic3'ed.
2009-05-22 10:17:47 +02:00
Christian Kamm
f675d36cfb Tentative fix for semantic3 on imported modules and unnecessary template
function definition issue. Please test!
Also change linkage of __interfaceInfos to external (same as __Class, __vtbl,
__init). The other change might make this superfluous.
2009-05-21 10:56:04 +02:00
Tomas Lindquist Olsen
0680e6a3ca Enabled fix for ticket #294 . It will try it's best to let LLVM handle the alignment, and fall back to manual padding when that's not possible. If this causes problems again, we'll have to consistently pad manually using packed structs. 2009-05-15 17:05:35 +02:00
Tomas Lindquist Olsen
ad142b5fda Erm... Revert the rev [1352] change, the original code was correct ... 2009-05-15 15:30:59 +02:00
Tomas Lindquist Olsen
a0678dc9ec Oups, fix assertion condition in disabled code from rev [1351]. 2009-05-14 17:23:55 +02:00
Tomas Lindquist Olsen
b147ecc66d Initial (but disabled) fix for ticket #294 , the actual part that fixes the bug is in a #if 0 block as I'm afraid it will cause regressions. I'm most likely not going to be around tonight, and maybe not tomorrow as well, so I'm pushing it in case someone wants to run some serious testing/investigate the problem noted in llvmhelpers.cpp : realignOffset . 2009-05-14 17:20:17 +02:00
Tomas Lindquist Olsen
f5d635dfc7 Adds explicit alignment information for alloca instructions in general, there's a few cases that still needs to be looked at but this should catch the majority. Fixes ticket #293 . 2009-05-14 13:26:40 +02:00
Tomas Lindquist Olsen
ca39bb4f4d Fixed array operation codegen when used from imported templates. All array operations are now emitted with template linkage. Fixed #270 . 2009-04-29 18:59:39 +02:00
Tomas Lindquist Olsen
617861ead4 Fixed file name in imported mixins containing assertions. 2009-04-29 18:39:59 +02:00
Tomas Lindquist Olsen
95b94935ee Moved special casing of 'assert(this, "null this");' generated statements from !ThisExp into !AssertExp.
Fixed filenames for array bounds errors and probably others, fixes #271 .
2009-04-27 13:30:48 +02:00