Mercurial > projects > ldc
diff dmd/interpret.c @ 1590:8aa756a00228
Replace DMD's isSymbolDeclaration with isStaticStructInitDeclaration.
See also [913] and bug #198.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 07 Nov 2009 11:14:37 +0100 |
parents | def7a1d494fd |
children | 207a8a438dea |
line wrap: on
line diff
--- a/dmd/interpret.c Sat Nov 07 11:01:49 2009 +0100 +++ b/dmd/interpret.c Sat Nov 07 11:14:37 2009 +0100 @@ -196,15 +196,12 @@ } if (!v2->value || v2->value->op != TOKvar) break; -//TODO -#ifdef IN_DMD - if (((VarExp *)v2->value)->var->isSymbolDeclaration()) + if (((VarExp *)v2->value)->var->isStaticStructInitDeclaration()) { // This can happen if v is a struct initialized to // 0 using an __initZ SymbolDeclaration from // TypeStruct::defaultInit() break; // eg default-initialized variable } -#endif earg = v2->value; } @@ -1608,15 +1605,12 @@ if (v && v->value && v->value->op == TOKvar) { VarExp *ve2 = (VarExp *)v->value; -//TODO -#ifdef IN_DMD - if (ve2->var->isSymbolDeclaration()) + if (ve2->var->isStaticStructInitDeclaration()) { // This can happen if v is a struct initialized to // 0 using an __initZ SymbolDeclaration from // TypeStruct::defaultInit() } else -#endif e1 = v->value; } else if (v && v->value && (v->value->op==TOKindex || v->value->op == TOKdotvar)) @@ -1694,15 +1688,12 @@ if (v->value && v->value->op == TOKvar) { VarExp *ve2 = (VarExp *)v->value; -//TODO -#ifdef IN_DMD - if (ve2->var->isSymbolDeclaration()) + if (ve2->var->isStaticStructInitDeclaration()) { // This can happen if v is a struct initialized to // 0 using an __initZ SymbolDeclaration from // TypeStruct::defaultInit() } else -#endif v = ve2->var->isVarDeclaration(); assert(v); } @@ -1814,15 +1805,12 @@ if (v->value && v->value->op == TOKvar) { VarExp *ve2 = (VarExp *)v->value; -// TODO -#ifdef IN_DMD - if (ve2->var->isSymbolDeclaration()) + if (ve2->var->isStaticStructInitDeclaration()) { // This can happen if v is a struct initialized to // 0 using an __initZ SymbolDeclaration from // TypeStruct::defaultInit() } else -#endif v = ve2->var->isVarDeclaration(); assert(v); } @@ -2073,15 +2061,12 @@ if (v->value && v->value->op == TOKvar) { VarExp *ve2 = (VarExp *)v->value; -// TODO -#ifdef IN_DMD - if (ve2->var->isSymbolDeclaration()) + if (ve2->var->isStaticStructInitDeclaration()) { // This can happen if v is a struct initialized to // 0 using an __initZ SymbolDeclaration from // TypeStruct::defaultInit() } else -#endif v = ve2->var->isVarDeclaration(); assert(v); }