54 Commits

Author SHA1 Message Date
David Nadlinger
288fd47707 Merged 1.075 frontend. 2012-11-24 21:10:13 +01:00
kai
1c6ff32d50 Merge dmd-1.074 into ldc. 2012-04-13 23:12:46 +02:00
kai
f1998a6110 Minimize differences between original dmd source and ldc1.
Mainly affects formatting but I also found some code differences.
2012-04-10 21:52:12 +02:00
kai
8a20415cd1 Fix white space. 2012-03-06 07:28:29 +01:00
kai
a23b837ebd Merge dmd-1.073. 2012-02-23 20:41:22 +01:00
kai
f9201e8352 Merge 1.072 2012-02-02 03:13:27 +01:00
Alexey Prokhin
7431d58702 Rewritten initialization of global variables. 2011-10-25 15:43:49 +04:00
Alexey Prokhin
a41b822420 Fixed ldc1 compilation 2011-07-26 09:30:36 +04:00
David Nadlinger
228a5cbf1c Set precedence for TOKgep as well, now that we have the assert back in expToCBuffer. 2011-04-22 23:20:12 +02:00
David Nadlinger
fb79515eee Merged DMD commit 59c07625e84aadd2f684ea77f925ae540d5c8906:
bugzilla 4926 ICE: PREC_zero assertion failure due to unset precedence
2011-04-22 15:03:13 +02:00
Moritz Warning
f48f98c474 another ldc2 merge 2011-01-10 19:45:00 +01:00
Alexey Prokhin
553d5518b3 Implemented casting of a global variable to a pointer in an initializer. Implemented adding to a pointer in an initializer 2011-01-08 13:01:54 +03:00
Robert Clipsham
65c892ee62 Merge SiegeLord's dmdfe 1.064 patch. 2011-01-01 21:23:08 +00:00
Moritz Warning
c4e255206a fixes #431 :: apply DMDFE 1.062; thanks SiegeLord 2010-09-27 00:06:28 +02:00
Moritz Warning
ba275942cf fixes #427 :: Upgrade to DMDFE 1.059+1.060 patch; thanks to SiegeLord 2010-09-05 19:12:55 +02:00
Moritz Warning
ac5180b65b fixes #426 :: detab'ing the DMDFE source; kudos SiegeLord 2010-09-05 19:04:26 +02:00
Tomas Lindquist Olsen
1fac40d2bd Update to work with LLVM 2.7.
Removed use of dyn_cast, llvm no compiles
without exceptions and rtti by
default. We do need exceptions for the libconfig stuff, but rtti isn't
necessary (anymore).

Debug info needs to be rewritten, as in LLVM 2.7 the format has
completely changed. To have something to look at while rewriting, the
old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means
that you have to define this to compile at the moment.

Updated tango 0.99.9 patch to include updated EH runtime code, which is
needed for LLVM 2.7 as well.
2010-05-19 12:42:32 +02:00
Robert Clipsham
daa102a5cd Merge dmd 1.056. 2010-02-06 15:53:52 +00:00
Leandro Lucarella
e7323517b0 Merge DMD r320: refactor
---
 dmd/expression.c |    7 +++----
 dmd/expression.h |    2 +-
 dmd/mtype.c      |   34 ++++++++--------------------------
 3 files changed, 12 insertions(+), 31 deletions(-)
2010-01-06 15:18:23 -03:00
Leandro Lucarella
6e61ecee6b Merge DMD r303: harmonize
---
 dmd/expression.c |   78 ++++++++++++++++++++++++++++++++++++++++++++++++-----
 dmd/expression.h |    8 +++++
 dmd/template.c   |   27 ++++++++++++-------
 3 files changed, 95 insertions(+), 18 deletions(-)
2010-01-06 15:18:21 -03:00
Leandro Lucarella
9eba8c9f32 Merge DMD r294: bugzilla 2816 Sudden-death static assert is not...
bugzilla 2816 Sudden-death static assert is not very useful.
---
 dmd/expression.h   |   12 ++++++
 dmd/staticassert.c |   10 +---
 dmd/template.c     |  108 ++++++++++++++++++++++++++++++++++++++++++++++++----
 dmd/template.h     |    2 +
 4 files changed, 117 insertions(+), 15 deletions(-)
2010-01-06 15:18:21 -03:00
Leandro Lucarella
357dc9c1a9 Merge DMD r253: refactor: Argument => Parameter
---
 dmd/arrayop.c     |   30 ++++----
 dmd/arraytypes.h  |    2 +-
 dmd/class.c       |    8 +-
 dmd/declaration.c |   10 ++--
 dmd/declaration.h |   16 ++--
 dmd/doc.c         |   12 ++--
 dmd/dsymbol.c     |    4 +-
 dmd/expression.c  |   48 +++++++-------
 dmd/expression.h  |   32 +++++-----
 dmd/func.c        |   78 +++++++++++-----------
 dmd/init.c        |    2 +-
 dmd/interpret.c   |    8 +-
 dmd/mtype.c       |  190 ++++++++++++++++++++++++++--------------------------
 dmd/mtype.h       |   32 +++++-----
 dmd/opover.c      |   34 +++++-----
 dmd/parse.c       |   40 ++++++------
 dmd/parse.h       |    2 +-
 dmd/statement.c   |   90 +++++++++++++-------------
 dmd/statement.h   |   14 ++--
 dmd/struct.c      |    8 +-
 dmd/template.c    |   30 ++++----
 gen/functions.cpp |   10 ++--
 gen/functions.h   |    2 +-
 gen/tocall.cpp    |   10 ++--
 gen/typinf.cpp    |    6 +-
 25 files changed, 359 insertions(+), 359 deletions(-)
