2008-04-02 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Wed, 2 Apr 2008 14:40:32 +0000 (14:40 -0000)
committerMartin Baulig <martin@novell.com>
Wed, 2 Apr 2008 14:40:32 +0000 (14:40 -0000)
* *.cs: Remove the `#if !DISABLE_TERRANIA_CHANGES' conditionals.

svn path=/trunk/mcs/; revision=99636

mcs/class/Mono.CompilerServices.SymbolWriter/ChangeLog
mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs

index 8f886027a998b518cb46f48e00ef6a9b571ac588..5fdda367bfdd6c082292e40ca8c1adb6f3b8c668 100644 (file)
@@ -1,3 +1,7 @@
+2008-04-02  Martin Baulig  <martin@ximian.com>
+
+       * *.cs: Remove the `#if !DISABLE_TERRANIA_CHANGES' conditionals.
+
 2008-03-14  Martin Baulig  <martin@ximian.com>
 
        Merged the debugger's `terrania' branch into trunk.
index bb46ac5553032817393f04621f5dc2ee10d31c05..444fd666483e60fd2b1783aa2a4fc153d446179c 100644 (file)
@@ -131,9 +131,7 @@ namespace Mono.CompilerServices.SymbolWriter
                ArrayList sources = new ArrayList ();
                Hashtable method_source_hash = new Hashtable ();
                Hashtable type_hash = new Hashtable ();
-#if !DISABLE_TERRANIA_CHANGES
                Hashtable anonymous_scopes;
-#endif
 
                OffsetTable ot;
                int last_type_index;
@@ -141,13 +139,8 @@ namespace Mono.CompilerServices.SymbolWriter
                int last_source_index;
                int last_namespace_index;
 
-#if DISABLE_TERRANIA_CHANGES
-               public readonly int Version = OffsetTable.CompatibilityVersion;
-               public readonly bool CompatibilityMode = true;
-#else
                public readonly int Version = OffsetTable.Version;
                public readonly bool CompatibilityMode = false;
-#endif
 
                public int NumLineNumbers;
 
@@ -175,7 +168,6 @@ namespace Mono.CompilerServices.SymbolWriter
                        methods.Add (entry);
                }
 
-#if !DISABLE_TERRANIA_CHANGES
                internal void DefineAnonymousScope (int id)
                {
                        if (anonymous_scopes == null)
@@ -196,7 +188,6 @@ namespace Mono.CompilerServices.SymbolWriter
                        AnonymousScopeEntry scope = (AnonymousScopeEntry) anonymous_scopes [scope_id];
                        scope.AddCapturedScope (id, captured_name);
                }
-#endif
 
                internal int GetNextTypeIndex ()
                {
@@ -274,7 +265,6 @@ namespace Mono.CompilerServices.SymbolWriter
                        }
                        ot.SourceTableSize = (int) bw.BaseStream.Position - ot.SourceTableOffset;
 
-#if !DISABLE_TERRANIA_CHANGES
                        if (!CompatibilityMode) {
                                //
                                // Write anonymous scope table.
@@ -287,7 +277,6 @@ namespace Mono.CompilerServices.SymbolWriter
                                }
                                ot.AnonymousScopeTableSize = (int) bw.BaseStream.Position - ot.AnonymousScopeTableOffset;
                        }
-#endif
 
                        //
                        // Fixup offset table.
@@ -421,11 +410,9 @@ namespace Mono.CompilerServices.SymbolWriter
                        get { return ot.TypeCount; }
                }
 
-#if !DISABLE_TERRANIA_CHANGES
                public int AnonymousScopeCount {
                        get { return ot.AnonymousScopeCount; }
                }
-#endif
 
                public int NamespaceCount {
                        get { return last_namespace_index; }
@@ -585,7 +572,6 @@ namespace Mono.CompilerServices.SymbolWriter
                        return (int) value;
                }
 
-#if !DISABLE_TERRANIA_CHANGES
                public AnonymousScopeEntry GetAnonymousScope (int id)
                {
                        if (anonymous_scopes != null)
@@ -602,7 +588,6 @@ namespace Mono.CompilerServices.SymbolWriter
 
                        return (AnonymousScopeEntry) anonymous_scopes [id];
                }
