Author: jbevain
Date: 2006-09-18 20:20:35 -0400 (Mon, 18 Sep 2006)
New Revision: 65614

Added:
   trunk/cecil/lib/Mono.Cecil.Cil/Document.cs
   trunk/cecil/lib/Mono.Cecil.Cil/IScopeProvider.cs
   trunk/cecil/lib/Mono.Cecil.Cil/IVariableDefinitionProvider.cs
   trunk/cecil/lib/Mono.Cecil.Cil/Scope.cs
   trunk/cecil/lib/Mono.Cecil.Cil/ScopeCollection.cs
   trunk/cecil/lib/Mono.Cecil.Cil/SequencePoint.cs
Modified:
   trunk/cecil/lib/ChangeLog
   trunk/cecil/lib/CodeGen/cecil.xml
   trunk/cecil/lib/Mono.Cecil.Cil/BaseCodeVisitor.cs
   trunk/cecil/lib/Mono.Cecil.Cil/CodeReader.cs
   trunk/cecil/lib/Mono.Cecil.Cil/CodeWriter.cs
   trunk/cecil/lib/Mono.Cecil.Cil/ICodeVisitor.cs
   trunk/cecil/lib/Mono.Cecil.Cil/MethodBody.cs
   trunk/cecil/lib/Mono.Cecil.Cil/VariableDefinitionCollection.cs
   trunk/cecil/lib/Mono.Cecil.dll.sources
Log:
2006-09-19  Jb Evain  <[EMAIL PROTECTED]>

        * Mono.Cecil.dll.sources
          Mono.Cecil.Cil/Document.cs
          Mono.Cecil.Cil/IVariableDefinitionProvider.cs
          Mono.Cecil.Cil/SequencePoint.cs
          Mono.Cecil.Cil/ScopeCollection.cs
          Mono.Cecil.Cil/BaseCodeVisitor.cs
          Mono.Cecil.Cil/CodeReader.cs
          Mono.Cecil.Cil/IScopeProvider.cs
          Mono.Cecil.Cil/MethodBody.cs
          Mono.Cecil.Cil/ICodeVisitor.cs
          Mono.Cecil.Cil/CodeWriter.cs
          Mono.Cecil.Cil/Scope.cs
          Mono.Cecil.Cil/VariableDefinitionCollection.cs
          CodeGen/cecil.xml:
                First bits of the debug infos stuff.


Modified: trunk/cecil/lib/ChangeLog
===================================================================
--- trunk/cecil/lib/ChangeLog   2006-09-19 00:04:29 UTC (rev 65613)
+++ trunk/cecil/lib/ChangeLog   2006-09-19 00:20:35 UTC (rev 65614)
@@ -1,5 +1,21 @@
 2006-09-19  Jb Evain  <[EMAIL PROTECTED]>
 
+       * Mono.Cecil.dll.sources
+         Mono.Cecil.Cil/Document.cs
+         Mono.Cecil.Cil/IVariableDefinitionProvider.cs
+         Mono.Cecil.Cil/SequencePoint.cs
+         Mono.Cecil.Cil/ScopeCollection.cs
+         Mono.Cecil.Cil/BaseCodeVisitor.cs
+         Mono.Cecil.Cil/CodeReader.cs
+         Mono.Cecil.Cil/IScopeProvider.cs
+         Mono.Cecil.Cil/MethodBody.cs
+         Mono.Cecil.Cil/ICodeVisitor.cs
+         Mono.Cecil.Cil/CodeWriter.cs
+         Mono.Cecil.Cil/Scope.cs
+         Mono.Cecil.Cil/VariableDefinitionCollection.cs
+         CodeGen/cecil.xml:
+               First bits of the debug infos stuff.
+
        * Mono.Cecil.Cil/InstructionCollection.cs
          CodeGen/templates/IndexedCollection.cs:
                The outside instruction has an offset of -1.

Modified: trunk/cecil/lib/CodeGen/cecil.xml
===================================================================
--- trunk/cecil/lib/CodeGen/cecil.xml   2006-09-19 00:04:29 UTC (rev 65613)
+++ trunk/cecil/lib/CodeGen/cecil.xml   2006-09-19 00:20:35 UTC (rev 65614)
@@ -575,7 +575,7 @@
                <collection type="PropertyDefinition" 
container="TypeDefinition" visit="IReflection" target="Mono.Cecil" 
indexed="true" />
                <collection type="Instruction" container="MethodBody" 
visit="ICode" indexed="true" target="Mono.Cecil.Cil" />
                <collection type="ExceptionHandler" container="MethodBody" 
