mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-05-02 00:11:30 +02:00
Merge pull request #486 from klickverbot/dmd-diff
Low-hanging DMD diff reduction fruit
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
11
dmd2/mtype.c
11
dmd2/mtype.c
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user