Commit graph

105 commits

Author SHA1 Message Date
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
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
36f6ebc77f - Versioned Expresssion::toElem with #if IN_DMD/IN_LLVM.
- Eliminated the DLRValue DValue.

- Implemented proactive handling of l-value CastExpS.

- Minor tweak in runtime memory.d .
2009-03-28 05:00:43 +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
fdecec122a Disabled some extensive LLVM value logging with -vv that dramatically increases -vv output length for little value. 2009-03-03 17:21:35 +01:00
Christian Kamm
0676cf018d Make sure debug info uses the right compilation units - in particular the
current cu if a symbol is a template instance. Fixes #211.
2009-02-14 21:18:47 +01:00
Christian Kamm
789eefd943 Switch some getModule to getCompilationModule to make sure templates are
emitted in the right module.
2009-02-08 18:51:32 +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
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
Christian Kamm
12a21b1397 Fix #153. Factor out common code in StructLiteralExp::to(Const)Elem. 2008-12-30 11:42:01 +01:00
Tomas Lindquist Olsen
637c59a422 more moreatatime fixes 2008-12-09 18:45:25 +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
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
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
049e24cef8 Error instead of assert when trying to build a default initializer for void[n]. 2008-11-29 12:28:10 +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
4d7af01374 Fix double field toObjFile for structs with AttribDecls. 2008-10-25 22:07:20 +02: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
Tomas Lindquist Olsen
ecd8a2ac07 Support structs that are merely a forward reference. See mini/forwdecl1.d 2008-10-06 14:06:55 +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
8e9b957bce Complex number should now follow the D ABI on x86. They're also treated as first class values now. Big change. 2008-09-09 16:49:47 -07: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
Tomas Lindquist Olsen
885a805d26 Fixed problem where global variables did not resolve type before using it. 2008-08-01 21:54:40 +02:00
Tomas Lindquist Olsen
07cfb67178 Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Reworked the LLVMDC specific pragmas.
2008-08-01 00:32:06 +02:00
Tomas Lindquist Olsen
905ca019dd Added type param to DVarValue as DMD sometimes overrides the type of the VarDeclaration.
Added support for align(1)/packed structs, other alignments are still ignored.
Fixed some problems with accessing lazy arguments.
2008-07-30 10:12:55 +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
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
832504e5d7 [svn r357] Merged DMD 1.033 2008-07-12 19:38:31 +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
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
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
Christian Kamm
0fba6312c2 [svn r189] moving IR data back into DMD frontend nodes 2008-05-06 07:56:03 +02:00
Tomas Lindquist Olsen
d3b57eaf60 [svn r187] Fixed missing definitions of instances of imported struct template declarations. 2008-05-06 05:25:53 +02:00
Tomas Lindquist Olsen
93a632c7c2 [svn r185] Fixed broken nested classes with data members, did DMD change the class layout? tango.text.Regex now compiles.
Commented some of the *very* verbose logging for -vv option.
2008-05-06 03:07:21 +02:00
Christian Kamm
91ae70e969 [svn r173] moved IR state previously stored in Type into IrType and a Type->IrType map; fixes #7 2008-05-01 13:32:08 +02:00
Christian Kamm
24726394f6 [svn r172] moving all IR state previously stored in Dsymbol into IrDsymbol and a Dsymbol->IrDsymbol map 2008-05-01 13:05:53 +02:00
Tomas Lindquist Olsen
ecd91a48f2 [svn r155] Fixed a bunch of linkage problems (especially with templates) 2008-03-24 19:43:02 +01:00
Tomas Lindquist Olsen
17247d63e7 [svn r141] fixed more problems with classinfo
moved more IR state out of the AST classes
2008-01-18 16:42:16 +01:00
Tomas Lindquist Olsen
5652546986 [svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though 2008-01-17 03:15:12 +01:00
Tomas Lindquist Olsen
4505b9b006 [svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
In particular, assertions has been fixed to include file/line info, and much more!
2008-01-14 05:11:54 +01:00
Tomas Lindquist Olsen
b15b3484c8 [svn r136] MAJOR UNSTABLE UPDATE!!!
Initial commit after moving to Tango instead of Phobos.

Lots of bugfixes...

This build is not suitable for most things.
2008-01-11 17:57:40 +01:00
Tomas Lindquist Olsen
ea362d8402 [svn r125] Renamed/moved a few backend member inside DMD structures for consistency.
Unit tests are now implemented.
2007-11-27 03:09:36 +01:00