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
cdd1d546a7
Merge DMD r276: bugzilla 2229 ICE(template.c) instantiating an invalid...
...
bugzilla 2229 ICE(template.c) instantiating an invalid variadic template
with more than one argument.
---
dmd/template.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 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
fa910e3648
Merge DMD r262: bugzilla 3381 ([tdpl] Incorrect assessment of ...)
...
The full bug title is: [tdpl] Incorrect assessment of overriding in
triangular-shaped hierarchy.
---
dmd/class.c | 2 +-
dmd/func.c | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
2010-01-06 15:18:20 -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
68d53eb635
Use just \n as end of line
...
---
dmd/arraytypes.h | 102 ++++----
dmd/enum.c | 652 ++++++++++++++++++++++++++--------------------------
dmd/parse.h | 292 ++++++++++++------------
dmd/staticassert.c | 240 ++++++++++----------
4 files changed, 643 insertions(+), 643 deletions(-)
2010-01-06 15:18:19 -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
Leandro Lucarella
09fb49c546
Merge DMD r248: implement Denis Koroskin's macro suggestion
...
---
dmd/lexer.c | 2 +-
dmd/lexer.h | 8 ++++----
dmd/mars.c | 2 +-
dmd/parse.c | 12 ++++++------
4 files changed, 12 insertions(+), 12 deletions(-)
2010-01-06 15:18:19 -03:00
Leandro Lucarella
7d2c329195
Merge DMD r243: some harmonization with D2 dmd
...
---
dmd/aggregate.h | 24 ++++-
dmd/attrib.c | 63 ++++++----
dmd/attrib.h | 10 +-
dmd/declaration.h | 5 +-
dmd/func.c | 337 ++++++++++++++++++++++-------------------------------
dmd/mars.c | 2 +-
dmd/mars.h | 7 +
dmd/mtype.h | 13 ++-
dmd/parse.c | 32 ++++-
dmd/parse.h | 14 ++-
dmd/scope.h | 2 +-
11 files changed, 263 insertions(+), 246 deletions(-)
2010-01-06 15:18:19 -03:00
Kelly Wilson
ab325e6214
Revert fix by Robert for downs as it causes a segfault when compiling tango.
2009-12-23 22:49:20 -07:00
Robert Clipsham
cf55f5fcec
Merged the patch for dmd bugzilla #3620 by request of downs.
2009-12-20 13:58:08 +00:00
Robert Clipsham
3c1219669b
Added in forgotten json.c and json.h files so ldc compiles again.
2009-11-07 14:21:56 +00:00
Christian Kamm
7dad594857
Replace DMD's isSymbolDeclaration with isStaticStructInitDeclaration.
...
See also [913] and bug #198 .
2009-11-07 11:14:37 +01:00
Christian Kamm
3479e91996
Merge DMD 1.051
2009-11-06 23:58:01 +01:00
Christian Kamm
64a8e47ad6
Fix several 'reaches end of function' warnings by making fatal noreturn.
...
The warnings also pointed out a few genuine bugs. Replace some tabs with
spaces.
2009-11-06 21:51:41 +01:00
Tomas Lindquist Olsen
d52ea51df4
Added check and error in case two same named modules - with different packages and compiled at once - would overwrite each other's output files.
2009-08-02 18:37:07 +02:00
Christian Kamm
0075194b90
Improve error message when using auto declarations with explicit type.
2009-07-14 18:24:40 +02:00
Benjamin Kramer
0ee2f34611
Don't use llvm::getGlobalContext() anymore
2009-07-13 20:16:15 +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
Christian Kamm
b4f8bd6e52
Fix #318 by making a list of all seen template instances in a module for
...
singleobj compilation and then making sure they get emitted in their entirety.
2009-06-06 09:47:32 +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
0a8db2289d
Remove redundant null-check in member functions of structs that don't have an
...
invariant.
2009-06-01 01:28:18 +02:00
Christian Kamm
750260070a
Define __C99FEATURES__ in lexer.c for Solaris. Fixes #313 .
2009-05-30 12:47:35 +02:00
Kelly Wilson
a178d9563d
Fix for mingw32 segfault
2009-05-23 14:59:04 -06:00
Christian Kamm
c433604243
Fix bug #307 by doing what DMD does: add the arrayop to
...
sc->module->importedFrom instead of sc->module. That way array ops in template
instantiations will be semantic3'ed.
2009-05-22 10:17:47 +02:00
Christian Kamm
d537ad0d48
Allow package protected members to be accessed by the declaring module even if
...
it isn't in a package.
2009-05-21 18:08:31 +02:00
Christian Kamm
8e56fe69a4
Merged xfBuild patch for dependency tree generation. See #286 .
2009-05-20 21:13:41 +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
Frits van Bommel
81cf30688a
Patch to allow compiling LDC with MinGW, by mp4 / [1]jaffa (slightly edited).
...
Closes #300 .
2009-05-18 14:02:50 +02:00
Frits van Bommel
1ca2ee5d66
Allow ignored pragmas to have a body; don't ignore the body.
...
Also, ignore errors while trying to make sense of parameters to ignored pragmas
for -v.
2009-05-17 23:33:35 +02:00
Tomas Lindquist Olsen
e2ba08388f
Added new FreeBSD and Solaris predefined version identifiers.
2009-05-17 17:10:26 +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
Frits van Bommel
e7e3632d36
Remove a macro-redefinition warning
2009-05-16 23:00:56 +02:00
Tomas Lindquist Olsen
b87acdc36f
Updated DMDFE version id from 1.042 to 1.045 ...
2009-05-16 22:27:31 +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
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
4f59c0cb7b
Removed fix from rev [1331] since rev [1333] adds a more general fix that catches more cases!
2009-05-10 15:50:51 +02:00
Christian Kamm
813c650517
Backport D2 CTFE cast behavior to allow cast(char[])char[n] to succeed.
2009-05-10 15:42:23 +02:00
Tomas Lindquist Olsen
c6dca3fb76
Fixed CTFE evaluation on .dup . Fixes ticket #288 .
2009-05-10 14:32:23 +02:00
Tomas Lindquist Olsen
ecc106d7b7
Fixed dmdfe generated class invariant calls. Also insert proper "this !is null" check before it. Fixed invariant* dstress regressions and generally seems like a good idea. Hope I didn't break anything.. minitests run fine!
2009-05-10 00:46:09 +02:00
Frits van Bommel
5c29832ee7
Fix a bug pointed out by valgrind: OutBuffer::write4() was writing 8 bytes on
...
platforms with 64-bit longs.
2009-05-08 12:21:53 +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
Christian Kamm
9812a8c8ae
Commit workaround for TypeFunction comparing issue.
2009-04-30 23:16:21 +02:00
Frits van Bommel
da4450d2f5
Make sure this still compiles after LLVM r70437, which introduces a
...
specialization for command-line option template parser<char> which does the
wrong thing for us...
2009-04-30 12:25:04 +02:00
Tomas Lindquist Olsen
ca39bb4f4d
Fixed array operation codegen when used from imported templates. All array operations are now emitted with template linkage. Fixed #270 .
2009-04-29 18:59:39 +02:00