Commit Graph
82 Commits
Author SHA1 Message Date
Moritz Warning 240dbdc46d comment out assert for use in ldc1, like it's done in dmd2/expression.c; thanks to fawzi for spotting this 2011-01-28 18:29:08 +01:00
Robert Clipsham 65c892ee62 Merge SiegeLord's dmdfe 1.064 patch. 2011-01-01 21:23:08 +00:00
Moritz Warning 233299e5c8 Haiku OS support; thanks to MrSunshine 2010-10-04 00:58:14 +02:00
Moritz Warning f654235139 fixes #432 :: apply DMDFE 1.063; thanks SiegeLord 2010-09-27 00:07:03 +02:00
Moritz Warning c4e255206a fixes #431 :: apply DMDFE 1.062; thanks SiegeLord 2010-09-27 00:06:28 +02:00
Moritz Warning b032e3d1f7 fixes #428 :: apply DMDFE 1.061; thanks SiegeLord 2010-09-27 00:05:13 +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
Christian Kamm 1d488da835 Merge DMD 1.057. 2010-03-08 21:39:20 +01:00
Robert Clipsham daa102a5cd Merge dmd 1.056. 2010-02-06 15:53:52 +00:00
Christian Kamm 8176222719 Disable appending a dchar to a char or wchar array for now.
See [1605] for details.
2010-01-06 19:53:35 +01:00
Leandro Lucarella 003f306cba Merge DMD r321: bugzilla 3575 CTFE: member structs not initialized correctly
---
 dmd/expression.c |    4 +---
 dmd/interpret.c  |   32 +++++++++-----------------------
 dmd/mtype.c      |   48 +++++++++++++++++++++++++++++++++++++++++++-----
 dmd/mtype.h      |    2 ++
 4 files changed, 55 insertions(+), 31 deletions(-)
