Change the numbering of static ctors/dtors to be module based instead of being global.

This fixes #210 by making sure that the static ctor always gets the same
number, regardless of the order of the modules given at the command line.
This commit is contained in:
Christian Kamm
2009-02-15 11:46:28 +01:00
parent 0676cf018d
commit 89bf7d82d7
3 changed files with 18 additions and 2 deletions

View File

@@ -179,6 +179,10 @@ struct Module : Package
// array ops emitted in this module already
StringTable arrayfuncs;
// for numbering staticCtors etc.
int uniqueId;
Identifier* generateId(Identifier* id);
};