Commit graph

98 commits

Author SHA1 Message Date
Tomas Lindquist Olsen
9bd52922bd Changed the way LDC determines if a template instantiation needs to get a definition, seems to speed up compile times quite a bit in some cases. 2009-02-04 18:48:03 +01:00
Tomas Lindquist Olsen
dc5944df99 Implemented proper support for naked asm using llvm module level asm. Still not 100% complete, but already 1000 times better that what we had before. Don's BignumX86 implementation from Tango (when turned into a standalone unittest) seems to fully work with no changes, and great performance :)
Fixed align N; in asm blocks.

Fixed inreg parameter passing on x86 for ref/out params.

Removed support for lazy initialization of function local static variables, I have no idea why I ever implemented this, it's not in the D spec, and DMD doesn't support it :P

Some of the global variable related changes might cause minor regressions, but they should be easily fixable.
2009-02-03 08:54:57 +01:00
Christian Kamm
f82ca73c76 Casts from interface to class generally need to be dynamic. Fixes #189. 2009-01-25 12:35:11 +01:00
Tomas Lindquist Olsen
637c59a422 more moreatatime fixes 2008-12-09 18:45:25 +01:00
Tomas Lindquist Olsen
827113a0b2 Fixed another moreatatime (as opposed to oneatatime) issue with indexing unresolved class. 2008-12-09 17:14:52 +01:00
Tomas Lindquist Olsen
3c400ff21c Removed error on naked, not fully complete, but I'll be doing more work on it during this Christmas, and some things do work.
Fixed taking delegate of final class method. see mini/delegate3.d.
2008-12-09 14:07:30 +01:00
Tomas Lindquist Olsen
a2bf0796ce Added back a bunch of static's to gen/classes.cpp, it's not superfluous, it makes the functions internal to the compilation unit, and we don't call them anywhere else. 2008-12-09 02:07:24 +01:00
Christian Kamm
c8fdab1715 Add all base interfaces to interfaceMap, not just direct parents.
Removed some superfluous 'static'.
2008-12-07 16:43:20 +01:00
Tomas Lindquist Olsen
2532856f1c Commented some logging that could be '''very''' long, cuts -vv output size of a gtkd gl sample down 1.2GB by 3/4.
Fixed wrong pointer type for multidimension "deep" slicing.
2008-12-04 16:11:09 +01:00
Tomas Lindquist Olsen
879bed7df6 Added CMake option to disable generation of ClassInfo.offTi arrays, defaults to OFF. 2008-12-02 01:44:17 +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
Tomas Lindquist Olsen
8ee1fbca26 Fixed a nasty bug with how interface vtables for class initializers were output, causing some class fields to be skipped.
Fixed a problem in definition of ClassInfos where an invalid constant was potentially used. This needs to be looked into proper as it might happen again in the future.
2008-12-01 04:37:54 +01:00
Tomas Lindquist Olsen
577237e073 Changed some hardcoded offset/alignment for classes in DMD, broke offsets for 64bits.
Changed ClassInfo generation to no longer access the default initializer of ClassInfo, fixes problems with index mismatch.
2008-11-30 20:22:09 +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
dcf3c96f65 Ensure all logging of llvm values/types is only called when -vv is passed 2008-11-29 23:39:04 +01:00
Tomas Lindquist Olsen
d522fef71f Removed use of DMD's toPrettyChars function for providing llvm value names. 2008-11-29 22:37:36 +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
3a2e29d434 merge 2008-11-29 18:28:32 +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
Tomas Lindquist Olsen
f46f865375 Removed KDevelop3 project files, CMake can generate them just fine!
Fixed function literals in static initializers.
Changed alignment of delegates from 2*PTRSIZE to just PTRSIZE.
Changed errors to go to stderr instead of stdout.
Fairly major rewriting of struct/union/class handling, STILL A BIT BUGGY !!!
2008-11-29 21:25:43 +01:00
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