Mercurial > projects > ldc
comparison dmd/interpret.c @ 1619:c61782a76dff
Merge DMD r304: refactor invariant => immutable
---
dmd/cast.c | 2 +-
dmd/declaration.c | 2 +-
dmd/declaration.h | 3 +--
dmd/doc.c | 2 +-
dmd/expression.c | 6 +++---
dmd/interpret.c | 4 ++--
dmd/mtype.c | 2 +-
dmd/mtype.h | 2 +-
dmd/parse.c | 4 ++--
dmd/struct.c | 2 +-
10 files changed, 14 insertions(+), 15 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:22 -0300 |
parents | 8f50a13d09a0 |
children | 0333945a915e |
comparison
equal
deleted
inserted
replaced
1618:a87f1d6ff48e | 1619:c61782a76dff |
---|---|
991 VarDeclaration *v = d->isVarDeclaration(); | 991 VarDeclaration *v = d->isVarDeclaration(); |
992 StaticStructInitDeclaration *s = d->isStaticStructInitDeclaration(); | 992 StaticStructInitDeclaration *s = d->isStaticStructInitDeclaration(); |
993 if (v) | 993 if (v) |
994 { | 994 { |
995 #if DMDV2 | 995 #if DMDV2 |
996 if ((v->isConst() || v->isInvariant() || v->storage_class & STCmanifest) && v->init && !v->value) | 996 if ((v->isConst() || v->isImmutable() || v->storage_class & STCmanifest) && v->init && !v->value) |
997 #else | 997 #else |
998 if (v->isConst() && v->init) | 998 if (v->isConst() && v->init) |
999 #endif | 999 #endif |
1000 { e = v->init->toExpression(); | 1000 { e = v->init->toExpression(); |
1001 if (e && !e->type) | 1001 if (e && !e->type) |
1049 e = ie->exp->interpret(istate); | 1049 e = ie->exp->interpret(istate); |
1050 else if (v->init->isVoidInitializer()) | 1050 else if (v->init->isVoidInitializer()) |
1051 e = NULL; | 1051 e = NULL; |
1052 } | 1052 } |
1053 #if DMDV2 | 1053 #if DMDV2 |
1054 else if (s == v && (v->isConst() || v->isInvariant()) && v->init) | 1054 else if (s == v && (v->isConst() || v->isImmutable()) && v->init) |
1055 #else | 1055 #else |
1056 else if (s == v && v->isConst() && v->init) | 1056 else if (s == v && v->isConst() && v->init) |
1057 #endif | 1057 #endif |
1058 { e = v->init->toExpression(); | 1058 { e = v->init->toExpression(); |
1059 if (!e) | 1059 if (!e) |