2010-01-06 15:18:23 -03: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 b9896b9034 Merge DMD r314+r315: bugzilla 2029 Typesafe variadic functions don't...
Both DMD revisions are for fixing bugzilla 2029 (Typesafe variadic
functions don't work in CTFE).

The DMD r314 commit message is:
bugzilla 2029 (Typesafe variadic functions don't work in CTFE

The DMD r315 commit message is:
bugzilla 2029 - try again
---
 dmd/constfold.c   |   11 ++++-
 dmd/declaration.c |   21 +++++++++-
 dmd/declaration.h |   10 ++++-
 dmd/expression.c  |    1 +
 dmd/interpret.c   |  111 +++++++++++++++++++++++++++++++++++++++++++++--------
 dmd/mars.h        |    2 +-
 dmd/mtype.c       |    2 +-
 7 files changed, 135 insertions(+), 23 deletions(-)
2010-01-06 15:18:22 -03:00
Leandro Lucarella 4d74a325fc Merge DMD r304: refactor invariant => immutable
---
 dmd/cast.c        |    2 +-
 dmd/declaration.c |    2 +-
 dmd/declaration.h |    3 +--
 dmd/doc.c         |    2 +-
 dmd/expression.c  |    6 +++---
 dmd/interpret.c   |    4 ++--
 dmd/mtype.c       |    2 +-
 dmd/mtype.h       |    2 +-
 dmd/parse.c       |    4 ++--
 dmd/struct.c      |    2 +-
 10 files changed, 14 insertions(+), 15 deletions(-)
2010-01-06 15:18:22 -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 2cdf1f6679 Merge DMD r296: bugzilla 3617 CTFE: wrong code for if(x) where x is int...
bugzilla 3617 CTFE: wrong code for if(x) where x is int or smaller.
---
 dmd/expression.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
2010-01-06 15:18:21 -03:00
Leandro Lucarella ddb0f3f209 Merge DMD r278: bugzilla 370 Compiler stack overflow on recursive...
bugzilla 370 Compiler stack overflow on recursive typeof in function
declaration.
---
 dmd/expression.c |    1 +
 dmd/mtype.c      |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
2010-01-06 15:18:21 -03:00
Leandro Lucarella 08a4454919 Merge DMD r277: bugzilla 3495 Segfault(typinf.c) instantiating D variadic...
bugzilla 3495 Segfault(typinf.c) instantiating D variadic function with
too few arguments.
---
 dmd/expression.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
2010-01-06 15:18:21 -03:00
Leandro Lucarella 77f256536f Merge DMD r274: harmonization
---
 dmd/expression.c |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 dmd/template.c   |   41 +++++++++++++++++++++++++++++++++++
 dmd/template.h   |    1 +
 3 files changed, 103 insertions(+), 1 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
Leandro Lucarella f5ff6b1c57 [WIP] Merge DMD r251: bugzilla 111 (appending a dchar to a char[])
This patch needs some work in the code generation, because of the runtime
changes (functions "_d_arrayappendcd" and "_d_arrayappendwd" are added).

This doesn't affect existing code though, it just makes with patch
a little useless, because something like this:
    char [] s;
    s ~= '\u6211';
That failed to compile with a nice error message previously to this
change, now fails with and ugly error message (a failed assertion).

Apparently there is a regression introduced by this patch too, when
compiling Dil I get this assertion message:

ldc: /home/luca/tesis/ldc/gen/statements.cpp:132: virtual void ReturnStatement::toIR(IRState*): Assertion `p->topfunc()->getReturnType() == llvm::Type::getVoidTy(gIR->context())' failed.
0   ldc 0x08a91628

Thank god we have bisecting capabilities in VCSs now ;)
---
 dmd/expression.c |   47 +++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 41 insertions(+), 6 deletions(-)
2010-01-06 15:18:19 -03:00
Leandro Lucarella eb886e4b5e Merge DMD r250: harmonize
---
 dmd/expression.c |  133 ++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 95 insertions(+), 38 deletions(-)
2010-01-06 15:18:19 -03:00
Christian Kamm 3479e91996 Merge DMD 1.051 2009-11-06 23:58:01 +01:00
Christian Kamm 72d1f1e6dd Make the auto storage class never have the same meaning as scope.
This changes the meaning of
auto class MyClass {} and
auto MyClass ident;
Both have been made an error to prevent accidents.
2009-07-12 16:15:21 +02: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
Christian Kamm a38d34dead Trivial fix for bug #265 2009-04-23 20:28: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 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 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 3ac45285fc Cleanup DMD 1.041 merge. 2009-03-23 20:26:33 +01:00
Frits van Bommel 434cb74980 Fix a bug where ::warning() was called with a va_list argument instead of an
actual vararg list.
Also cleaned up the format for warnings. (Previously some would start with
"warning - warning - Warning:" which was a bit redundant)
2009-03-18 15:03:17 +01:00
Frits van Bommel bc9fae17a8 Another "pointers are 32 bits" issue in the frontend. long/ulong constants cast
to pointers were truncated to 32-bit values.

Closes #234.
2009-03-15 15:58:38 +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
Christian Kamm b7febcf35a Error gracefully for +=, -=, *=, /= if rhs is complex but lhs isn't. 2009-02-28 19:58:30 +01:00
Christian Kamm 4e05607355 Change custom allocator new size argument to size_t instead of uint. See #175. 2009-01-18 13:10:19 +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
Tomas Lindquist Olsen 6716aecc52 Merged DMD 1.037 frontend 2008-12-13 13:15:31 +01:00
Tomas Lindquist Olsen c14996f39e Removed insufficient fix for DMD bug 1161, it was causing problems with instantiating imported templates, and passing private variables as aliases. I failed to come up with a proper fix! 2008-12-10 13:56:10 +01:00
Christian Kamm cdbc4f84d2 Fix warnings on x86-64. By fvbommel. 2008-11-28 21:24:08 +01:00
Christian Kamm ac28509bde Fix return type of OrOr and AndAndExp being set incorrectly if rhs is void. Thanks wilsonk! 2008-11-22 18:38:13 +01:00
Tomas Lindquist Olsen 3c3a5dda14 Implemented correct parameter order according to x86-32 ABI documentation.
Changed AA types to just a void* .
2008-10-25 06:03:28 +02:00
Tomas Lindquist Olsen 5ad345646a Merged DMD 1.036.
Improved comments a little in the runtime source code.
2008-10-22 17:06:17 +02:00
Christian Kamm a3a418150e Some missed LLVMDC -> LDC. 2008-10-06 22:54:08 +02:00