61 Commits

Author SHA1 Message Date
David Nadlinger
288fd47707 Merged 1.075 frontend. 2012-11-24 21:10:13 +01:00
David Nadlinger
ab94a6d60c Don't treat __ensure specially in LDC.
The only change here is commenting out the Id::ensure check,
the rest is just alignment of the code to upstream DMD.
2012-11-08 23:53:50 +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
e5f2430855 Remove unused member VarDeclaration::anonDecl. 2012-03-28 06:57:17 +02:00
kai
e739102374 Removed unused member VarDeclaration::offset2. 2012-03-27 07:13:55 +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
David Nadlinger
907067c4e8 Merged DMD commit c7f94c6b66d3b4233ea01dd3dd9f0028b7118870:
5391 Crash with recursive alias declaration

When a recursive alias declaration is encountered, mark it as
type error (not just as an alias to itself of type error).
2011-04-23 18:29:18 +02:00
David Nadlinger
df1c21bd4d Merged DMD commit 2101219b7b3fa5f545af8401dcacd2cb91c8ef08:
bugzilla 5110 Excess attribute propagation of structs and classes
2011-04-22 18:46:11 +02:00
David Nadlinger
c7205fe4fb Merged DMD commit ee27f87bd4f02fc3edbeb2d110333cb162427e08:
bugzilla 5164 Error without line number using 'is (T...)'
2011-04-22 18:34:19 +02:00
David Nadlinger
eb4b2eb402 Merged DMD commit b9d6cf886404091fd03445c064a17f6332e16f0d:
bugzilla 4866 Static-to-dynamic converted manifest constant array gets non-converted type in static/constraint if
2011-04-22 15:05:44 +02:00
Robert Clipsham
65c892ee62 Merge SiegeLord's dmdfe 1.064 patch. 2011-01-01 21:23:08 +00: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
Moritz Warning
fbba26f9bb fixes #425 :: Upgrade to DMDFE 1.058 patch; big thanks to SiegeLord 2010-09-04 12:42:38 +02:00
Robert Clipsham
daa102a5cd Merge dmd 1.056. 2010-02-06 15:53:52 +00: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
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
0075194b90 Improve error message when using auto declarations with explicit type. 2009-07-14 18:24:40 +02: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
96fdcd6347 Run semantic3 on imported modules, and emit new symbols with
`available_externally` linkage. This allows the inliner to inline functions from
other modules while telling the code generator to ignore those functions (treat
them as declarations)
Still generates a few extra `TypeInfo`s and strings...
Disabled when generating debug info because I don't really understand it, and it
doesn't like this.
2009-06-07 16:00:13 +02:00
Tomas Lindquist Olsen
092381577f Some minor changes to handling of variables referenced from nested functions in D2 .
Added generation of new 'void*[4] reserved;' !ModuleInfo member .
2009-06-03 03:04:47 +02:00
Frits van Bommel
95c35225bb Don't print the entire declaration of the alliassee when ->toChars() is
called on an `AliasDeclaration`; just printing the name will do. This fixes
#305, which otherwise tries to generate
{{{
  class E {
      void A() {
          alias /* recurse into E->toCBuffer() */ m;
      }
  }
}}}
by way of an infinite recursion (causing a segfault when the stack runs out).
2009-05-20 16:20:59 +02:00
Tomas Lindquist Olsen
e8780d50e8 Merged DMD 1.045 !!! 2009-05-16 22:21:31 +02:00
Christian Kamm
8c422bde53 Don't always expand aliases to FuncDecls to FuncAliasDecls - breaks for single
functions.
2009-05-16 14:22:09 +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
ca4f588c08 Fixed deal breaker bug for more-at-once compilation when any module contained aggregates. Fixes ticket #272 . 2009-05-07 02:10:29 +02:00
Tomas Lindquist Olsen
3d1f8cc565 Merged DMD 1.042. 2009-04-03 17:59:34 +02: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
Christian Kamm
372b40dd94 Fix tuple declarations in aggregates. 2009-03-23 14:47:51 +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
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
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
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
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
06a55194d7 Upgraded frontend to DMD 1.035 2008-10-06 16:22:11 +02:00
Tomas Lindquist Olsen
daad516579 Removed the 'needsstorage' thing from Dsymbol. Arguments are not always given storage when applicable. This is not longer treat specially
in this regard. Code for accessing nested variables and contexts rewritten. Probably more. Fairly well tested.
2008-08-04 02:59:34 +02:00
Tomas Lindquist Olsen
832504e5d7 [svn r357] Merged DMD 1.033 2008-07-12 19:38:31 +02:00
Tomas Lindquist Olsen
03d26e1178 [svn r326] Fixed a bunch of issues with printf's that MinGW32 did not support.
Fixed problems with label collisions when using labels inside inline asm. LabelStatement is now easily reached given its
Identifier, which should be useful elsewhere too.
Enabled inline asm for building the lib/compiler/llvmdc runtime code, fixing branches out of asm makes this possible.
2008-06-27 22:04:35 +02:00
Tomas Lindquist Olsen
1e87ae15ef [svn r262] Fixed debug info for normal function parameters.
Fixed debug info for pointers to basic types.
2008-06-09 12:43:16 +02:00
Christian Kamm
7ae4bc6477 [svn r175] merged dmd 1.029 2008-05-01 15:15:28 +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