Merge pull request #486 from klickverbot/dmd-diff

Low-hanging DMD diff reduction fruit
This commit is contained in:
David Nadlinger
2013-10-05 15:43:17 -07:00
5 changed files with 8 additions and 14 deletions

View File

@@ -129,7 +129,7 @@ int StructLiteralExp::apply(fp_t fp, void *param)
stageflags |= stageApply;
int ret = condApply(elements, fp, param) ||
(*fp)(this, param);
stageflags = old;
stageflags = old;
return ret;
}

View File

@@ -164,7 +164,7 @@ Lneed:
* Note that s will be constructed onto the stack, and probably
* copy-constructed in caller site.
*
* If S has copy copy construction and/or destructor,
* If S has copy copy construction and/or destructor,
* the body will make bit-wise object swap:
* S __tmp = this; // bit copy
* this = s; // bit copy

View File

@@ -21,10 +21,6 @@
#include "scope.h"
#include "init.h"
#if IN_LLVM
#include "init.h"
#endif
/********************************************
* Convert from expression to delegate that returns the expression,
* i.e. convert:

View File

@@ -1644,7 +1644,7 @@ Type *Type::merge()
//if (next)
//next = next->merge();
toDecoBuffer(&buf, 0);
toDecoBuffer(&buf);
sv = stringtable.update((char *)buf.data, buf.offset);
if (sv->ptrvalue)
{ t = (Type *) sv->ptrvalue;
@@ -2215,7 +2215,7 @@ Identifier *Type::getTypeInfoIdent(int internal)
buf.writeByte(mangleChar[((TypeArray *)this)->next->ty]);
}
else
toDecoBuffer(&buf, 0);
toDecoBuffer(&buf);
size_t len = buf.offset;
buf.writeByte(0);
@@ -4728,7 +4728,7 @@ Expression *TypeAArray::dotExp(Scope *sc, Expression *e, Identifier *ident, int
void TypeAArray::toDecoBuffer(OutBuffer *buf, int flag)
{
Type::toDecoBuffer(buf, flag);
index->toDecoBuffer(buf, 0);
index->toDecoBuffer(buf);
next->toDecoBuffer(buf, (flag & 0x100) ? 0 : mod);
}
@@ -5390,13 +5390,12 @@ void TypeFunction::toDecoBuffer(OutBuffer *buf, int flag)
default: break;
}
}
// Write argument types
Parameter::argsToDecoBuffer(buf, parameters);
//if (buf->data[buf->offset - 1] == '@') halt();
buf->writeByte('Z' - varargs); // mark end of arg list
if(next != NULL)
next->toDecoBuffer(buf, 0);
next->toDecoBuffer(buf);
inuse--;
}
@@ -5695,7 +5694,7 @@ Type *TypeFunction::semantic(Loc loc, Scope *sc)
if (!fparam->type)
continue;
}
// Possible merge conflict
Type *t = fparam->type->toBasetype();
if (fparam->storageClass & (STCout | STCref | STClazy))

View File

@@ -259,7 +259,6 @@ struct Type : Object
virtual unsigned alignsize();
virtual Type *semantic(Loc loc, Scope *sc);
Type *trySemantic(Loc loc, Scope *sc);
// append the mangleof or a string uniquely identifying this type to buf
virtual void toDecoBuffer(OutBuffer *buf, int flag = 0);
Type *merge();
Type *merge2();
@@ -821,7 +820,7 @@ struct TypeInstance : TypeQualified
const char *kind();
Type *syntaxCopy();
//char *toChars();
//void toDecoBuffer(OutBuffer *buf, int flag, bool mangle);
//void toDecoBuffer(OutBuffer *buf, int flag);
void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
void toJson(JsonOut *json);
void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps);