2009-01-02 Ivan N. Zlatev <contact@i-nz.net>
[mono.git] / mcs / mcs / symbolwriter.cs
index a930b7040c8054db335b94d2f61f27ceee871e34..53462122c37840a10d734fc8f3a2b8c56c1c7e75 100644 (file)
@@ -84,10 +84,13 @@ namespace Mono.CSharp {
                        }
                }
 
-               public static void OpenMethod (ICompileUnit file, ISourceMethod method)
+               public static SourceMethodBuilder OpenMethod (ICompileUnit file, int ns_id,
+                                                             IMethodDef method)
                {
                        if (symwriter != null)
-                               symwriter.OpenMethod (file, method);
+                               return symwriter.OpenMethod (file, ns_id, method);
+                       else
+                               return null;
                }
 
                public static void CloseMethod ()
@@ -170,18 +173,6 @@ namespace Mono.CSharp {
                                symwriter.DefineCapturedScope (scope_id, id, captured_name);
                }
 
-               public static void SetRealMethodName (string name)
-               {
-                       if (symwriter != null)
-                               symwriter.SetRealMethodName (name);
-               }
-
-               public static void SetCompilerGenerated ()
-               {
-                       if (symwriter != null)
-                               symwriter.SetCompilerGenerated ();
-               }
-
                public static void OpenCompilerGeneratedBlock (ILGenerator ig)
                {
                        if (symwriter != null) {
@@ -234,9 +225,10 @@ namespace Mono.CSharp {
                public static void MarkSequencePoint (ILGenerator ig, Location loc)
                {
                        if (symwriter != null) {
+                               SourceFileEntry file = loc.SourceFile.SourceFileEntry;
                                int offset = symwriter.GetILOffset (ig);
                                symwriter.MarkSequencePoint (
-                                       offset, loc.File, loc.Row, loc.Column, loc.Hidden);
+                                       offset, file, loc.Row, loc.Column, loc.Hidden);
                        }
                }
 
@@ -256,5 +248,10 @@ namespace Mono.CSharp {
 
                        return true;
                }
+
+               public static void Reset ()
+               {
+                       symwriter = null;
+               }
        }
 }