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
Frits van Bommel
751f528969
Implement -nested-ctx=hybrid
2009-04-12 20:23:00 +02:00
Tomas Lindquist Olsen
9c4b2b4036
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
2009-04-03 16:34:11 +02:00
Tomas Lindquist Olsen
4df1f9be35
updated ir/irtype.h guard name
2009-04-03 14:54:17 +02:00
Tomas Lindquist Olsen
c6e9f7f9e2
Moved ir/irtype.* into ir/irdtype.*.
...
Renamed IrType to IrDType, analogous to IrDSymbol.
2009-03-31 20:21:28 +02:00
Tomas Lindquist Olsen
740cdaa588
Fixed forward reference problem in struct methods on x86-64.
2009-03-28 09:00:32 +01:00
Tomas Lindquist Olsen
06a29342d3
Added missing new files.
2009-03-27 23:24:47 +01:00
Tomas Lindquist Olsen
be3bfbff5d
Fixed problems introduced by previous commits that prevented Tango from compiling.
2009-03-27 23:17:04 +01:00
Tomas Lindquist Olsen
ec986231e5
Eliminated the need for resolve, declare, const-init and define lists to drive code generation.
2009-03-27 21:50:32 +01:00
Tomas Lindquist Olsen
daef67acc3
Changed use of toObjFile to a new codegen method.
...
More versioning of DMD specific codegen code.
2009-03-27 17:54:27 +01:00
Tomas Lindquist Olsen
c42c90ea80
* Moved ir/irsymbol.cpp/h into ir/irdsymbol.cpp/h.
...
* Added #if IN_DMD versioning around DMD backend specific code in the D1 frontend, D2 is currently broken.
* All part of a greater cleanup scheme.
2009-03-26 20:45:53 +01:00
Tomas Lindquist Olsen
367b8da8f4
Moved IRTargetScopeS from IRState into IrFunction, fixes #240 .
2009-03-26 18:46:21 +01:00
Christian Kamm
ed9591d81f
Make IrFuncTy a member of TypeFunction. Reset between modules compiled in the
...
same LDC call.
2009-03-07 14:25:30 +01:00
Frits van Bommel
5af82ee8d3
Fix a bug in the X86 ABI. The size of a struct is different from the size of a
...
pointer to that struct...
2009-03-06 21:15:13 +01:00
Frits van Bommel
27d3ab4546
Some calling convention work for x86-64:
...
- Implement x86-64 extern(C), hopefully correctly.
- Tried to be a bit smarter about extern(D) while I was there.
Interestingly, this code seems to be generating more efficient code than
gcc and llvm-gcc in some edge cases, like returning a `{ [7 x i8] }` loaded from
a stack slot from an extern(C) function. (gcc generates 7 1-byte loads, while
this code generates a 4-byte, a 2-byte and a 1-byte load)
I also added some changes to make sure structs being returned from functions or
passed in as parameters are stored in memory where the rest of the backend seems
to expect them to be. These should be removed when support for first-class
aggregates improves.
2009-03-06 16:00:47 +01:00
Tomas Lindquist Olsen
65ba1d4d88
Updated ABI handling to be more flexible with regard to reusing lvalues and allocating fewer temporaries.
2009-03-04 17:24:25 +01:00
Tomas Lindquist Olsen
ca41cb29d9
Added some documentation for the IrFuncTyArg structure, which is key to writing ABI transformations.
2009-03-04 16:13:16 +01:00
Tomas Lindquist Olsen
5dbe3ee8e2
Abstracted more (most) ABI details out of the normal codegen.
2009-03-03 02:51:21 +01:00
Christian Kamm
7c93355672
Mostly rewrite debug info generation in terms of llvm/Analysis/DebugInfo.h.
...
Add getCompilationModule to Dsymbol and fix template compile unit decision code.
Runtime compiles with -g again.
2009-02-08 16:50:22 +01:00
Tomas Lindquist Olsen
fc480b7fd8
SWITCHED TO LLVM 2.5 !
...
Applied patch from ticket #129 to compile against latest LLVM. Thanks Frits van Bommel.
Fixed implicit return by asm block at the end of a function on x86-32. Other architectures will produce an error at the moment. Adding support for new targets is fairly simple.
Fixed return calling convention for complex numbers, ST and ST(1) were switched around.
Added some testcases.
I've run a dstress test and there are no regressions. However, the runtime does not seem to compile with symbolic debug information. -O3 -release -inline works well and is what I used for the dstress run. Tango does not compile, a small workaround is needed in tango.io.digest.Digest.Digest.hexDigest. See ticket #206 .
2009-02-08 05:26:54 +01:00
Tomas Lindquist Olsen
7d2a0a84a7
Removed some dead code.
...
Fixed assertion filenames for imported template instances. Fixes #152 .
2009-02-04 02:10:23 +01:00
Christian Kamm
ba869c7014
Move adding IrSymbols to global list out of assert.
2009-01-08 15:31:13 +01:00
Tomas Lindquist Olsen
2788a2a0f1
Made ClassInfo.interfaces generation consistent with DMD, fixes #134
...
Removed unneeded includes from dmd/attrib.c
2008-12-01 18:34:02 +01:00
Christian Kamm
f14d97d786
Move storage of final vtbl from BaseClass to IrInterface: BaseClass instances are shared!
...
Always use the target's irstruct interfaceMap when building the const initializer.
Tango helloworld works again.
2008-11-30 11:25:40 +01:00
Tomas Lindquist Olsen
5d1366d27f
Removed DtoConstFieldInitializer, it's no longer needed and was buggy.
2008-11-29 21:26:50 +01:00
Tomas Lindquist Olsen
4da2cf066e
Fixed some problems with the addZeros forward declarations having type mismatches.
2008-11-29 20:57:52 +01:00
Tomas Lindquist Olsen
13e0399ab0
Changed aggregate field initializers to be created lazily, fixes problem with static void arrays in aggregates.
2008-11-29 18:28:17 +01:00