Commit Graph

306 Commits

Author SHA1 Message Date
Christian Kamm
86819d1cef Should only error if array initializer is too long. Too short is ok. 2008-07-26 17:33:49 +02:00
Christian Kamm
907a03a3be Give error messages for invalid casts.
This required passing Loc information to certain functions.
Fixes nocompile/b/bug_cgcs_354_A/B.
2008-07-26 17:19:16 +02:00
Christian Kamm
a278651178 Add error if array initializer has incorrect length. 2008-07-26 15:42:05 +02:00
Christian Kamm
0c9674e952 Make an unresolved global into an error instead of an assert.
Fixes nocompile/alias_28_A/F.
2008-07-26 15:23:15 +02:00
Christian Kamm
b496d03606 Automated merge with http://hg.dsource.org/projects/llvmdc 2008-07-26 15:12:48 +02:00
Tomas Lindquist Olsen
1e87165fe7 Committed merge 2008-07-26 15:09:33 +02:00
Tomas Lindquist Olsen
70f16e36fb Added bitcode filename to very verbose logging.
Fixed -O<n> switches from llvm 2.4.
Removed md5 from the kdevelop project filelist.
2008-07-26 15:02:57 +02:00
Christian Kamm
a5f976ffce Start a new basic block after a continue statement.
Fixes bug_d_irstate_244_A/b.
2008-07-26 15:00:57 +02:00
Christian Kamm
732cdc5766 Fix inline asm FS:4 by writing the displacement directly into the asm instead of using %fs:$0 with an input constraint. 2008-07-26 13:38:25 +02:00
Tomas Lindquist Olsen
100c42bca3 Fixed segfault when using va_arg.
Fixed segfault when accessing function symbols from inline asm.
2008-07-23 20:21:18 +02:00
Christian Kamm
44931493f6 Fixed root cause for Invalid BitCasts. DtoCanLoad continues to return false
for aggregates even though llvm 2.4svn could load them.
2008-07-23 17:56:09 +02:00
Christian Kamm
8f20b1ed00 Introducing opaque type to dmd frontent to be used with certain runtime array
and aa args and returns. There are still some bugs with aas.
2008-07-22 23:06:46 +02:00
Christian Kamm
566eac93fe Get rid of runTimeHack and instead add proper argument info to the frontend
declatation.
2008-07-22 19:24:40 +02:00
Christian Kamm
d54a1347a4 Do only link to libpthread, libm and libdl on Linux. 2008-07-21 20:12:24 +02:00
Tomas Lindquist Olsen
d583262c98 [svn r394] Fixed the new DtoNullValue function 2008-07-15 15:16:56 +02:00
Christian Kamm
625f28814d [svn r393] Started implementation for DtoNullValue. 2008-07-15 14:53:16 +02:00
Christian Kamm
1486f29abb [svn r391] Fix classes nested inside functions for real. 2008-07-15 10:23:50 +02:00
Christian Kamm
e69f92b613 [svn r390] Make the zero value used when no nested context was created of the correct type.
Fixes run/class_06.
2008-07-15 08:44:08 +02:00
Christian Kamm
e846017e80 [svn r388] ClassInfo declaration could fail if base classdecl hadn't been resolved.
Use ForceDeclare on the class decl instead of declaring class info only.
2008-07-15 08:17:43 +02:00
Tomas Lindquist Olsen
86a3f53cfe [svn r386] Fixed broken DtoBoolean.
Some code cleanup.
2008-07-15 00:17:03 +02:00
Christian Kamm
25dea7a16e [svn r385] Fix lvalue cast problems with -= and friends.
Fix complex DtoBoolean.
2008-07-14 22:48:03 +02:00
Tomas Lindquist Olsen
27674069e7 [svn r384] Some minor code cleanups. 2008-07-14 21:49:54 +02:00
Christian Kamm
ef2bdb9c1c [svn r382] In CastExp, after the cast to CastExp.to force the type to be CastExp.type.
This is used for c.im for instance, where the cast is to idouble but type is double.
2008-07-14 19:17:25 +02:00
Christian Kamm
0d2ca74dac [svn r381] Allow concatenating with static arrays. 2008-07-14 17:26:58 +02:00
Christian Kamm
7e7441a5f8 [svn r380] Improve complex number support. 2008-07-14 17:22:43 +02:00
Christian Kamm
4d24676beb [svn r379] Fix slice assigns of the form T[] = T when T is a typedef.
Fixes run/a/array_initialization_20_B, D, F, H.
2008-07-14 12:39:23 +02:00
Christian Kamm
b0b530ea42 [svn r378] Make some errors fatal to prevent segfaults. Error instead of assert on missing label.
Fixes: nocompile/
finally_02, 03, 07, 08
goto_16_A, 16_B, 12, 13, 14
2008-07-14 12:11:30 +02:00
Christian Kamm
bcc4cfdea4 [svn r377] The previous check was too strict, it completely disallowed gotos within finally blocks. This reenables them as long as they don't cross a finally boundary. 2008-07-14 12:00:24 +02:00
Christian Kamm
c1fbcd9942 [svn r376] Fix bug with finally blocks and labels. The labels would get emitted multiple times and conflict.
It is now possible to add label scopes in IrFunction and all labels names will be prefixed accordingly.