visit="ICode" indexed="true" target="Mono.Cecil.Cil" />
-               <collection type="VariableDefinition" container="MethodBody" 
visit="ICode" indexed="true" target="Mono.Cecil.Cil" />
+               <collection type="VariableDefinition" 
container="IVariableDefinitionProvider" visit="ICode" indexed="true" 
target="Mono.Cecil.Cil" />
                <collection type="ArrayDimension" container="ArrayType" 
target="Mono.Cecil" indexed="true" />
                <!-- modified behaviour
                <collection type="SecurityDeclaration" container="IHasSecurity" 
usecontainerinterface="true" target="Mono.Cecil" indexed="true" 
visit="IReflection" />
@@ -587,6 +587,7 @@
                <collection type="GenericParameter" 
container="IGenericParameterProvider" usecontainerinterface="true" 
target="Mono.Cecil" indexed="true" visit="IReflection" />
                <collection type="TypeReference" name="GenericArgument" 
container="IGenericInstance" target="Mono.Cecil" indexed="true" />
                <collection type="TypeReference" name="Constraint" 
container="GenericParameter" target="Mono.Cecil" indexed="true" />
+               <collection type="Scope" container="IScopeProvider" 
visit="ICode" target="Mono.Cecil.Cil" indexed="true" />
        </collections>
 
 </cecil>

Modified: trunk/cecil/lib/Mono.Cecil.Cil/BaseCodeVisitor.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/BaseCodeVisitor.cs   2006-09-19 00:04:29 UTC 
(rev 65613)
+++ trunk/cecil/lib/Mono.Cecil.Cil/BaseCodeVisitor.cs   2006-09-19 00:20:35 UTC 
(rev 65614)
@@ -58,6 +58,14 @@
                {
                }
 
+               public virtual void VisitScopeCollection (ScopeCollection 
scopes)
+               {
+               }
+
+               public virtual void VisitScope (Scope s)
+               {
+               }
+
                public virtual void TerminateMethodBody (MethodBody body)
                {
                }

Modified: trunk/cecil/lib/Mono.Cecil.Cil/CodeReader.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/CodeReader.cs        2006-09-19 00:04:29 UTC 
(rev 65613)
+++ trunk/cecil/lib/Mono.Cecil.Cil/CodeReader.cs        2006-09-19 00:20:35 UTC 
(rev 65614)
@@ -358,8 +358,8 @@
 
                public override void VisitVariableDefinitionCollection 
