Commit Graph

568 Commits

Author SHA1 Message Date
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
Tomas Lindquist Olsen
8ab98dad49 Fixed assertion failure when object.d is missing the ModuleInfo class 2009-02-02 02:35:44 +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
98974b02c0 Fix bug #199 2009-02-02 00:26:32 +01:00
Tomas Lindquist Olsen
e6ef3ecf15 Fixed bug #191 by rewriting DtoConstArrayInitializer, patch unfortunately caused regressions, hopefully this doesn't :P 2009-02-01 23:30:36 +01:00
Christian Kamm
01f19c466c Fix #198 and #199 by making CTFE on static struct initializers work.
Renamed SymbolDeclaration to StaticStructInitDeclaration to make its usage clearer.
2009-02-01 20:20:56 +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
Christian Kamm
343b80e718 Fix bug #177 by not attempting to define composite debug info for
forward-declared structs.
2009-01-23 13:41:03 +01:00
Christian Kamm
287fa3446c Add -m64 switch to gcc calls on 64-bit platforms. 2009-01-23 10:12:57 +01:00
Christian Kamm
ab9b9cc2e9 Solaris compatibility and proc map parsing #183, thanks BlueZeniX! 2009-01-22 18:53:32 +01:00
Tomas Lindquist Olsen
343003cfdc Makes sure only function definitions inside templates get weak linkage, llvm doesn't allow weak linkage on just declarations, so we use external linkage for those. Fixes #162 2009-01-22 17:26:50 +01:00
Christian Kamm
4042f90800 Apply afb's patch from #168 to use $CC instead of "gcc" for toobj and linker. 2009-01-17 17:52:09 +01:00
Christian Kamm
9081e55746 Fix #163. 2009-01-17 14:53:32 +01:00
Tomas Lindquist Olsen
0816e84138 Fixed bad return types in typinf.cpp 2009-01-09 20:08:06 +01:00
Tomas Lindquist Olsen
16409a3367 Merged DMD 1.038 2009-01-06 16:33:51 +01:00
Christian Kamm
955df981f8 Apply duane's patch for align power-of-two checking in inline asm. Fixes #159 2009-01-04 15:39:34 +01:00
Christian Kamm
12a21b1397 Fix #153. Factor out common code in StructLiteralExp::to(Const)Elem. 2008-12-30 11:42:01 +01:00
Christian Kamm
c92946a00a Automated merge with http://hg.dsource.org/projects/ldc 2008-12-20 09:15:46 +01:00
Christian Kamm
61a5a08135 Adjust error message for missing toConstExp to include 'is not a const exp'. 2008-12-20 09:13:44 +01:00
elrood
4c3d23ddfe modified gen/linker.cpp to only append .exe suffix on windows if not already present 2008-12-18 19:24:33 +01:00
Christian Kamm
8f62c080e2 Add more toConstElem stubs to get better error messages. 2008-12-18 07:59:03 +01:00
Christian Kamm
7069073f75 Applied modification of wilsonk's patch for AndAnd and OrOrExp for void rhs funcs. 2008-12-17 21:24:17 +01:00
Christian Kamm
0e1b27db3c Remove some dead code. 2008-12-17 21:03:06 +01:00
Christian Kamm
cb0201960c Apply wilsonk's patch to AddrExp::toConstElem for struct literals. 2008-12-17 20:40:27 +01:00
Christian Kamm
44c606c409 Missed line when removing env sanitizing. 2008-12-14 16:39:27 +01:00
Christian Kamm
6600ef0a86 Automated merge with http://hg.dsource.org/projects/ldc 2008-12-14 16:30:20 +01:00
Christian Kamm
dabe5d3efd Remove unportable env-sanitizing code. If it is really needed, it needs to be
rethought. Closes #131.
2008-12-14 16:30:06 +01:00
Tomas Lindquist Olsen
9f2497ef77 Runtime now compiles with D2 again. This does NOT mean it works flawlessly !!! 2008-12-14 04:11:32 +01:00
Christian Kamm
cabc236a79 Only emit finalbody if there is one. Fixes #147. 2008-12-13 06:48:00 +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
99396c2e7a Fixed problem with nested function inside static nested function. see mini/compile_nested2.d. fixes #143 . 2008-12-09 14:57:01 +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
417aa57501 This ''should'' fix #139 , I failed to produce a testcase, but I would imagine this to be correct, and it removes '''that''' error when building Hybrid. 2008-12-09 03:01:19 +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
Tomas Lindquist Olsen
b6781a8eae Added proper "need 'this' to access member foo" errors instead of "variable foo not resolved" for some cases, added FIXME for the old error!
Added a bit more information to the runtime's cyclic dependency detection exception.
2008-12-09 01:56:39 +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
Christian Kamm
b83afa9eca Fix with(symbol) statement. 2008-12-07 16:02:43 +01:00
Christian Kamm
fe71199772 Only run unittests contained directly in the module. 2008-12-07 14:12:39 +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
a012859bae Fixed problem with moduleinfo thinking it imports itself, causing assertion failure, fixes #138 2008-12-04 14:36:11 +01:00
Tomas Lindquist Olsen
3111ff1fc4 Fixed non-static struct initializers. 2008-12-03 01:40:28 +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
91a2c257b0 Implemented allocating storage for a slice if its address is taken, fixes #115 2008-12-02 01:20:22 +01:00
Tomas Lindquist Olsen
c62b31a357 Fixed taking address of global static array element as constant expression. 2008-12-02 01:07:22 +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
649b860d2b Added error when gcc cannot be found. 2008-12-01 15:21:33 +01:00
Tomas Lindquist Olsen
d3ae488730 Added error when invoking gcc fails 2008-12-01 15:18:22 +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
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