Benjamin Kramer
66101517d7
LLVMContext changes up to r77366
2009-07-30 15:25:10 +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
Benjamin Kramer
8576788245
Get rid of USE_METADATA
2009-07-11 14:19:21 +02:00
Christian Kamm
756a2cb2a1
Adjust LDC to work with the LLVMContext LLVM changes.
...
This means we now require a fairly new LLVM revision. I use 75234.
2009-07-10 21:30:02 +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
Frits van Bommel
4158fb474a
Add an llvm::OStream
workalike class for use with Logger::cout()
, with the
...
crucial difference being special handling of `llvm::Type`s so they get printed
by name rather than printing their full representation (which can be positively
*huge*).
This allows re-enabling some logger calls that were disabled due to extreme
verbosity.
2009-06-16 19:31:10 +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 #if
s. The D1 frontend has a Type::nextOf() which just
...
returns `next`.
2009-06-02 18:41:10 +02:00
Robert Clipsham
91ddf6140a
More tweaks.
2009-06-01 18:58:21 +01: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
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
Frits van Bommel
76ae0b0ab6
Fix format-string bugs by adding __attribute__((__format__)) in all applicable
...
places and fixing all warnings my gcc produced.
Among other things, this should fix several segfaults (including one I just
ran into).
2009-05-17 00:15:25 +02:00
Tomas Lindquist Olsen
9beb33770f
Fixed previous aggregate initZ alignment.
...
Added missing IrType::isDelegate method.
2009-05-16 18:37:16 +02:00
Tomas Lindquist Olsen
2e33a6af9f
Added explicit alignment for aggregate __initZ symbols, this is needed for some union types, or the default initializer symbol might be misaligned.
2009-05-16 18:25:01 +02:00
Tomas Lindquist Olsen
c0f2af5afd
Added IrTypeFunction and IrTypeDelegate and eliminated IrDType. This means the Type::ir field can be removed. It's the final part needed for the move to a slightly more sane type system. Now the whole thing just needs to be cleaned up :P
...
Added -v-cg switch, which right now just prints "codegen: module.name (module/name.d)" to stdout, this can really help figuring out where, in some complex build command, things go wrong.
2009-05-16 18:19:52 +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
Frits van Bommel
49a2924823
Update for metadata changes in LLVM trunk.
2009-05-11 11:59:22 +02:00
Tomas Lindquist Olsen
54d9955abc
Added reference to DMD bug for latest dstress "regressions" compile/m/mixin_29_E.d and compile/m/mixin_29_F.d .
2009-05-10 00:50:35 +02:00
Frits van Bommel
5b82f780f8
Allocate objects on the stack if they (a) don't have a destructor, and
...
(b) don't override the delete operator (on top of the regular conditions for
stack allocation that also apply to arrays, structs, etc.).
The "no destructor" clause is not strictly necessary, but calling them at the
right time would be tricky to say the least; it would involve, among other
things, "manually" inserting a try-finally block around anything that might
throw exceptions not caught in the current function.
Note: objects with custom new operators are automatically ignored because they
don't use the regular allocation runtime call, so there's no need to pay special
attention to them.
2009-05-09 00:50:15 +02:00
Tomas Lindquist Olsen
ca4f588c08
Fixed deal breaker bug for more-at-once compilation when any module contained aggregates. Fixes ticket #272 .
2009-05-07 02:10:29 +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
ba38e15f0d
Fixed class default initializers and type generation. Bug #260 is fixed.
2009-04-27 03:40:40 +02:00
Tomas Lindquist Olsen
3bd5cf70c2
Added testcase for overlapping struct default initializer I has missed. Slight tweak of the relevant error message.
2009-04-27 01:43:29 +02:00
Christian Kamm
5b71e2ef81
Fix interface indices. Closes #269 and #266 .
2009-04-26 11:29:30 +02:00
Tomas Lindquist Olsen
73f93d7240
Merge
2009-04-25 18:27:11 +02:00
Tomas Lindquist Olsen
3e882d422b
Fixed struct default initializers.
2009-04-25 18:26:54 +02:00
Christian Kamm
8916f783b7
Revert change to treat bodyless functions in abstract classes as abstract.
...
See DMD bug 2894.
2009-04-25 09:11:32 +02:00
Tomas Lindquist Olsen
f6f12e4241
Added checks for overlapping union initializers, as shown in bug #259 .
2009-04-22 01:18:21 +02:00
Tomas Lindquist Olsen
575038bfbd
Fixed classinfo.interfaces for .. interfaces!
2009-04-21 20:19:53 +02:00
Christian Kamm
522c580647
Do not emit declare or emit a vtbl entry for bodyless functions in abstract classes.
...
Maybe the better fix would be to adjust FuncDeclaration::isAbstract, but there
may be unwelcome sideeffects.
2009-04-19 00:06:23 +02:00
Tomas Lindquist Olsen
134870c873
Disabled resetting types between modules MAO (more at once). Fixes guaranteed MOA compilation segfault.
2009-04-17 17:16:55 +02:00
Tomas Lindquist Olsen
36f3161803
Merge.
2009-04-17 14:48:37 +02:00
Tomas Lindquist Olsen
1c79df3817
Fixed all issues preventing Tango 0.99.8 to compile with `sh build-tango.sh --verbose ldc'.
2009-04-17 14:38:29 +02:00
Frits van Bommel
46565f1adc
Fix nested functions.
...
My last patch was a little over-zealous in passing `undef`, it always passed
`undef` to inner functions expecting a single context frame.
2009-04-17 13:50:01 +02:00
Tomas Lindquist Olsen
c7936c2ace
!ClassInfo instances were not mutable, this is necessary for .classinfo based locking to work. !ModuleInfo generation was commented out as well.
2009-04-17 00:54:20 +02:00
Tomas Lindquist Olsen
9568616e66
Fixed static struct initializers.
2009-04-17 00:36:21 +02:00
Tomas Lindquist Olsen
948202a1a1
Fixed ClassInfo.interfaces. mini/s.d now runs again.
2009-04-16 21:10:51 +02:00
Tomas Lindquist Olsen
0521f8075c
Too strict assertion with generating the interfaceInfosZ symbol. Baseclasses might introduce interfaces.
2009-04-16 21:00:49 +02:00
Tomas Lindquist Olsen
414e58a318
Fixed forward referenced structs.
2009-04-16 20:41:27 +02:00
Tomas Lindquist Olsen
1437bd6b7e
Merge.
2009-04-16 20:31:21 +02:00
Tomas Lindquist Olsen
9a86f9c0b5
Fixed some minitest regressions.
2009-04-16 19:21:30 +02:00
Tomas Lindquist Olsen
5db458d8da
Completed interface implementation. Hopefully that's it for now..
2009-04-16 13:18:56 +02:00
Tomas Lindquist Olsen
bb98d68f64
Now compiles again, and fixed type of the Interface[N] ClassInfo symbol.
2009-04-16 11:01:49 +02:00
Frits van Bommel
c19ab2e539
Unify %.frames_list and %.frame into a single data structure, generalizing r1212
...
to all frames instead of just the outer-most one.
2009-04-15 20:59:19 +02:00
Tomas Lindquist Olsen
37cf5a5789
Added Doxygen file.
...
Completely seperated type and symbol generation. Should fix a lot of bugs, but is not yet 100% complete.
2009-04-15 20:06:25 +02:00
Frits van Bommel
5a04c4e9a1
For the outermost function needing a context frame, use the address of that
...
frame as the nest argument instead of the address of a single-element list
containing only that frame address.
This saves some stack space and reduces memory accesses.
2009-04-13 04:09:08 +02:00