# HG changeset patch # User Christian Kamm # Date 1234705833 -3600 # Node ID 31bbc7f3b8173a503f70b1691b414c85f68b2f87 # Parent 369996c08420def36330920aa8e56eed07b4a52c Backed out changeset [369996c08420]. The argument and order dependent numbering of static ctors/dtors generally doesn't matter because other modules shouldn't reference their symbols. The next changeset will fix a LDC bug that caused such references within ModuleInfo. diff -r 369996c08420 -r 31bbc7f3b817 dmd/func.c --- a/dmd/func.c Sun Feb 15 11:46:28 2009 +0100 +++ b/dmd/func.c Sun Feb 15 14:50:33 2009 +0100 @@ -2420,7 +2420,7 @@ StaticCtorDeclaration::StaticCtorDeclaration(Loc loc, Loc endloc) : FuncDeclaration(loc, endloc, - Lexer::idPool("_staticCtor"), STCstatic, NULL) + Identifier::generateId("_staticCtor"), STCstatic, NULL) { } @@ -2438,9 +2438,6 @@ { //printf("StaticCtorDeclaration::semantic()\n"); - // get ourselves a scope-unique id - ident = sc->module->generateId(ident); - type = new TypeFunction(NULL, Type::tvoid, FALSE, LINKd); /* If the static ctor appears within a template instantiation, @@ -2524,7 +2521,7 @@ StaticDtorDeclaration::StaticDtorDeclaration(Loc loc, Loc endloc) : FuncDeclaration(loc, endloc, - Lexer::idPool("_staticDtor"), STCstatic, NULL) + Identifier::generateId("_staticDtor"), STCstatic, NULL) { vgate = NULL; } @@ -2541,9 +2538,6 @@ void StaticDtorDeclaration::semantic(Scope *sc) { - // get ourselves a scope-unique id - ident = sc->module->generateId(ident); - ClassDeclaration *cd; Type *tret; diff -r 369996c08420 -r 31bbc7f3b817 dmd/module.c --- a/dmd/module.c Sun Feb 15 11:46:28 2009 +0100 +++ b/dmd/module.c Sun Feb 15 14:50:33 2009 +0100 @@ -130,7 +130,6 @@ llvmForceLogging = false; this->doDocComment = doDocComment; this->doHdrGen = doHdrGen; - uniqueId = 0; } File* Module::buildFilePath(char* forcename, char* path, char* ext) @@ -1008,8 +1007,3 @@ } return dst; } - -Identifier* Module::generateId(Identifier* id) -{ - return Identifier::generateId(id->string, uniqueId++); -} diff -r 369996c08420 -r 31bbc7f3b817 dmd/module.h --- a/dmd/module.h Sun Feb 15 11:46:28 2009 +0100 +++ b/dmd/module.h Sun Feb 15 14:50:33 2009 +0100 @@ -179,10 +179,6 @@ // array ops emitted in this module already StringTable arrayfuncs; - - // for numbering staticCtors etc. - int uniqueId; - Identifier* generateId(Identifier* id); };