2010-01-06 15:18:20 -03:00
Christian Kamm
3479e91996 Merge DMD 1.051 2009-11-06 23:58:01 +01:00
Christian Kamm
723cfef519 Another shot at fixing the issues with (constant) struct literals and their addresses. See DMD2682, #218, #324.
The idea is to separate the notion of const from 'this variable can always be
replaced with its initializer' in the frontend. To do that, I introduced
Declaration::isSameAsInitializer, which is overridden in VarDeclaration to
return false for constants that have a struct literal initializer.

So
{{{
const S s = S(5);
void foo() { auto ps = &s; }
// is no longer replaced by
void foo() { auto ps = &(S(5)); }
}}}

To make taking the address of a struct constant with a struct-initializer
outside of function scope possible, I made sure that AddrExp::optimize doesn't
try to run the argument's optimization with WANTinterpret - that'd again
replace the constant with a struct literal temporary.
2009-06-14 19:49:58 +02:00
Frits van Bommel
76ae0b0ab6 Fix format-string bugs by adding __attribute__((__format__)) in all applicable
places and fixing all warnings my gcc produced.
Among other things, this should fix several segfaults (including one I just
ran into).
2009-05-17 00:15:25 +02:00
Tomas Lindquist Olsen
e8780d50e8 Merged DMD 1.045 !!! 2009-05-16 22:21:31 +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
3d1f8cc565 Merged DMD 1.042. 2009-04-03 17:59:34 +02:00
Christian Kamm
d7de486493 A different fix to #218 and DMD2682 that does not lead to constant folding regressions.
Fixes run/const_15, run/c/const_16_B.
The price is removing the lvalueness of struct literals. If it turns out too
much code depends on this behavior or we don't want to break with DMD, we
could keep struct literals as lvalues and instead convert struct literals used
as expression initializers into struct initializers.
2009-03-29 11:43:45 +02:00
Tomas Lindquist Olsen
99b863e2b1 Added initial support for raw LLVM inline asm. 2009-03-28 06:32:06 +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
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
Tomas Lindquist Olsen
8b751cce0e - Updated to DMD frontend 1.041.
- Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file.
2009-03-12 20:37:27 +01:00
Tomas Lindquist Olsen
dcb9628849 Merged DMD 1.039 2009-01-07 19:34:48 +01:00
Tomas Lindquist Olsen
16409a3367 Merged DMD 1.038 2009-01-06 16:33:51 +01:00
Christian Kamm
8f62c080e2 Add more toConstElem stubs to get better error messages. 2008-12-18 07:59:03 +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
a3a418150e Some missed LLVMDC -> LDC. 2008-10-06 22:54:08 +02:00
Tomas Lindquist Olsen
7b18b7a633 Implemented constant pointer casts (like casting function pointer to void* as a constant global initializer) 2008-09-28 21:09:21 +02:00
Tomas Lindquist Olsen
4280a86bcf Fixed .funcptr property of delegates, no longer uses the infamous DMD rewrites to pointer arithmetic, instead a GEPExp has been introduced. 2008-09-15 02:04:26 +02:00
Christian Kamm
f0abdf860a Constant fold structliteral.member again. 2008-09-12 12:39:06 +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
5aae7a6bee Merged DMD 1.034, array operations are not yet implemented ;) 2008-08-14 06:55:41 +02:00
Christian Kamm
ad8e9ae852 Implement a rough AddrExp::toConstElem() 2008-08-02 22:54:36 +02:00
Tomas Lindquist Olsen
832504e5d7 [svn r357] Merged DMD 1.033 2008-07-12 19:38:31 +02:00
Christian Kamm
7ae4bc6477 [svn r175] merged dmd 1.029 2008-05-01 15:15:28 +02:00
Tomas Lindquist Olsen
a807cbfc91 [svn r112] Fixed 'case 1,2,3:' style case statements.
Fixed a bunch of bugs with return/break/continue in loops.
Fixed support for the DMDFE hidden implicit return value variable. This can be needed for some foreach statements where the loop body is converted to a nested delegate, but also possibly returns from the function.
Added std.math to phobos.
Added AA runtime support code, done ground work for implementing AAs.
Several other bugfixes.
2007-11-20 05:29:20 +01:00
Tomas Lindquist Olsen
454f50ccbc [svn r96] Updated to DMD 1.023.
Regular bugfixes.
2007-11-08 19:13:28 +01:00
Tomas Lindquist Olsen
4a5659c04e [svn r94] started on complex support
calling final class methods was being treated as a virtual call failing an assertion.
2007-11-07 03:36:07 +01:00
Tomas Lindquist Olsen
48492229ec [svn r90] Major updates to the gen directory. Redesigned the 'elem' struct. Much more... !!!
Lots of bugfixes.
Added support for special foreach on strings.
Added std.array, std.utf, std.ctype and std.uni to phobos.
Changed all the .c files in the gen dir to .cpp (it *is* C++ after all)
2007-11-03 14:44:58 +01:00