2008-06-05 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / mcs / location.cs
index f69ee3c69807df87490577a3f7cfa62a8af79e50..1092e5ef744f8428a99e2be05feba9e4b06012db 100644 (file)
@@ -5,8 +5,8 @@
 //   Miguel de Icaza
 //   Atsushi Enomoto  <atsushi@ximian.com>
 //
-// (C) 2001 Ximian, Inc.
-// (C) 2005 Novell, Inc.
+// Copyright 2001 Ximian, Inc.
+// Copyright 2005 Novell, Inc.
 //
 
 using System;
@@ -27,7 +27,6 @@ namespace Mono.CSharp {
                public readonly string Path;
                public readonly int Index;
                public SourceFileEntry SourceFileEntry;
-               public bool HasLineDirective;
 
                public SourceFile (string name, string path, int index)
                {
@@ -162,7 +161,7 @@ namespace Mono.CSharp {
                // </remarks>
                static public SourceFile LookupFile (string name)
                {
-                       string path = name == "" ? "" : Path.GetFullPath (name);
+                       string path = name.Length == 0 ? string.Empty : Path.GetFullPath (name);
 
                        if (!source_files.Contains (path)) {
                                if (source_count >= (1 << checkpoint_bits))
@@ -178,7 +177,7 @@ namespace Mono.CSharp {
                        return (SourceFile) source_list [index - 1];
                }
 
-               static public void Push (SourceFile file, int line)
+               static public void Push (SourceFile file)
                {
                        current_source = file.Index;
                        // File is always pushed before being changed.
@@ -189,7 +188,7 @@ namespace Mono.CSharp {
                //   and code generation to register all the source files with the
                //   symbol writer.
                // </remarks>
-               static public void DefineSymbolDocuments (SymbolWriter symwriter)
+               static public void DefineSymbolDocuments (MonoSymbolWriter symwriter)
                {
                        foreach (SourceFile file in source_list) {
                                file.SourceFileEntry = symwriter.DefineDocument (file.Path);
@@ -243,13 +242,13 @@ namespace Mono.CSharp {
                        }
                        checkpoints [checkpoint_index] = new Checkpoint (file, row);
                }
-
+               
                public override string ToString ()
                {
                        if (column_bits == 0 || InEmacs)
-                               return Name + "(" + Row + "):";
+                               return Name + "(" + Row.ToString () + "):";
                        else
-                               return Name + "(" + Row + "," + Column +
+                               return Name + "(" + Row.ToString () + "," + Column.ToString () +
                                        (Column == column_mask ? "+):" : "):");
                }