Author: martin
Date: 2008-02-18 10:30:17 -0500 (Mon, 18 Feb 2008)
New Revision: 96064

Modified:
   branches/martin/debugger-terrania/symbolwriter/ChangeLog
   branches/martin/debugger-terrania/symbolwriter/MonoSymbolFile.cs
   branches/martin/debugger-terrania/symbolwriter/MonoSymbolTable.cs
   branches/martin/debugger-terrania/symbolwriter/MonoSymbolWriter.cs
Log:
2008-02-18  Martin Baulig  <[EMAIL PROTECTED]>

        * MonoSymbolTable.cs
        (CapturedVariable.CapturedKind): New public enum.
        (CapturedVariable): Replaced `IsLocal' by `Kind'.

        * MonoSymbolWriter.cs
        (MonoSymbolWriter.DefineCapturedVariable): Split into
        DefineCapturedLocal(), DefineCapturedParameter() and
        DefineCapturedThis().   



Modified: branches/martin/debugger-terrania/symbolwriter/ChangeLog
===================================================================
--- branches/martin/debugger-terrania/symbolwriter/ChangeLog    2008-02-18 
15:07:33 UTC (rev 96063)
+++ branches/martin/debugger-terrania/symbolwriter/ChangeLog    2008-02-18 
15:30:17 UTC (rev 96064)
@@ -1,3 +1,14 @@
+2008-02-18  Martin Baulig  <[EMAIL PROTECTED]>
+
+       * MonoSymbolTable.cs
+       (CapturedVariable.CapturedKind): New public enum.
+       (CapturedVariable): Replaced `IsLocal' by `Kind'.
+
+       * MonoSymbolWriter.cs
+       (MonoSymbolWriter.DefineCapturedVariable): Split into
+       DefineCapturedLocal(), DefineCapturedParameter() and
+       DefineCapturedThis().   
+
 2008-02-15  Martin Baulig  <[EMAIL PROTECTED]>
 
        * MonoSymbolTable.cs

Modified: branches/martin/debugger-terrania/symbolwriter/MonoSymbolFile.cs
===================================================================
--- branches/martin/debugger-terrania/symbolwriter/MonoSymbolFile.cs    
2008-02-18 15:07:33 UTC (rev 96063)
+++ branches/martin/debugger-terrania/symbolwriter/MonoSymbolFile.cs    
2008-02-18 15:30:17 UTC (rev 96064)
@@ -174,10 +174,10 @@
                }
 
                internal void DefineCapturedVariable (int scope_id, string 
name, string captured_name,
-                                                     bool is_local)
+                                                     
CapturedVariable.CapturedKind kind)
                {
                        AnonymousScopeEntry scope = (AnonymousScopeEntry) 
anonymous_scopes [scope_id];
-                       scope.AddCapturedVariable (name, captured_name, 
is_local);
+                       scope.AddCapturedVariable (name, captured_name, kind);
                }
 
                internal void DefineCapturedScope (int scope_id, int id, string 
captured_name)

Modified: branches/martin/debugger-terrania/symbolwriter/MonoSymbolTable.cs
===================================================================
--- branches/martin/debugger-terrania/symbolwriter/MonoSymbolTable.cs   
2008-02-18 15:07:33 UTC (rev 96063)
+++ branches/martin/debugger-terrania/symbolwriter/MonoSymbolTable.cs   
2008-02-18 15:30:17 UTC (rev 96064)
@@ -341,35 +341,42 @@
                #region This is actually written to the symbol file
                public readonly string Name;
                public readonly string CapturedName;
-               public readonly bool IsLocal;
+               public readonly CapturedKind Kind;
                #endregion
 
+               public enum CapturedKind : byte
+               {
+                       Local,
+                       Parameter,
+                       This
+               }
+
                public CapturedVariable (string name, string captured_name,
-                                        bool is_local)
+                                        CapturedKind kind)
                {
                        this.Name = name;
                        this.CapturedName = captured_name;
-                       this.IsLocal = is_local;
+                       this.Kind = kind;
                }
 
                internal CapturedVariable (MyBinaryReader reader)
                {
                        Name = reader.ReadString ();
                        CapturedName = reader.ReadString ();
-                       IsLocal = reader.ReadBoolean ();
+                       Kind = (CapturedKind) reader.ReadByte ();
                }
 
                internal void Write (MyBinaryWriter bw)
                {
                        bw.Write (Name);
                        bw.Write (CapturedName);
-                       bw.Write (IsLocal);
+                       bw.Write ((byte) Kind);
                }
 
                public override string ToString ()
                {
                        return String.Format ("[CapturedVariable {0}:{1}:{2}]",
-                                             Name, CapturedName, IsLocal);
+                                             Name, CapturedName, Kind);
                }
        }
 
@@ -463,9 +470,10 @@
                                captured_scopes.Add (new CapturedScope 
(reader));
                }
 
-               internal void AddCapturedVariable (string name, string 
captured_name, bool is_local)
+               internal void AddCapturedVariable (string name, string 
captured_name,
+                                                  
CapturedVariable.CapturedKind kind)
                {
-                       captured_vars.Add (new CapturedVariable (name, 
captured_name, is_local));
+                       captured_vars.Add (new CapturedVariable (name, 
captured_name, kind));
                }
 
                public CapturedVariable[] CapturedVariables {

Modified: branches/martin/debugger-terrania/symbolwriter/MonoSymbolWriter.cs
===================================================================
--- branches/martin/debugger-terrania/symbolwriter/MonoSymbolWriter.cs  
2008-02-18 15:07:33 UTC (rev 96063)
+++ branches/martin/debugger-terrania/symbolwriter/MonoSymbolWriter.cs  
2008-02-18 15:30:17 UTC (rev 96064)
@@ -104,12 +104,24 @@
                        current_method.AddLocal (index, name, signature);
                }
 
-               public void DefineCapturedVariable (int scope_id, string name, 
string captured_name,
-                                                   bool is_local)
+               public void DefineCapturedLocal (int scope_id, string name, 
string captured_name)
                {
-                       file.DefineCapturedVariable (scope_id, name, 
captured_name, is_local);
+                       file.DefineCapturedVariable (scope_id, name, 
captured_name,
+                                                    
CapturedVariable.CapturedKind.Local);
                }
 
+               public void DefineCapturedParameter (int scope_id, string name, 
string captured_name)
+               {
+                       file.DefineCapturedVariable (scope_id, name, 
captured_name,
+                                                    
CapturedVariable.CapturedKind.Parameter);
+               }
+
+               public void DefineCapturedThis (int scope_id, string 
captured_name)
+               {
+                       file.DefineCapturedVariable (scope_id, "this", 
captured_name,
+                                                    
CapturedVariable.CapturedKind.This);
+               }
+
                public void DefineCapturedScope (int scope_id, int id, string 
captured_name)
                {
                        file.DefineCapturedScope (scope_id, id, captured_name);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to