Also disallow goto into finally blocks.

Fixes nocompile/finally_02 and others.
2008-07-14 11:48:55 +02:00
Christian Kamm
65be990012 [svn r375] Make DeclarationExp reuse storage if already allocated. 2008-07-14 11:47:03 +02:00
Christian Kamm
7e7ac3a6f7 [svn r374] Move label target basic block from AST to IRFunction. This is a first step to allowing labels to be emitted multiple times. (for instance within finally blocks) 2008-07-14 11:07:15 +02:00
Christian Kamm
80ba763fda [svn r373] Labels inside tryfinally statements are not wrong in principle, so remove the assert. 2008-07-14 10:01:09 +02:00
Tomas Lindquist Olsen
45e8999c88 [svn r372] Fixed extern(C++) handling now same as DMD, which is to treat it like extern(C).
Fixed a problem in resolving struct types where the size of elements might not yet be known. Switched to using DMD size() instead
of LLVM ABI size (TargetData).
2008-07-14 03:23:43 +02:00
Tomas Lindquist Olsen
ee5d84a1fa [svn r371] Fixed array init was still broken for immediate slices and complex values. 2008-07-14 01:03:53 +02:00
Christian Kamm
c2697dbce0 [svn r369] Fix nested classes when nestedVar is not generated. 2008-07-13 21:16:40 +02:00
Tomas Lindquist Olsen
dbd640a3dc [svn r368] Fixed custom class allocators with arbitrary user arguments. Closes #25
Removed some dead code.
Started on a more generalised approach to call misc. D functions.
2008-07-13 20:49:10 +02:00
Tomas Lindquist Olsen
c4982165ba [svn r366] Fixed identity exprs for structs was comparing addresses, not content! 2008-07-13 04:27:02 +02:00
Tomas Lindquist Olsen
a4e4f34a34 [svn r365] Implemented raw struct equality comparison, uses C memcmp.
Renamed DtoDelegateCompare to DtoDelegateEquals, for consistency with the other equality helpers.
2008-07-13 04:11:08 +02:00
Tomas Lindquist Olsen
d1e41f611e [svn r361] Removed some dead code. 2008-07-13 02:04:25 +02:00
Tomas Lindquist Olsen
85c1b42b1b [svn r360] Another mostly rewrite of DtoArrayInit. Should be much more robust now, and probably faster code generated for the most common cases too!
Fixed issues with slice initialization (!!!) of multidimensional static arrays.
Attempt to fix issue with referencing nested 'this' pointers introduced in DMD 1.033 merge.
2008-07-13 01:29:49 +02:00
Christian Kamm
c67753508b [svn r359] Try to fix DtoArrayInit. Unfinished, breaks for arrays of primitive types. 2008-07-12 23:56:56 +02:00
Tomas Lindquist Olsen
832504e5d7 [svn r357] Merged DMD 1.033 2008-07-12 19:38:31 +02:00
Tomas Lindquist Olsen
fc6e0cfc65 [svn r356] Fixed problem with array length assignment introduced in [355] 2008-07-12 17:04:36 +02:00
Christian Kamm
717d52d4f0 [svn r355] Get rid of IRState::exps and topexp. 2008-07-12 15:43:13 +02:00
Christian Kamm
485b638272 [svn r352] Implement SwitchErrorStatement. Fixes #52. 2008-07-11 21:06:39 +02:00
Tomas Lindquist Olsen
8c48f86f0a [svn r350] Fixed incorrect function types for lazy arguments. looks like lazy arguments have never even worked :o well.. now they should. 2008-07-11 01:34:04 +02:00
Tomas Lindquist Olsen
521de1a47e [svn r349] Fixed problems with static arrays of void as well as a static arrays with zero length.
Fixed issues with DMD generated assert statements when using class invariants, generally due to incomplete ASTs.
Removed some dead code.
Added a few comments.
2008-07-11 00:17:00 +02:00
Christian Kamm
bace4dd0e7 [svn r348] Switch on class invariants (except in release mode).
Generate correct member for classInvariant in classinfo struct.
2008-07-10 22:00:27 +02:00
Christian Kamm
6a45ce2474 [svn r346] Fixed #55 - llvmdc can link as fast as dmd now!
Made runtime to compile to native by default. Changed linker.cpp to link in native runtime library.
This change requires a runtime rebuild as well as a new symbolic link in lib/ to tango/lib/libtango-base-llvmdc-native.a.
2008-07-10 19:38:34 +02:00
Tomas Lindquist Olsen
9c28c0263a [svn r345] Fixed the new moduleinfo stuff to have consistent symbol names with the D style. 2008-07-10 00:13:09 +02:00