(VariableDefinitionCollection variables)
                {
-                       MethodBody body = variables.Container;
-                       if (body.LocalVarToken == 0)
+                       MethodBody body = variables.Container as MethodBody;
+                       if (body == null || body.LocalVarToken == 0)
                                return;
 
                        StandAloneSigTable sasTable = 
m_reflectReader.TableReader.GetStandAloneSigTable ();

Modified: trunk/cecil/lib/Mono.Cecil.Cil/CodeWriter.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/CodeWriter.cs        2006-09-19 00:04:29 UTC 
(rev 65613)
+++ trunk/cecil/lib/Mono.Cecil.Cil/CodeWriter.cs        2006-09-19 00:20:35 UTC 
(rev 65614)
@@ -361,7 +361,10 @@
 
                public override void VisitVariableDefinitionCollection 
(VariableDefinitionCollection variables)
                {
-                       MethodBody body = variables.Container;
+                       MethodBody body = variables.Container as MethodBody;
+                       if (body == null)
+                               return;
+
                        uint sig = 
m_reflectWriter.SignatureWriter.AddLocalVarSig (
                                        GetLocalVarSig (variables));
 

Added: trunk/cecil/lib/Mono.Cecil.Cil/Document.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/Document.cs  2006-09-19 00:04:29 UTC (rev 
65613)
+++ trunk/cecil/lib/Mono.Cecil.Cil/Document.cs  2006-09-19 00:20:35 UTC (rev 
65614)
@@ -0,0 +1,45 @@
+//
+// Document.cs
+//
+// Author:
+//   Jb Evain ([EMAIL PROTECTED])
+//
+// (C) 2006 Jb Evain
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Mono.Cecil.Cil {
+
+       public class Document {
+
+               string m_url;
+
+               public string Url {
+                       get { return m_url; }
+                       set { m_url = value; }
+               }
+
+               public Document (string url)
+               {
+                       m_url = url;
+               }
+       }
+}

Modified: trunk/cecil/lib/Mono.Cecil.Cil/ICodeVisitor.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/ICodeVisitor.cs      2006-09-19 00:04:29 UTC 
(rev 65613)
+++ trunk/cecil/lib/Mono.Cecil.Cil/ICodeVisitor.cs      2006-09-19 00:20:35 UTC 
(rev 65614)
@@ -37,6 +37,8 @@
                void VisitExceptionHandler (ExceptionHandler eh);
                void VisitVariableDefinitionCollection 
(VariableDefinitionCollection variables);
                void VisitVariableDefinition (VariableDefinition var);
+               void VisitScopeCollection (ScopeCollection scopes);
+               void VisitScope (Scope scope);
 
                void TerminateMethodBody (MethodBody body);
        }

Added: trunk/cecil/lib/Mono.Cecil.Cil/IScopeProvider.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/IScopeProvider.cs    2006-09-19 00:04:29 UTC 
(rev 65613)
+++ trunk/cecil/lib/Mono.Cecil.Cil/IScopeProvider.cs    2006-09-19 00:20:35 UTC 
(rev 65614)
@@ -0,0 +1,35 @@
+//
+// Document.cs
+//
+// Author:
+//   Jb Evain ([EMAIL PROTECTED])
+//
+// (C) 2006 Jb Evain
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Mono.Cecil.Cil {
+
+       public interface IScopeProvider {
+
+               ScopeCollection Scopes { get; }
+       }
+}

Added: trunk/cecil/lib/Mono.Cecil.Cil/IVariableDefinitionProvider.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/IVariableDefinitionProvider.cs       
2006-09-19 00:04:29 UTC (rev 65613)
+++ trunk/cecil/lib/Mono.Cecil.Cil/IVariableDefinitionProvider.cs       
2006-09-19 00:20:35 UTC (rev 65614)
@@ -0,0 +1,35 @@
+//
+// IVariableDefinitionProvider.cs
+//
+// Author:
+//   Jb Evain ([EMAIL PROTECTED])
+//
+// (C) 2006 Jb Evain
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Mono.Cecil.Cil {
+
+       public interface IVariableDefinitionProvider {
+
+               VariableDefinitionCollection Variables { get; }
+       }
+}

Modified: trunk/cecil/lib/Mono.Cecil.Cil/MethodBody.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/MethodBody.cs        2006-09-19 00:04:29 UTC 
(rev 65613)
+++ trunk/cecil/lib/Mono.Cecil.Cil/MethodBody.cs        2006-09-19 00:20:35 UTC 
(rev 65614)
@@ -30,7 +30,7 @@
 
        using Mono.Cecil;
 
-       public sealed class MethodBody : ICodeVisitable {
+       public sealed class MethodBody : IVariableDefinitionProvider, 
IScopeProvider, ICodeVisitable {
 
                MethodDefinition m_method;
                int m_maxStack;
@@ -41,6 +41,7 @@
                InstructionCollection m_instructions;
                ExceptionHandlerCollection m_exceptions;
                VariableDefinitionCollection m_variables;
+               ScopeCollection m_scopes;
 
                private CilWorker m_cilWorker;
 
@@ -89,6 +90,15 @@
                        get { return m_variables; }
                }
 
+               public ScopeCollection Scopes {
+                       get {
+                               if (m_scopes == null)
+                                       m_scopes = new ScopeCollection (this);
+
+                               return m_scopes;
+                       }
+               }
+
                public MethodBody (MethodDefinition meth)
                {
                        m_method = meth;
@@ -196,6 +206,7 @@
                        m_variables.Accept (visitor);
                        m_instructions.Accept (visitor);
                        m_exceptions.Accept (visitor);
+                       m_scopes.Accept (visitor);
 
                        visitor.TerminateMethodBody (this);
                }

Added: trunk/cecil/lib/Mono.Cecil.Cil/Scope.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/Scope.cs     2006-09-19 00:04:29 UTC (rev 
65613)
+++ trunk/cecil/lib/Mono.Cecil.Cil/Scope.cs     2006-09-19 00:20:35 UTC (rev 
65614)
@@ -0,0 +1,79 @@
+//
+// Scope.cs
+//
+// Author:
+//   Jb Evain ([EMAIL PROTECTED])
+//
+// (C) 2006 Jb Evain
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Mono.Cecil.Cil {
+
+       public class Scope : IScopeProvider, IVariableDefinitionProvider, 
ICodeVisitable {
+
+               Instruction m_start;
+               Instruction m_end;
+
+               Scope m_parent;
+               ScopeCollection m_scopes;
+
+               VariableDefinitionCollection m_variables;
+
+               public Instruction Start {
+                       get { return m_start; }
+                       set { m_start = value; }
+               }
+
+               public Instruction End {
+                       get { return m_end; }
+                       set { m_end = value; }
+               }
+
+               public Scope Parent {
+                       get { return m_parent; }
+                       set { m_parent = value; }
+               }
+
+               public ScopeCollection Scopes {
+                       get {
+                               if (m_scopes == null)
+                                       m_scopes = new ScopeCollection (this);
+
+                               return m_scopes;
+                       }
+               }
+
+               public VariableDefinitionCollection Variables {
+                       get {
+                               if (m_variables == null)
+                                       m_variables = new 
VariableDefinitionCollection (this);
+
+                               return m_variables;
+                       }
+               }
+
+               public void Accept (ICodeVisitor visitor)
+               {
+                       visitor.VisitScope (this);
+               }
+       }
+}

Added: trunk/cecil/lib/Mono.Cecil.Cil/ScopeCollection.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/ScopeCollection.cs   2006-09-19 00:04:29 UTC 
(rev 65613)
+++ trunk/cecil/lib/Mono.Cecil.Cil/ScopeCollection.cs   2006-09-19 00:20:35 UTC 
(rev 65614)
@@ -0,0 +1,125 @@
+//
+// ScopeCollection.cs
+//
+// Author:
+//   Jb Evain ([EMAIL PROTECTED])
+//
+// Generated by /CodeGen/cecil-gen.rb do not edit
+// Tue Sep 19 01:56:44 CEST 2006
+//
+// (C) 2005 Jb Evain
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Mono.Cecil.Cil {
+
+       using System;
+       using System.Collections;
+
+       using Mono.Cecil.Cil;
+
+       public sealed class ScopeCollection : IIndexedCollection, 
ICodeVisitable {
+
+               IList m_items;
+               IScopeProvider m_container;
+
+               public Scope this [int index] {
+                       get { return m_items [index] as Scope; }
+                       set { m_items [index] = value; }
+               }
+
+               object IIndexedCollection.this [int index] {
+                       get { return m_items [index]; }
+               }
+
+               public IScopeProvider Container {
+                       get { return m_container; }
+               }
+
+               public int Count {
+                       get { return m_items.Count; }
+               }
+
+               public bool IsSynchronized {
+                       get { return false; }
+               }
+
+               public object SyncRoot {
+                       get { return this; }
+               }
+
+               public ScopeCollection (IScopeProvider container)
+               {
+                       m_container = container;
+                       m_items = new ArrayList ();
+               }
+
+               public void Add (Scope value)
+               {
+                       m_items.Add (value);
+               }
+
+               public void Clear ()
+               {
+                       m_items.Clear ();
+               }
+
+               public bool Contains (Scope value)
+               {
+                       return m_items.Contains (value);
+               }
+
+               public int IndexOf (Scope value)
+               {
+                       return m_items.IndexOf (value);
+               }
+
+               public void Insert (int index, Scope value)
+               {
+                       m_items.Insert (index, value);
+               }
+
+               public void Remove (Scope value)
+               {
+                       m_items.Remove (value);
+               }
+
+               public void RemoveAt (int index)
+               {
+                       m_items.RemoveAt (index);
+               }
+
+               public void CopyTo (Array array, int index)
+               {
+                       m_items.CopyTo (array, index);
+               }
+
+               public IEnumerator GetEnumerator ()
+               {
+                       return m_items.GetEnumerator ();
+               }
+
+               public void Accept (ICodeVisitor visitor)
+               {
+                       visitor.VisitScopeCollection (this);
+               }
+       }
+}

Added: trunk/cecil/lib/Mono.Cecil.Cil/SequencePoint.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/SequencePoint.cs     2006-09-19 00:04:29 UTC 
(rev 65613)
+++ trunk/cecil/lib/Mono.Cecil.Cil/SequencePoint.cs     2006-09-19 00:20:35 UTC 
(rev 65614)
@@ -0,0 +1,70 @@
+//
+// SequencePoint.cs
+//
+// Author:
+//   Jb Evain ([EMAIL PROTECTED])
+//
+// (C) 2006 Jb Evain
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Mono.Cecil.Cil {
+
+       public class SequencePoint {
+
+               Document m_document;
+
+               int m_startLine;
+               int m_startColumn;
+               int m_endLine;
+               int m_endColumn;
+
+               public int StartLine {
+                       get { return m_startLine; }
+                       set { m_startLine = value; }
+               }
+
+               public int StartColumn {
+                       get { return m_startColumn; }
+                       set { m_startColumn = value; }
+               }
+
+               public int EndLine {
+                       get { return m_endLine; }
+                       set { m_endLine = value; }
+               }
+
+               public int EndColumn {
+                       get { return m_endColumn; }
+                       set { m_endColumn = value; }
+               }
+
+               public Document Document {
+                       get { return m_document; }
+                       set { m_document = value; }
+               }
+
+               public SequencePoint (Document document)
+               {
+                       m_document = document;
+               }
+       }
+}

Modified: trunk/cecil/lib/Mono.Cecil.Cil/VariableDefinitionCollection.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/VariableDefinitionCollection.cs      
2006-09-19 00:04:29 UTC (rev 65613)
+++ trunk/cecil/lib/Mono.Cecil.Cil/VariableDefinitionCollection.cs      
2006-09-19 00:20:35 UTC (rev 65614)
@@ -5,7 +5,7 @@
 //   Jb Evain ([EMAIL PROTECTED])
 //
 // Generated by /CodeGen/cecil-gen.rb do not edit
-// Wed Sep 06 12:13:54 CEST 2006
+// Tue Sep 19 01:56:44 CEST 2006
 //
 // (C) 2005 Jb Evain
 //
@@ -39,7 +39,7 @@
        public sealed class VariableDefinitionCollection : IIndexedCollection, 
ICodeVisitable {
 
                IList m_items;
-               MethodBody m_container;
+               IVariableDefinitionProvider m_container;
 
                public VariableDefinition this [int index] {
                        get { return m_items [index] as VariableDefinition; }
@@ -50,7 +50,7 @@
                        get { return m_items [index]; }
                }
 
-               public MethodBody Container {
+               public IVariableDefinitionProvider Container {
                        get { return m_container; }
                }
 
@@ -66,7 +66,7 @@
                        get { return this; }
                }
 
-               public VariableDefinitionCollection (MethodBody container)
+               public VariableDefinitionCollection 
(IVariableDefinitionProvider container)
                {
                        m_container = container;
                        m_items = new ArrayList ();
@@ -74,13 +74,11 @@
 
                public void Add (VariableDefinition value)
                {
-
                        m_items.Add (value);
                }
 
                public void Clear ()
                {
-
                        m_items.Clear ();
                }
 
@@ -96,19 +94,16 @@
 
                public void Insert (int index, VariableDefinition value)
                {
-
                        m_items.Insert (index, value);
                }
 
                public void Remove (VariableDefinition value)
                {
-
                        m_items.Remove (value);
                }
 
                public void RemoveAt (int index)
                {
-
                        m_items.RemoveAt (index);
                }
 

Modified: trunk/cecil/lib/Mono.Cecil.dll.sources
===================================================================
--- trunk/cecil/lib/Mono.Cecil.dll.sources      2006-09-19 00:04:29 UTC (rev 
65613)
+++ trunk/cecil/lib/Mono.Cecil.dll.sources      2006-09-19 00:20:35 UTC (rev 
65614)
@@ -218,6 +218,7 @@
 ./Mono.Cecil.Cil/CilWorker.cs
 ./Mono.Cecil.Cil/CodeReader.cs
 ./Mono.Cecil.Cil/CodeWriter.cs
+./Mono.Cecil.Cil/Document.cs
 ./Mono.Cecil.Cil/ExceptionHandler.cs
 ./Mono.Cecil.Cil/ExceptionHandlerCollection.cs
 ./Mono.Cecil.Cil/ExceptionHandlerType.cs
@@ -226,6 +227,8 @@
 ./Mono.Cecil.Cil/ICodeVisitor.cs
 ./Mono.Cecil.Cil/Instruction.cs
 ./Mono.Cecil.Cil/InstructionCollection.cs
+./Mono.Cecil.Cil/IScopeProvider.cs
+./Mono.Cecil.Cil/IVariableDefinitionProvider.cs
 ./Mono.Cecil.Cil/MethodBody.cs
 ./Mono.Cecil.Cil/MethodDataSection.cs
 ./Mono.Cecil.Cil/MethodHeader.cs
@@ -233,6 +236,9 @@
 ./Mono.Cecil.Cil/OpCodes.cs
 ./Mono.Cecil.Cil/OpCodeType.cs
 ./Mono.Cecil.Cil/OperandType.cs
+./Mono.Cecil.Cil/Scope.cs
+./Mono.Cecil.Cil/ScopeCollection.cs
+./Mono.Cecil.Cil/SequencePoint.cs
 ./Mono.Cecil.Cil/StackBehaviour.cs
 ./Mono.Cecil.Cil/VariableDefinition.cs
 ./Mono.Cecil.Cil/VariableDefinitionCollection.cs

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

Reply via email to