Skip to content

Commit

Permalink
fix Issue 15072 - Re-introducing codegen performance regression 14805
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Sep 16, 2015
1 parent 2c94b22 commit 340592e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/todt.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dt_t **toDtElem(TypeSArray *tsa, dt_t **pdt, Expression *e);
void ClassDeclaration_toDt(ClassDeclaration *cd, dt_t **pdt);
void StructDeclaration_toDt(StructDeclaration *sd, dt_t **pdt);
void membersToDt(AggregateDeclaration *cd, dt_t **pdt, ClassDeclaration * = NULL);
void membersToDt(AggregateDeclaration *ad, dt_t **pdt, Expressions *elements, size_t = 0, ClassDeclaration * = NULL);
dt_t **membersToDt(AggregateDeclaration *ad, dt_t **pdt, Expressions *elements, size_t = 0, ClassDeclaration * = NULL);
dt_t **ClassReferenceExp_toDt(ClassReferenceExp *e, dt_t **pdt, int off);
dt_t **ClassReferenceExp_toInstanceDt(ClassReferenceExp *ce, dt_t **pdt);
Symbol *toSymbol(Dsymbol *s);
Expand Down Expand Up @@ -446,7 +446,7 @@ dt_t **Expression_toDt(Expression *e, dt_t **pdt)
{
//printf("StructLiteralExp::toDt() %s, ctfe = %d\n", sle->toChars(), sle->ownedByCtfe);
assert(sle->sd->fields.dim - sle->sd->isNested() <= sle->elements->dim);
membersToDt(sle->sd, pdt, sle->elements);
pdt = membersToDt(sle->sd, pdt, sle->elements);
}

void visit(SymOffExp *e)
Expand Down Expand Up @@ -719,7 +719,7 @@ void membersToDt(AggregateDeclaration *ad, dt_t **pdt,
/****************************************************
* Put out elements[].
*/
void membersToDt(AggregateDeclaration *ad, dt_t **pdt,
dt_t **membersToDt(AggregateDeclaration *ad, dt_t **pdt,
Expressions *elements, size_t firstFieldIndex,
ClassDeclaration *concreteType)
{
Expand Down Expand Up @@ -817,6 +817,8 @@ void membersToDt(AggregateDeclaration *ad, dt_t **pdt,

if (offset < ad->structsize)
dtnzeros(pdt, ad->structsize - offset);

return pdt;
}

/* ================================================================= */
Expand Down

0 comments on commit 340592e

Please sign in to comment.