comparison dmd/declaration.c @ 468:45a67b6f1310

Removed the 'needsstorage' thing from Dsymbol. Arguments are not always given storage when applicable. This is not longer treat specially in this regard. Code for accessing nested variables and contexts rewritten. Probably more. Fairly well tested.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Mon, 04 Aug 2008 02:59:34 +0200
parents aaade6ded589
children 50383e476c7e
comparison
equal deleted inserted replaced
467:261b05cf4d1c 468:45a67b6f1310
619 ctorinit = 0; 619 ctorinit = 0;
620 aliassym = NULL; 620 aliassym = NULL;
621 onstack = 0; 621 onstack = 0;
622 canassign = 0; 622 canassign = 0;
623 value = NULL; 623 value = NULL;
624
625 // LLVMDC
626 needsStorage = false;
627 } 624 }
628 625
629 Dsymbol *VarDeclaration::syntaxCopy(Dsymbol *s) 626 Dsymbol *VarDeclaration::syntaxCopy(Dsymbol *s)
630 { 627 {
631 //printf("VarDeclaration::syntaxCopy(%s)\n", toChars()); 628 //printf("VarDeclaration::syntaxCopy(%s)\n", toChars());
643 //init->isExpInitializer()->exp->dump(0); 640 //init->isExpInitializer()->exp->dump(0);
644 } 641 }
645 642
646 sv = new VarDeclaration(loc, type ? type->syntaxCopy() : NULL, ident, init); 643 sv = new VarDeclaration(loc, type ? type->syntaxCopy() : NULL, ident, init);
647 sv->storage_class = storage_class; 644 sv->storage_class = storage_class;
648 // LLVMDC
649 sv->needsStorage = needsStorage;
650 } 645 }
651 #ifdef _DH 646 #ifdef _DH
652 // Syntax copy for header file 647 // Syntax copy for header file
653 if (!htype) // Don't overwrite original 648 if (!htype) // Don't overwrite original
654 { if (type) // Make copy for both old and new instances 649 { if (type) // Make copy for both old and new instances