Commit graph

230 commits

Author SHA1 Message Date
Christian Kamm
3b21ae25be Move DeclarationExp code into a helper function so it can call itself for template mixin members. 2008-07-30 09:21:06 +02:00
Christian Kamm
caa61a5523 Error if static array is cast to an array such that oldarraysize % newelemsize != 0. 2008-07-29 12:32:01 +02:00
Tomas Lindquist Olsen
20d429e085 Fixed delegate casts. 2008-07-28 08:05:21 +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
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
Tomas Lindquist Olsen
86a3f53cfe [svn r386] Fixed broken DtoBoolean.
Some code cleanup.
2008-07-15 00:17:03 +02:00
Tomas Lindquist Olsen
27674069e7 [svn r384] Some minor code cleanups. 2008-07-14 21:49:54 +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
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
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
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
37305fb47e [svn r336] Made sure calls within a landing pad area are invokes.
Nested trys still need some consideration.
2008-07-03 22:05:45 +02:00
Tomas Lindquist Olsen
0d160ffc76 [svn r330] Implemented synchronized statements.
Changed the tryfinally handlers to a more generalized EnclosingHandler.
Changed ClassInfoS to be mutable so they can be used as locks.
Added new BB after throw ala return/break etc.
2008-06-28 11:37:53 +02:00
Tomas Lindquist Olsen
03d26e1178 [svn r326] Fixed a bunch of issues with printf's that MinGW32 did not support.
Fixed problems with label collisions when using labels inside inline asm. LabelStatement is now easily reached given its
Identifier, which should be useful elsewhere too.
Enabled inline asm for building the lib/compiler/llvmdc runtime code, fixing branches out of asm makes this possible.
2008-06-27 22:04:35 +02:00
Christian Kamm
b064c794de [svn r325] Removed dead code.
Added license info to code from GDC (David Friedman permitted us to use the files under the Artistic License).
Added asmLabel check to DtoGoto to avoid jumping into inline asm. Doesn't work currently as LabelDsymbol::asmLabel is never set to true.
2008-06-25 23:42:38 +02:00
Christian Kamm
7b37093cff [svn r323] Branching out of inline asm works.
Renamed emit_finallyblocks to DtoFinallyBlocks and moved to llvmhelpers.
Added enclosingtryfinally to AsmBlockStatement, so branches out of asm blocks respect finallys.
Refactored some GotoStatement code into DtoGoto.
2008-06-25 20:39:09 +02:00
Tomas Lindquist Olsen
599f879149 [svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
There was problems with most non basic types...
Added an option to premake so we can do: premake --target gnu --no-boehm
to disable the Boehm GC.
2008-06-23 14:48:42 +02:00
Christian Kamm
0bddb2568f [svn r315] Build full const initializer for static arrays in DtoConstInitializer if necessary. 2008-06-22 21:36:07 +02:00
Tomas Lindquist Olsen
33b9d4348c [svn r312] Changed assert codegen to insert an unreachable terminator after the call to the assert function, which currently calls abort().
Changed array comparison runtime support to pass the array typeinfo instead of the element typeinfo. This allows a cleaner and faster implementation.
2008-06-21 21:16:26 +02:00
Tomas Lindquist Olsen
f3ea671ed6 [svn r311] Fixed: structs no longer output two static typeinfos.
Updated the DtoTypeInfoOf helper a bit after figuring out how it worked.
2008-06-21 17:57:36 +02:00
Tomas Lindquist Olsen
5f247bb394 [svn r310] Fixed a problem with incomplete types and templates in typeinfo code. 2008-06-21 16:22:29 +02:00
Tomas Lindquist Olsen
f8b421d4ac [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
Removed the LLVM stacktrace code from mars.c.
Moved the LLVM based default target detection code from mars.c to llvmhelpers.cpp.
2008-06-21 02:48:53 +02:00
Tomas Lindquist Olsen
4d2797526d [svn r267] Fixed debug info for global variables.
Cleaned up the debug info code in general.
2008-06-11 20:53:26 +02:00
Tomas Lindquist Olsen
8b83eda2a2 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
Did a lot of smaller cleans up here and there.
Replaced more llvm::Foo with LLFoo for common stuff.
Split up tollvm.cpp.
2008-06-09 09:37:08 +02:00