Commit graph

227 commits

Author SHA1 Message Date
Christian Kamm
497c7e87df Do put zero in vtable initializer for function without body in abstract class. 2008-11-29 17:13:38 +01:00
Christian Kamm
049e24cef8 Error instead of assert when trying to build a default initializer for void[n]. 2008-11-29 12:28:10 +01:00
Christian Kamm
6efc9a3324 Get rid of DtoBoolean - use DtoCast(... Type::tbool) instead.
Fixed some casts to bool that were using truncation.
2008-11-22 18:35:52 +01:00
Tomas Lindquist Olsen
c4c1c1d72e Added initial D2 support, D2 frontend and changes to codegen to make things compile. 2008-11-11 01:38:48 +01:00
Tomas Lindquist Olsen
6cf5ca6aba Removed warnings on ignored aligns. Only do aligment on packed structs, align(1) struct Packed { ... }
Changed the way struct/class fields are added, first small part of cleaning up these...
Make struct/class/union fields aware of any anonymous struct/union they might be part of, not yet really useful, but part of getting better union support.
2008-10-28 15:41:09 +01:00
Christian Kamm
cfcda83291 Change _d_newclass into _d_allocclass. Add initialization to ClassInfo.create. 2008-10-26 14:12:03 +01:00
Tomas Lindquist Olsen
379bd9c330 Fixed weird struct problem from downs, see mini/compile_structs1.d
Rewrote DtoIndexStruct/Class , the old implementation were way too complex for what we really need now - since the DotVar changes.
2008-10-14 15:35:49 +02:00
Christian Kamm
4d610bcd7e Fix odd interfaceInfoType bug. 2008-10-08 20:28:59 +02:00
Tomas Lindquist Olsen
e109025c00 Removed some checks for abstract llvm types that were too strict, a 'opaque* null' is a valid initializer... when structs in D can be just a forward reference. 2008-10-06 14:37:00 +02:00
Christian Kamm
b3d4bc83f8 Move check for access of context for nested class from backend into frontend. 2008-10-02 23:12:19 +02:00
Tomas Lindquist Olsen
bcafbe169d Wrapped all the most potentially expensive logging calls in a conditional to only do work when actually requested.
Commented some logging calls that could potentially write out many megabytes of type dumps.
2008-10-01 18:32:31 +02:00
Tomas Lindquist Olsen
04f7c18f95 Removed some excessive llvm type logging 2008-09-28 15:22:39 +02:00
Christian Kamm
e4ee8907cb Fix line number for error when trying to new a nested class without a context. 2008-09-12 12:48:16 +02:00
Tomas Lindquist Olsen
7ffb43fdc6 Fixed uncaught, invalid use of nesting introduced in rev [498] 2008-08-13 17:11:03 +02:00
Tomas Lindquist Olsen
9d7f16b967 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Reimplemented support for nested functions/class using a new approach.
Added error on taking address of intrinsic.
Fixed problems with the ->syntaxCopy of TypeFunction delegate exp.
Removed DtoDType and replaced all uses with ->toBasetype() instead.
Removed unused inplace stuff.
Fixed a bunch of issues in the runtime unittests, not complete yet.
Added mini tests.
2008-08-10 08:37:38 +02:00
Christian Kamm
8362b86c5a Move AllocaInst creation into DtoAlloca helper. Will enable special zero-init of fp80 reals' padding. 2008-08-05 19:28:19 +02:00
Christian Kamm
99f1cfef36 Error instead of assert on unimplemented interface functions. 2008-07-29 10:55:58 +02:00
Christian Kamm
3db56c7a17 Error message for calling a function with a missing 'this' arg. 2008-07-29 10:29:52 +02:00
Tomas Lindquist Olsen
8c98499193 Fixed issue with internal real representation, incorrect for non x86-32 architectures.
Cleaned up CallExp::toElem, moved implementation to tocall.cpp providing a single procedure to call arbitrary D functions fairly easily.
2008-07-28 02:11:34 +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
Tomas Lindquist Olsen
27674069e7 [svn r384] Some minor code cleanups. 2008-07-14 21:49:54 +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
832504e5d7 [svn r357] Merged DMD 1.033 2008-07-12 19:38:31 +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
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
86d299a641 [svn r328] Fixed an issue with interfaces where the vtable type of a interface implemented could be invalid. Fixes several tango modules like, FileStream, ServerSocket
and most tina cluster modules :)
2008-06-28 03:45:18 +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
870aae3454 [svn r313] Fix class initializer size regression introduced in [305].
Fixes memory_management_05 and odd_bug_15_A.
2008-06-22 13:23:28 +02:00
Tomas Lindquist Olsen
5647598da9 [svn r306] Fixed: it's now possible to compile and link llvmdc with MinGW32 and msys on Win32 :D I tried it myself ;) Building the runtime still needs some work, but it's a step in the right direction. 2008-06-21 03:14:49 +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
928f7d4de5 [svn r296] Removed: the 'suite' dir, it never took off!
Fixed: foreach statement, key-type checks were buggy.
Fixed: setting LLVMDC versions on the command line is now an error.
Fixed: array compare runtime had incorrect param attrs on call.
Fixed: index expressions on dynamic array slices w/o storage was broken.
Fixed: scope classes had incorrect finalization in some cases.
Fixed: when outputting !ClassInfoS !OffsetTypeInfoS, static class members were trying to be included, crashing the compiler.
Fixed: calling LLVMDC with -inline but not any -O option caused assertion failure.
Changed: the runtime now uses a single interface to "get" to !TypeInfoS, part of eliminating duplicate !TypeInfo codegen.
2008-06-19 17:30:32 +02:00
Tomas Lindquist Olsen
ab92e1230b [svn r292] Fixed: string switch was broken in several ways.
Fixed: TypeInfo_Typedef.next was incorrect (return base of base instead of just base).
Fixed: ClassInfo offset type info (offTi) had invalid offsets.
2008-06-18 21:31:05 +02:00
Tomas Lindquist Olsen
e1aa043a81 [svn r289] Fixed: right shift >> was broken for unsigned types.
Fixed: debug info for classes now started.
2008-06-15 18:52:27 +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
Tomas Lindquist Olsen
d03c3a7757 [svn r233] Added: -oq command line option for writing fully qualified object names.
Added: started support for x86 80bit floating point.
Changed: aggregates passed by value now use the llvm 'byval' parameter attribute, also lays ground work for
using other attributes.
Changed: eliminated a lot more std::vectorS, these showed up pretty much at the top when profiling!
Changed: performed other misc. cleanups.
Changed: halt expression now call the new llvm trap intrinsic instead of an assert(0).
Changed: dstress suite now passes -O0 by default, this only eliminates unreferenced globals, which speeds up
linking quite a bit.
2008-06-05 06:38:36 +02:00
Tomas Lindquist Olsen
b4bb3aaec4 [svn r229] Updated the object.d implementation to the latest Tango.
Fixed a bunch of the built-in typeinfos for arrays, they did not inherit TypeInfo_Array.
Applied patch to tango/text/convert/Layout.d by fvbommel, closes #47 .
Cleaned up some type code.
Replaced uses of llvm::Type with LLType (a typedef), same for Value and Constant.
Fixed a few cases where typeinfo for user structs could be emitted multiple times, seems to still be some cases of this :/
2008-05-30 19:32:04 +02:00
Tomas Lindquist Olsen
a954f06e90 [svn r226] Fixed: deleting interface.
Removed: unused util function for calling class destructors.
2008-05-14 02:00:23 +02:00
Tomas Lindquist Olsen
19748f09ec [svn r225] Fixed: delete expressions no longer use llvm's free instruction, which crashes on a GC provided pointer. 2008-05-14 01:22:40 +02:00
Tomas Lindquist Olsen
3365b4c02f [svn r221] Update: Switched to the 2.3 LLVM svn branch, http://llvm.org/svn/llvm-project/llvm/branches/release_23 .
Fixed: Implemented volatile statements. Uses the LLVM memory barrier intrinsic, closes #21 .
2008-05-13 17:58:11 +02:00
Tomas Lindquist Olsen
c571bf0f70 [svn r217] Updated: the rebuild profiles.
Fixed: way to find class data fields was too strict type wise.
Fixed: foreach resulting in an implicit delegate could fail.
2008-05-12 22:44:25 +02:00
Christian Kamm
94e4a5b5a1 [svn r215] fix for empty class vtbl 2008-05-12 21:08:33 +02:00
Tomas Lindquist Olsen
9f3be435b0 [svn r209] Fixed: exotic array to pointer casts were broken.
Changed: classes now have opaque vtables.
2008-05-12 18:44:11 +02:00
Christian Kamm
7c78e3665b [svn r208] const init interface vtbls to nonzero values only for nonabstract classes 2008-05-12 18:22:55 +02:00
Tomas Lindquist Olsen
f1c26350ca [svn r206] Fixed some interfaceInfo related issues, closes #44 2008-05-12 14:32:29 +02:00
Tomas Lindquist Olsen
24bd9034c3 [svn r193] Fixed: abstract classes implementing interfaces now output proper Interface info arrays. (null vtables).
Did a little renaming of delegate utils.
2008-05-07 04:45:51 +02:00
Christian Kamm
0fba6312c2 [svn r189] moving IR data back into DMD frontend nodes 2008-05-06 07:56:03 +02:00