Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <martin@novell.com>2003-03-22 14:42:31 +0300
committerMartin Baulig <martin@novell.com>2003-03-22 14:42:31 +0300
commit603999bb91188fd033fd5d51e1794db2b57280ba (patch)
treeeebed74b12d9b58e35e88cd2e7c2bdc559254f03 /mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs
parent1ab0facfacaa52ad8849013c04296066fe118f35 (diff)
2003-03-22 Martin Baulig <martin@ximian.com>
* MonoSymbolTable.cs (MethodEntry.LocalNamesAmbiguous): New public field. Specifies whether two local variables have the same name. svn path=/trunk/mcs/; revision=12742
Diffstat (limited to 'mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs')
-rw-r--r--mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs b/mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs
index 12c5fe417a2..d9aa6007552 100644
--- a/mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs
+++ b/mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs
@@ -18,7 +18,7 @@ namespace Mono.CSharp.Debugger
{
public struct OffsetTable
{
- public const int Version = 34;
+ public const int Version = 35;
public const long Magic = 0x45e82623fd7fa614;
public int TotalFileSize;
@@ -447,6 +447,7 @@ namespace Mono.CSharp.Debugger
public readonly int NumLocals;
public readonly int NumLineNumbers;
public readonly int NamespaceID;
+ public readonly bool LocalNamesAmbiguous;
int NameOffset;
int FullNameOffset;
@@ -509,6 +510,7 @@ namespace Mono.CSharp.Debugger
NumLexicalBlocks = reader.ReadInt32 ();
LexicalBlockTableOffset = reader.ReadInt32 ();
NamespaceID = reader.ReadInt32 ();
+ LocalNamesAmbiguous = reader.ReadInt32 () != 0;
name = file.ReadString (NameOffset);
full_name = file.ReadString (FullNameOffset);
@@ -619,6 +621,15 @@ namespace Mono.CSharp.Debugger
NumLocals = locals.Length;
Locals = locals;
+ Hashtable local_names = new Hashtable ();
+ foreach (LocalVariableEntry local in locals) {
+ if (local_names.Contains (local.Name)) {
+ LocalNamesAmbiguous = true;
+ break;
+ }
+ local_names.Add (local.Name, local);
+ }
+
LocalTypeIndices = new int [NumLocals];
for (int i = 0; i < NumLocals; i++)
LocalTypeIndices [i] = file.GetNextTypeIndex ();
@@ -701,6 +712,7 @@ namespace Mono.CSharp.Debugger
bw.Write (NumLexicalBlocks);
bw.Write (LexicalBlockTableOffset);
bw.Write (NamespaceID);
+ bw.Write (LocalNamesAmbiguous ? 1 : 0);
return new MethodSourceEntry (index, file_offset, StartRow, EndRow);
}