diff options
author | 2011-08-03 13:18:53 -0700 | |
---|---|---|
committer | 2011-08-03 13:18:53 -0700 | |
commit | 5da13c0983715868089f49ca38855816e5faa3c7 (patch) | |
tree | ff03dc95692e68ab0b38dd664f07ef39c3893e3a /BCT/BytecodeTranslator/Heap.cs | |
parent | f29c3a7e467c273fe9c4900eb971e6148edcc1d7 (diff) |
Increase the name mangling to avoid name clashes in the Boogie program. In IL,
members of a type can have the same name.
Diffstat (limited to 'BCT/BytecodeTranslator/Heap.cs')
-rw-r--r-- | BCT/BytecodeTranslator/Heap.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/BCT/BytecodeTranslator/Heap.cs b/BCT/BytecodeTranslator/Heap.cs index 664db230..751d8baa 100644 --- a/BCT/BytecodeTranslator/Heap.cs +++ b/BCT/BytecodeTranslator/Heap.cs @@ -207,6 +207,9 @@ namespace BytecodeTranslator { Bpl.Variable v;
string fieldname = TypeHelper.GetTypeName(field.ContainingType) + "." + field.Name.Value;
fieldname = TranslationHelper.TurnStringIntoValidIdentifier(fieldname);
+ // Need to append something to the name to avoid name clashes with other members (of a different
+ // type) that have the same name.
+ fieldname += "$field";
Bpl.IToken tok = field.Token();
if (field.IsStatic) {
|