mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 08:33:14 +01:00
fixes #425 :: Upgrade to DMDFE 1.058 patch; big thanks to SiegeLord
This commit is contained in:
@@ -564,6 +564,18 @@ int AliasDeclaration::overloadInsert(Dsymbol *s)
|
||||
*/
|
||||
|
||||
//printf("AliasDeclaration::overloadInsert('%s')\n", s->toChars());
|
||||
if (aliassym) // see test/test56.d
|
||||
{
|
||||
Dsymbol *a = aliassym->toAlias();
|
||||
FuncDeclaration *f = a->isFuncDeclaration();
|
||||
if (f) // BUG: what if it's a template?
|
||||
{
|
||||
FuncAliasDeclaration *fa = new FuncAliasDeclaration(f);
|
||||
aliassym = fa;
|
||||
return fa->overloadInsert(s);
|
||||
}
|
||||
}
|
||||
|
||||
if (overnext == NULL)
|
||||
{
|
||||
if (s == this)
|
||||
|
||||
16
dmd/doc.c
16
dmd/doc.c
@@ -965,6 +965,7 @@ void DocComment::parseSections(unsigned char *comment)
|
||||
{
|
||||
p = skipwhitespace(p);
|
||||
pstart = p;
|
||||
pend = p;
|
||||
|
||||
/* Find end of section, which is ended by one of:
|
||||
* 'identifier:' (but not inside a code section)
|
||||
@@ -986,6 +987,7 @@ void DocComment::parseSections(unsigned char *comment)
|
||||
// BUG: handle UTF PS and LS too
|
||||
if (!*p || *p == '\r' || *p == '\n' && numdash >= 3)
|
||||
inCode ^= 1;
|
||||
pend = p;
|
||||
}
|
||||
|
||||
if (!inCode && isIdStart(p))
|
||||
@@ -1007,9 +1009,7 @@ void DocComment::parseSections(unsigned char *comment)
|
||||
while (1)
|
||||
{
|
||||
if (!*p)
|
||||
{ pend = p;
|
||||
goto L1;
|
||||
}
|
||||
if (*p == '\n')
|
||||
{ p++;
|
||||
if (*p == '\n' && !summary && !namelen)
|
||||
@@ -1021,6 +1021,7 @@ void DocComment::parseSections(unsigned char *comment)
|
||||
break;
|
||||
}
|
||||
p++;
|
||||
pend = p;
|
||||
}
|
||||
p = skipwhitespace(p);
|
||||
}
|
||||
@@ -1819,7 +1820,13 @@ void highlightText(Scope *sc, Dsymbol *s, OutBuffer *buf, unsigned offset)
|
||||
// Remove the entire --- line, including blanks and \n
|
||||
buf->remove(iLineStart, i - iLineStart + eollen);
|
||||
i = iLineStart;
|
||||
|
||||
|
||||
if (inCode && (i <= iCodeStart))
|
||||
{ // Empty code section, just remove it completely.
|
||||
inCode = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (inCode)
|
||||
{
|
||||
inCode = 0;
|
||||
@@ -1841,6 +1848,7 @@ void highlightText(Scope *sc, Dsymbol *s, OutBuffer *buf, unsigned offset)
|
||||
i = buf->insert(i, pre, sizeof(pre) - 1);
|
||||
iCodeStart = i;
|
||||
i--; // place i on >
|
||||
leadingBlank = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1893,6 +1901,8 @@ void highlightText(Scope *sc, Dsymbol *s, OutBuffer *buf, unsigned offset)
|
||||
}
|
||||
}
|
||||
Ldone:
|
||||
if (inCode)
|
||||
s->error("unmatched --- in DDoc comment");
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
1557
dmd/interpret.c
1557
dmd/interpret.c
File diff suppressed because it is too large
Load Diff
@@ -63,7 +63,7 @@ Global::Global()
|
||||
|
||||
copyright = "Copyright (c) 1999-2010 by Digital Mars and Tomas Lindquist Olsen";
|
||||
written = "written by Walter Bright and Tomas Lindquist Olsen";
|
||||
version = "v1.057";
|
||||
version = "v1.058";
|
||||
ldc_version = LDC_REV;
|
||||
llvm_version = LLVM_REV_STR;
|
||||
global.structalign = 8;
|
||||
|
||||
19
dmd/module.c
19
dmd/module.c
@@ -388,6 +388,15 @@ void Module::read(Loc loc)
|
||||
//printf("Module::read('%s') file '%s'\n", toChars(), srcfile->toChars());
|
||||
if (srcfile->read())
|
||||
{ error(loc, "cannot read file '%s'", srcfile->toChars());
|
||||
if (!global.gag)
|
||||
{ /* Print path
|
||||
*/
|
||||
for (size_t i = 0; i < global.path->dim; i++)
|
||||
{
|
||||
char *p = (char *)global.path->data[i];
|
||||
fprintf(stdmsg, "import path[%d] = %s\n", i, p);
|
||||
}
|
||||
}
|
||||
fatal();
|
||||
}
|
||||
}
|
||||
@@ -660,10 +669,12 @@ void Module::parse()
|
||||
// Update global list of modules
|
||||
if (!dst->insert(this))
|
||||
{
|
||||
if (md)
|
||||
error(loc, "is in multiple packages %s", md->toChars());
|
||||
else
|
||||
error(loc, "is in multiple defined");
|
||||
Dsymbol *prev = dst->lookup(ident);
|
||||
assert(prev);
|
||||
Module *mprev = prev->isModule();
|
||||
assert(mprev);
|
||||
error(loc, "from file %s conflicts with another module %s from file %s",
|
||||
srcname, mprev->toChars(), mprev->srcfile->toChars());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
15
dmd/mtype.c
15
dmd/mtype.c
@@ -2109,6 +2109,21 @@ int TypeSArray::isZeroInit(Loc loc)
|
||||
return next->isZeroInit(loc);
|
||||
}
|
||||
|
||||
Expression *TypeSArray::defaultInitLiteral(Loc loc)
|
||||
{
|
||||
#if LOGDEFAULTINIT
|
||||
printf("TypeSArray::defaultInitLiteral() '%s'\n", toChars());
|
||||
#endif
|
||||
size_t d = dim->toInteger();
|
||||
Expression *elementinit = next->defaultInitLiteral(loc);
|
||||
Expressions *elements = new Expressions();
|
||||
elements->setDim(d);
|
||||
for (size_t i = 0; i < d; i++)
|
||||
elements->data[i] = elementinit;
|
||||
ArrayLiteralExp *ae = new ArrayLiteralExp(0, elements);
|
||||
ae->type = this;
|
||||
return ae;
|
||||
}
|
||||
|
||||
Expression *TypeSArray::toExpression()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
// Compiler implementation of the D programming language
|
||||
// Copyright (c) 1999-2007 by Digital Mars
|
||||
// Copyright (c) 1999-2010 by Digital Mars
|
||||
// All Rights Reserved
|
||||
// written by Walter Bright
|
||||
// http://www.digitalmars.com
|
||||
@@ -344,6 +344,7 @@ struct TypeSArray : TypeArray
|
||||
unsigned memalign(unsigned salign);
|
||||
MATCH implicitConvTo(Type *to);
|
||||
Expression *defaultInit(Loc loc);
|
||||
Expression *defaultInitLiteral(Loc loc);
|
||||
#if IN_DMD
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
dt_t **toDtElem(dt_t **pdt, Expression *e);
|
||||
|
||||
Reference in New Issue
Block a user