Mercurial > projects > ldc
changeset 893:e74e2e53ba3b
Remove optimizer syntax copies where they weren't proven to be necessary.
Copying without calling semantic() leads to issues for more complicated
expressions.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 18 Jan 2009 14:14:40 +0100 |
parents | 063ba84a965f |
children | 77a3d6945f81 |
files | dmd/optimize.c |
diffstat | 1 files changed, 0 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/dmd/optimize.c Sun Jan 18 13:18:31 2009 +0100 +++ b/dmd/optimize.c Sun Jan 18 14:14:40 2009 +0100 @@ -365,7 +365,6 @@ if (e1->op == TOKnull && (type->ty == Tpointer || type->ty == Tclass)) { - e1 = e1->syntaxCopy(); e1->type = type; return e1; } @@ -381,7 +380,6 @@ cdto = type->isClassHandle(); if (cdto->isBaseOf(cdfrom, &offset) && offset == 0) { - e1 = e1->syntaxCopy(); e1->type = type; return e1; } @@ -396,7 +394,6 @@ if (type->size() == e1->type->size() && type->toBasetype()->ty != Tsarray) { - e1 = e1->syntaxCopy(); e1->type = type; return e1; }