Tomas Lindquist Olsen
d80de9deb3
Cleaned up TypeInfo_Struct.
...
Fixed problem with DtoConstSize_t taking a size_t argument, this is not enough for cross compiling from 32bit host to a 64bit target. It now takes uint64_t. There's probably a lot of similar case around to code ...
2009-05-17 04:41:10 +02:00
Tomas Lindquist Olsen
f3c7278e88
Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
2009-05-17 03:10:55 +02:00
Tomas Lindquist Olsen
e8780d50e8
Merged DMD 1.045 !!!
2009-05-16 22:21:31 +02:00
Tomas Lindquist Olsen
c0f2af5afd
Added IrTypeFunction and IrTypeDelegate and eliminated IrDType. This means the Type::ir field can be removed. It's the final part needed for the move to a slightly more sane type system. Now the whole thing just needs to be cleaned up :P
...
Added -v-cg switch, which right now just prints "codegen: module.name (module/name.d)" to stdout, this can really help figuring out where, in some complex build command, things go wrong.
2009-05-16 18:19:52 +02:00
Christian Kamm
53c3ac0313
Fix overload resolution issue in dmd bug 313/314 fix.
2009-05-16 12:17:33 +02:00
Tomas Lindquist Olsen
77cb1c6b8e
Added error instead of assertion failure when trying to get !TypeInfo for a forward declared struct.
2009-05-11 20:54:25 +02:00
Frits van Bommel
e4e07baf87
Re-enable consistency check for fixed LLVM versions.
2009-05-11 15:48:33 +02:00
Frits van Bommel
49a2924823
Update for metadata changes in LLVM trunk.
2009-05-11 11:59:22 +02:00
Frits van Bommel
adf1fd4d44
Work around an LLVM bug by not referring to globals from metadata. This was
...
only used for consistency checking anyway.
For the LLVM bug, see http://llvm.org/PR4180 / http://llvm.org/PR4046
2009-05-08 16:00:44 +02:00
Frits van Bommel
c831367b24
Factor out some constants into the header so producers and consumers of
...
metadata stay in sync (and are more readable).
2009-05-02 20:42:58 +02:00
Frits van Bommel
a9c518d82b
Add metadata for TypeInfo -> llvm::Type mapping.
...
Disabled for LLVM versions before the introduction of metadata.
2009-05-02 11:58:50 +02:00
Frits van Bommel
6c91185a77
Remove some dead code.
2009-05-02 11:58:50 +02:00
Tomas Lindquist Olsen
1c79df3817
Fixed all issues preventing Tango 0.99.8 to compile with `sh build-tango.sh --verbose ldc'.
2009-04-17 14:38:29 +02:00
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
14b8aff809
Fixed issue with runtime supplied typeinfo generating multiple symbols.
...
Added new ldc.llvmasm import in runtime cmake file.
2009-03-28 09:45:33 +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
c42c90ea80
* Moved ir/irsymbol.cpp/h into ir/irdsymbol.cpp/h.
...
* Added #if IN_DMD versioning around DMD backend specific code in the D1 frontend, D2 is currently broken.
* All part of a greater cleanup scheme.
2009-03-26 20:45:53 +01:00
Frits van Bommel
622a93a810
Make LDC work with LLVM trunk (s/LinkOnceLinkage/LinkOnceOdrLinkage/)
...
Also moved the #defines for linkage types into a separate header instead of
mars.h so we can #include revisions.h without having to rebuild the entire
frontend every time we update.
(I'm using revisions.h to get the LLVM revision for use in preprocessor
conditionals. It should work with LLVM release 2.5, old trunk and new trunk)
2009-03-08 16:13:10 +01:00
Tomas Lindquist Olsen
75591b3c16
Changed templates and typeinfo to use linkonce linkage instead of weak linkage, this should fix inlining problems, fixing bug #197 . If problems show up, it's easy to change it back by changing the define in mars.h . I'm 95% sure this is safe, given how we handle templates.
2009-02-02 01:44:51 +01:00
Tomas Lindquist Olsen
0816e84138
Fixed bad return types in typinf.cpp
2009-01-09 20:08:06 +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
d077bbc5e6
D2: Fixed global constants not initialized until module constructor.
2008-11-12 05:40:31 +01:00
Tomas Lindquist Olsen
32f99e7091
Forgot D2 versioning on typeinfo change.
2008-11-12 07:23:34 +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
c36bd9f4b0
Applied fvbommel's patch from #112
...
Added missing TypeInfoInvariant codegen for D2
2008-11-12 02:30:28 +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
6eeeafdba6
First part of rename to LDC.
2008-10-06 22:46: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
Christian Kamm
fe9b2b7efc
Fix TypeInfo_Tuple array initialization.
...
Fixes:
mini/emptytuple.d
2008-08-16 19:29:56 +02:00
Christian Kamm
c31d07e23f
Reverted bad change [506]. Added test case for remaining bug.
2008-08-13 23:54:09 +02:00
Christian Kamm
575ae2ea33
Provided overload to TypeClass::builtinTypeInfo to return true.
...
Shouldn't almost all types have a builtin typeinfo? Maybe it'd be better to
have the default at true and only overload typedef and friends.
2008-08-13 22:14:43 +02:00
Christian Kamm
44931493f6
Fixed root cause for Invalid BitCasts. DtoCanLoad continues to return false
...
for aggregates even though llvm 2.4svn could load them.
2008-07-23 17:56:09 +02:00
Christian Kamm
8f20b1ed00
Introducing opaque type to dmd frontent to be used with certain runtime array
...
and aa args and returns. There are still some bugs with aas.
2008-07-22 23:06:46 +02:00
Tomas Lindquist Olsen
832504e5d7
[svn r357] Merged DMD 1.033
2008-07-12 19:38:31 +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
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
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
Christian Kamm
0fba6312c2
[svn r189] moving IR data back into DMD frontend nodes
2008-05-06 07:56:03 +02:00
Tomas Lindquist Olsen
a0c6cb6673
[svn r179] lots and lots of fixes, much more of tango now compiles/works.
2008-05-05 07:36:29 +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
Christian Kamm
48f1a9c507
[svn r171] starting to move IR data from AST nodes into IRState; started with IrFunction
2008-04-29 21:33:50 +02: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