Commit Graph

800 Commits

Author SHA1 Message Date
Tomas Lindquist Olsen
ba38e15f0d Fixed class default initializers and type generation. Bug #260 is fixed. 2009-04-27 03:40:40 +02:00
Frits van Bommel
664c2c333e Remove a bit of code duplication. 2009-04-26 20:36:53 +02:00
Frits van Bommel
5d63aeaed9 Fix a logic bug. 2009-04-26 20:31:48 +02:00
Christian Kamm
17dbddfe41 Force 'fast' compilation when debug info is requested. LLVM trunk seems to
skip debug info for non-fast compilation.
2009-04-26 18:21:07 +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
Frits van Bommel
83dda319ae Add #include "gen/llvm-version.h" to files that use the macro it defines... 2009-04-24 16:47:42 +02:00
Tomas Lindquist Olsen
687395cda6 Rewrote runtime struct literal codegen. 2009-04-22 03:08:28 +02:00
Tomas Lindquist Olsen
575038bfbd Fixed classinfo.interfaces for .. interfaces! 2009-04-21 20:19:53 +02:00
Tomas Lindquist Olsen
4567a55f7f Fixed emitting declarations nested inside interfaces. 2009-04-21 19:32:22 +02:00
Christian Kamm
f6772bd600 Add forgotten null check. 2009-04-21 19:17:29 +02:00
Christian Kamm
0e6364a158 Automated merge with http://hg.dsource.org/projects/ldc 2009-04-21 18:57:29 +02:00
Tomas Lindquist Olsen
b3db60cbda Merge. 2009-04-21 17:54:43 +02:00
Frits van Bommel
0e8216fbd6 Remove some logging I didn't mean to commit. 2009-04-20 00:04:35 +02:00
Frits van Bommel
21f273671a Fix a problem which occurred when a function type was forward-referenced by
parameter types.

This was intended to fix the following test case:
{{{
  void delegate(Hit) dg;
  struct Hit { void delegate(Hit) a; }
}}}
which ChristianK reduced from a problem downs had on IRC.

It also seems to fix mini/compile_delegate.d (which turns out to be quite
similar, but produced a different error message).
2009-04-19 23:15:03 +02:00
Frits van Bommel
e05b960bbe No need for temporary alloca's here, use a phi node instead. 2009-04-19 19:28:10 +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
Frits van Bommel
081efcbb7d Copy alloca'd parameters referenced by nested functions to the nesting frame. 2009-04-18 00:34:20 +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
Frits van Bommel
0262a6ec8f Use 'undef' instead of null for unneeded contexts. 2009-04-17 03:47:56 +02:00
Tomas Lindquist Olsen
f5ce8eda1d Resolve all base classes, including interfaces (!) before resolving the class itself. 2009-04-17 03:01:43 +02:00
Tomas Lindquist Olsen
3d9598d854 Merge with rev [1221] 2009-04-17 01:19:03 +02:00
Frits van Bommel
33eb3133f3 Unbreak nested naked functions. 2009-04-17 01:14:35 +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
803fbf4882 Make !TypeInfo output lazy unless we need to provide full definitions in general. 2009-04-16 22:20:26 +02:00
Tomas Lindquist Olsen
e01917bc0d Make typeinfo for struct 2009-04-16 22:19:36 +02:00
Tomas Lindquist Olsen
8feabfc5c6 Make sure aggregates are resolved before outputting their debug info. 2009-04-16 21:15:42 +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
02466de996 Removed invalid assertion. 2009-04-16 20:30:30 +02:00
Tomas Lindquist Olsen
9a86f9c0b5 Fixed some minitest regressions. 2009-04-16 19:21:30 +02:00
Frits van Bommel
7782d80919 Fix typo in comment 2009-04-16 12:01:28 +02:00
Frits van Bommel
5ea141e919 Tweak some optimizations.
Delegates passed to inlined functions now also stand a chance of being inlined.
This should make opApply as efficient as a regular loop, as long as both opApply
and the foreachbody are eligible for inlining; which is to say most non-virtual
opApply invocations will likely get fully inlined now.
(Note: above requires -O2 -enable-inlining or -O3)
2009-04-16 11:58:43 +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
1ef9941daf Name some types. 2009-04-15 21:37:01 +02:00
Frits van Bommel
8c3cc1467f Remove 'noalias' and 'nocapture' from %.nest_arg. They no longer apply now that
it may point to a struct containing variables from outer functions.
2009-04-15 20:59:21 +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
c44c52296f Give all symbols nested in functions internal linkage, unless it's one of the
other special cases.
(for example: this shouldn't be done if the symbol in question is also nested
in a template; such symbols should get template-like linkage)
2009-04-13 16:16:03 +02:00
Frits van Bommel
376a825075 Fix a bug in nested context code that occured when calling a function nested in
the outermost scope with a context frame from a function using a more nested
context frame.
2009-04-13 12:19:18 +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
Frits van Bommel
cc492ecc82 Merge 2009-04-12 22:22:15 +02:00
Frits van Bommel
071bad95dc Add some alignment info where LLVM might otherwise be more pessimistic.
In particular, %.nest_arg is always aligned even though it's bitcast from i8*.

Pointers in vtables are also guaranteed to be stored at aligned addresses.
2009-04-12 21:56:43 +02:00
Frits van Bommel
751f528969 Implement -nested-ctx=hybrid 2009-04-12 20:23:00 +02:00
Christian Kamm
893e17c259 Simplify array casts and implement dyn array -> static array. 2009-04-12 19:56:03 +02:00
Frits van Bommel
8820024070 Add an option to change the way nested variables are handled.
Only one value is implemented, which is the old way.
2009-04-12 16:22:21 +02:00