Commit graph

86 commits

Author SHA1 Message Date
Tomas Lindquist Olsen
e0972b0793 Fixed ModuleInfo generation to no longer use the ModuleInfo class' default initializer for types/defaults, it's unsafe as initializers don't necesarily match the "formal" type. There might be explicit padding.
Changed -g switch to emit DW_LANG_D debug info, make demangling work with a patched GDB, still more work to do for full support of D's Dwarf extensions.
Added getNullValue helper method.
2008-12-01 02:10:16 +01:00
Tomas Lindquist Olsen
8553fc9aa0 Fixed ModuleInfo patch check, failed on 64bit 2008-11-30 20:41: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
Tomas Lindquist Olsen
d077bbc5e6 D2: Fixed global constants not initialized until module constructor. 2008-11-12 05:40:31 +01:00
Tomas Lindquist Olsen
582deb9827 D2 changes!
Removed druntime from the repository again.. Sorry :/
Updated the druntime port a bit, now requires druntime from trunk.
Added info in runtime/README on how to get druntime from trunk.
Added patch to add LDC support to druntime.
Removed some debug logging from D2 builds.
Fixed broken typeinfo for const/invariant in D2.
2008-11-12 07:22:05 +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
Christian Kamm
16b38a7fef Fix compile-time warnings. Adjust include in d-asm-i386. 2008-11-03 12:35:29 +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
Tomas Lindquist Olsen
6b9e85df48 Attempt at getting LLVM to provide a proper target data layout. Should assert now if things are borked.
Added untested support for Thumb target.
2008-10-27 17:37:34 +01:00
Tomas Lindquist Olsen
f89592b354 Nested access to with statement should work now. fixes #105 2008-10-27 01:40:47 +01:00
Tomas Lindquist Olsen
fdc172377e Fixed tuple fields, thanx downs 2008-10-27 01:11:41 +01:00
Tomas Lindquist Olsen
5ed0ab3ab8 Commented that codegen: <modulename> printf ... 2008-10-23 19:42:55 +02:00
Tomas Lindquist Olsen
a52f0330d0 Implemented first class delegates. closes #101 2008-10-22 21:50:08 +02:00
Tomas Lindquist Olsen
f7ea1da010 Removed TypeOpaque from DMD.
Changed runtime functions taking opaque[] to void[].
Implemented proper type painting, to avoid "resizing" array casts in runtime calls that previously took opaque[].
Implemented dynamic arrays as first class types, this implements proper ABI for these types on x86.
Added dwarf region end after call to assert function, fixes some problems with llvm not allowing this to be missing.
Reverted change to WithStatement from rev [704] it breaks MiniD, mini/with2.d needs to be fixed some other way...
Fixed tango bug 1339 in runtime, problem with _adReverseChar on invalid UTF-8.
Disabled .bc generation in the compiler runtime part, genobj.d triggers some llvm bug when using debug info. the .o seems to work fine.
2008-10-22 14:55:33 +02:00
Christian Kamm
6c532ac149 Hopefully sensible command switch handling. Changed default ext to .o on Windows. 2008-10-16 22:07:02 +02:00
Christian Kamm
8f14246bef Fixed bug with generated functions having wrong calling conventions. Thanks downs. 2008-10-15 20:22:18 +02:00
Tomas Lindquist Olsen
f15b115ee9 Started changing target triple stuff, part of fixing #97 2008-10-13 17:28:39 +02:00
Christian Kamm
bc39d73425 Allow output of only bc, ll, or s by making -of set the output type depending
on the extension.
2008-10-13 10:58:00 +02:00
Christian Kamm
d82c8068a3 Always run SimplifyCFG to workaround LLVM bug 2613. 2008-10-12 15:33:14 +02:00
Christian Kamm
b413b9aa54 Emit stub debug info for generated functions to work around LLVM bug 2172. 2008-10-12 14:38:55 +02:00
Christian Kamm
6cb213badf Only allocate the module file name once. Fixes #90. 2008-10-12 10:35:16 +02:00
Christian Kamm
ee407e597a Link using gcc instead. 2008-10-11 21:21:21 +02:00
Christian Kamm
1bfc0316aa Make ldc call gcc to assemble. 2008-10-11 20:00:36 +02:00
Christian Kamm
73d7a299c9 Disable bc output by default. Remove -dis. Add -output-bc, -output-ll, -output-s.
Call to gcc to convert assembly to object file still required.
2008-10-11 13:07:59 +02:00
Christian Kamm
3e4bb69ef3 Move to separate function and cleanup. 2008-10-11 11:41:56 +02:00
Christian Kamm
7b20402e0b Add basics for direct assembly output. 2008-10-11 11:07:53 +02:00
Christian Kamm
6eeeafdba6 First part of rename to LDC. 2008-10-06 22:46:55 +02:00
Tomas Lindquist Olsen
77e16a9302 Added test case for bug #100
Removed dubious check for not emitting static private global in other modules without access. This should be handled properly somewhere else, it's causing unresolved global errors for stuff that should work (in MiniD)
2008-10-05 17:28:15 +02:00
Christian Kamm
271012bcfc Fix import visibility bugs 313 and 314. 2008-10-01 19:16:10 +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
1daa67ba50 Removed useless assert in ArrayLiteralExp::toConstElem
Added second verification pass after optimization
Commented an optimization pass out from lvl2, it turns the IR invalid, see llvm PR 2800
2008-09-16 16:06:39 +02:00
Tomas Lindquist Olsen
f411df11e3 Fixed choosing default target machine without needing to link in targets. 2008-09-07 17:44:25 -07:00
Christian Kamm
d44f21687e Restructure path handling a bit. Fixes #66. 2008-09-06 12:27:27 +02:00
Tomas Lindquist Olsen
1565f00f85 Fixed toobj.cpp to compile with latest LLVM, seems a method overload was removed recently. 2008-08-31 18:38:16 +02:00
Tomas Lindquist Olsen
2b2291952c Fixed problem when instantiating a template with private global variables. 2008-08-15 05:08:33 +02:00
Christian Kamm
878faff7fb Revert accidental change to toobj.cpp. 2008-08-12 19:50:41 +02:00
Christian Kamm
57cd1b4445 Get rid of 'static function cannot access nested' error. It is caught again later. 2008-08-12 19:48:42 +02:00
Christian Kamm
8b1903c0b3 Make llvmdc work with llvm 2.4svn revision 54614. Breaks compatibility with llvm 2.3. 2008-08-10 21:09:23 +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
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
Tomas Lindquist Olsen
27674069e7 [svn r384] Some minor code cleanups. 2008-07-14 21:49:54 +02:00
Tomas Lindquist Olsen
832504e5d7 [svn r357] Merged DMD 1.033 2008-07-12 19:38:31 +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
Tomas Lindquist Olsen
2dfb2fcf19 [svn r344] Fixed some very minor issues with the usage listing when calling llvmdc with no arguments.
Changed the way moduleinfo is registered to use the same approach as DMD, this eliminates the need for correct linking order and should make the way for using a natively compiled runtime library. This should speed up linking tremendously and should now be possible.
Fixed the llvm.used array to only be emitted if really necessary.
2008-07-09 23:43:51 +02:00
Christian Kamm
5f15274bc0 [svn r337] Reverted changes to toobj.cpp: Module constructor calls can never be invokes. 2008-07-04 08:51:49 +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
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
c1ae095f4c [svn r268] Fixed: global debug info was still brokem ... should be done now!!! 2008-06-11 21:03:55 +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
Christian Kamm
4a481678b8 [svn r265] generate debug info for global variables only if they don't have external linkage 2008-06-10 20:01:04 +02:00