-#endif
 
                internal MyBinaryReader BinaryReader {
                        get {
index f3f6f098b43d2cdbe7d430b669f813368b8b8898..43f219b188e41b72958731a9557af0fb2d5b1740 100644 (file)
@@ -110,7 +110,6 @@ namespace Mono.CompilerServices.SymbolWriter
                        current_method.AddLocal (index, name);
                }
 
-#if !DISABLE_TERRANIA_CHANGES
                public void DefineCapturedLocal (int scope_id, string name, string captured_name)
                {
                        file.DefineCapturedVariable (scope_id, name, captured_name,
@@ -141,7 +140,6 @@ namespace Mono.CompilerServices.SymbolWriter
 
                        current_method.AddScopeVariable (scope, index);
                }
-#endif
 
                public void MarkSequencePoint (int offset, int line, int column)
                {
@@ -168,12 +166,10 @@ namespace Mono.CompilerServices.SymbolWriter
                        methods.Add (current_method);
                }
 
-#if !DISABLE_TERRANIA_CHANGES
                public void SetRealMethodName (string name)
                {
                        current_method.RealMethodName = name;
                }
-#endif
 
                public void CloseMethod ()
                {
@@ -202,26 +198,21 @@ namespace Mono.CompilerServices.SymbolWriter
 
                public int OpenScope (int start_offset)
                {
-#if !DISABLE_TERRANIA_CHANGES
                        if (current_method == null)
                                return 0;
 
                        current_method.StartBlock (CodeBlockEntry.Type.Lexical, start_offset);
-#endif
                        return 0;
                }
 
                public void CloseScope (int end_offset)
                {
-#if !DISABLE_TERRANIA_CHANGES
                        if (current_method == null)
                                return;
 
                        current_method.EndBlock (end_offset);
-#endif
                }
 
-#if !DISABLE_TERRANIA_CHANGES
                public void OpenCompilerGeneratedBlock (int start_offset)
                {
                        if (current_method == null)
@@ -265,23 +256,15 @@ namespace Mono.CompilerServices.SymbolWriter
                {
                        file.DefineAnonymousScope (id);
                }
-#endif
 
                public void WriteSymbolFile (Guid guid)
                {
                        foreach (SourceMethod method in methods) {
-#if !DISABLE_TERRANIA_CHANGES
                                method.SourceFile.Entry.DefineMethod (
                                        method.Method.Token, method.ScopeVariables, method.Locals,
                                        method.Lines, method.Blocks, method.RealMethodName,
                                        method.Start.Row, method.End.Row,
                                        method.Method.NamespaceID);
-#else
-                               method.SourceFile.Entry.DefineMethod (
-                                       method.Method.Token, null, method.Locals,
-                                       method.Lines, null, null, method.Start.Row, method.End.Row,
-                                       method.Method.NamespaceID);
-#endif
                        }
 
                        try {
@@ -299,12 +282,10 @@ namespace Mono.CompilerServices.SymbolWriter
                {
                        LineNumberEntry [] lines;
                        private ArrayList _locals;
-#if !DISABLE_TERRANIA_CHANGES
                        private ArrayList _blocks;
                        private ArrayList _scope_vars;
                        private Stack _block_stack;
                        private string _real_name;
-#endif
                        private ISourceMethod _method;
                        private ISourceFile _file;
                        private LineNumberEntry _start, _end;
@@ -320,7 +301,6 @@ namespace Mono.CompilerServices.SymbolWriter
                                this._end = new LineNumberEntry (endLine, 0);
                        }
 
-#if !DISABLE_TERRANIA_CHANGES
                        public void StartBlock (CodeBlockEntry.Type type, int start_offset)
                        {
                                if (_block_stack == null)
@@ -362,7 +342,6 @@ namespace Mono.CompilerServices.SymbolWriter
                                                return null;
                                }
                        }
-#endif
 
                        public LineNumberEntry[] Lines {
                                get {
@@ -387,15 +366,10 @@ namespace Mono.CompilerServices.SymbolWriter
                        {
                                if (_locals == null)
                                        _locals = new ArrayList ();
-#if !DISABLE_TERRANIA_CHANGES
                                int block_idx = CurrentBlock != null ? CurrentBlock.Index : 0;
-#else
-                               int block_idx = 0;
-#endif
                                _locals.Add (new LocalVariableEntry (index, name, block_idx));
                        }
 
-#if !DISABLE_TERRANIA_CHANGES
                        public ScopeVariable[] ScopeVariables {
                                get {
                                        if (_scope_vars == null)
@@ -419,7 +393,6 @@ namespace Mono.CompilerServices.SymbolWriter
                                get { return _real_name; }
                                set { _real_name = value; }
                        }
-#endif
 
                        public ISourceFile SourceFile {
                                get { return _file; }