Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/class
diff options
context:
space:
mode:
authorMartin Baulig <martin@novell.com>2004-09-01 21:22:23 +0400
committerMartin Baulig <martin@novell.com>2004-09-01 21:22:23 +0400
commited1f238a737682385b6b3b14ecd1edab16f4a038 (patch)
tree13bda70aba37bed1cf0c4e0c612ff37f566690ec /mcs/class
parente0295aba69ca7fad24612a7b874defcc27a61bff (diff)
2004-09-01 Martin Baulig <martin@ximian.com>
* IMonoSymbolWriter.cs: Removed. * ModuleBuilder.cs, LocalBuilder.cs, ILGenerator.cs: Removed the old debugging code. svn path=/trunk/mcs/; revision=33166
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ChangeLog7
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs28
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/IMonoSymbolWriter.cs50
-rwxr-xr-xmcs/class/corlib/System.Reflection.Emit/LocalBuilder.cs12
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs57
-rwxr-xr-xmcs/class/corlib/corlib.dll.sources1
6 files changed, 14 insertions, 141 deletions
diff --git a/mcs/class/corlib/System.Reflection.Emit/ChangeLog b/mcs/class/corlib/System.Reflection.Emit/ChangeLog
index 0f5fdc8d21c..6aae8adbda8 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ChangeLog
+++ b/mcs/class/corlib/System.Reflection.Emit/ChangeLog
@@ -1,3 +1,10 @@
+2004-09-01 Martin Baulig <martin@ximian.com>
+
+ * IMonoSymbolWriter.cs: Removed.
+
+ * ModuleBuilder.cs, LocalBuilder.cs, ILGenerator.cs: Removed the
+ old debugging code.
+
2004-08-13 Sebastien Pouliot <sebastien@ximian.com>
* AssemblyBuilder.cs: (Partly) Fix delay-signing issue (#56621) when
diff --git a/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs b/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
index 191d65a89ee..b99186888fd 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
@@ -35,7 +35,6 @@ using System;
using System.Collections;
using System.Diagnostics.SymbolStore;
using System.Runtime.InteropServices;
-using Mono.CSharp.Debugger;
namespace System.Reflection.Emit {
@@ -197,7 +196,6 @@ namespace System.Reflection.Emit {
private LabelFixup[] fixups;
private int num_fixups;
internal Module module;
- internal IMonoSymbolWriter sym_writer;
private Stack scopes;
private int cur_block;
private Stack open_blocks;
@@ -217,8 +215,6 @@ namespace System.Reflection.Emit {
token_fixups = new ILTokenInfo [8];
num_token_fixups = 0;
module = m;
- if (module is ModuleBuilder)
- sym_writer = ((ModuleBuilder)module).symbol_writer;
open_blocks = new Stack ();
this.token_gen = token_gen;
}
@@ -394,13 +390,7 @@ namespace System.Reflection.Emit {
}
public virtual void BeginScope ()
- {
- if (sym_writer != null) {
- if (scopes == null)
- scopes = new Stack ();
- scopes.Push (sym_writer.OpenScope (code_len));
- }
- }
+ { }
public LocalBuilder DeclareLocal (Type localType)
{
@@ -832,14 +822,7 @@ namespace System.Reflection.Emit {
}
public virtual void EndScope ()
- {
- if (sym_writer != null) {
- sym_writer.CloseScope (code_len);
- if (scopes == null)
- throw new InvalidOperationException ();
- scopes.Pop ();
- }
- }
+ { }
public virtual void MarkLabel (Label loc)
{
@@ -854,12 +837,7 @@ namespace System.Reflection.Emit {
public virtual void MarkSequencePoint (ISymbolDocumentWriter document, int startLine,
int startColumn, int endLine, int endColumn)
- {
- if (sym_writer == null)
- return;
-
- sym_writer.MarkSequencePoint (code_len, startLine, startColumn);
- }
+ { }
public virtual void ThrowException (Type exceptionType)
{
diff --git a/mcs/class/corlib/System.Reflection.Emit/IMonoSymbolWriter.cs b/mcs/class/corlib/System.Reflection.Emit/IMonoSymbolWriter.cs
deleted file mode 100644
index b73fd4d54c4..00000000000
--- a/mcs/class/corlib/System.Reflection.Emit/IMonoSymbolWriter.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// 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.
-//
-
-//
-// System.Reflection.Emit/IMonoSymbolWriter.cs
-//
-// Author:
-// Martin Baulig (martin@ximian.com)
-//
-// (C) 2003 Ximian, Inc. http://www.ximian.com
-//
-
-using System.Reflection;
-using System.Reflection.Emit;
-using System.Diagnostics.SymbolStore;
-
-namespace Mono.CSharp.Debugger {
- public interface IMonoSymbolWriter : ISymbolWriter {
- byte[] CreateSymbolFile (AssemblyBuilder assembly_builder);
-
- void MarkSequencePoint (int offset, int line, int column);
-
- int DefineNamespace (string name, ISymbolDocumentWriter document,
- string[] using_clauses, int parent);
-
- void OpenMethod (ISymbolDocumentWriter document, int startLine, int startColumn,
- int endLine, int endColumn, MethodBase method, int namespace_id);
- }
-}
diff --git a/mcs/class/corlib/System.Reflection.Emit/LocalBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/LocalBuilder.cs
index fdfa45ae245..94aa8a86f1b 100755
--- a/mcs/class/corlib/System.Reflection.Emit/LocalBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/LocalBuilder.cs
@@ -62,18 +62,10 @@ namespace System.Reflection.Emit {
this.type = t;
this.ilgen = ilgen;
}
+
public void SetLocalSymInfo (string lname, int startOffset, int endOffset)
{
- this.name = lname;
-
- SignatureHelper sighelper = SignatureHelper.GetLocalVarSigHelper (ilgen.module);
- sighelper.AddArgument (type);
- byte[] signature = sighelper.GetSignature ();
-
- ilgen.sym_writer.DefineLocalVariable (lname, FieldAttributes.Private,
- signature, SymAddressKind.ILOffset,
- (int) position, 0, 0,
- startOffset, endOffset);
+ throw new InvalidOperationException ();
}
public void SetLocalSymInfo (string lname)
diff --git a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
index f8a9d36f1af..988f159475f 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
@@ -39,7 +39,6 @@ using System.Runtime.InteropServices;
using System.Diagnostics.SymbolStore;
using System.IO;
using System.Resources;
-using Mono.CSharp.Debugger;
using System.Globalization;
namespace System.Reflection.Emit {
@@ -59,7 +58,6 @@ namespace System.Reflection.Emit {
#endregion
private TypeBuilder global_type;
private Type global_type_created;
- internal IMonoSymbolWriter symbol_writer;
Hashtable name_cache;
Hashtable us_string_cache = new Hashtable ();
private int[] table_indexes;
@@ -81,47 +79,9 @@ namespace System.Reflection.Emit {
table_idx = get_next_table_index (this, 0x00, true);
name_cache = new Hashtable ();
- if (emitSymbolInfo)
- GetSymbolWriter (fullyqname);
basic_init (this);
}
- internal void GetSymbolWriter (string filename)
- {
- Assembly assembly;
- try {
- assembly = Assembly.Load (Consts.AssemblyMono_CSharp_Debugger);
- } catch (FileNotFoundException) {
- return;
- }
-
- Type type = assembly.GetType ("Mono.CSharp.Debugger.MonoSymbolWriter");
- if (type == null)
- return;
-
- // First get the constructor.
- {
- Type[] arg_types = new Type [1];
- arg_types [0] = typeof (ModuleBuilder);
- ConstructorInfo constructor = type.GetConstructor (arg_types);
-
- object[] args = new object [1];
- args [0] = this;
-
- if (constructor == null)
- return;
-
- Object instance = constructor.Invoke (args);
- if (instance == null)
- return;
-
- if (!(instance is IMonoSymbolWriter))
- return;
-
- symbol_writer = (IMonoSymbolWriter) instance;
- }
- }
-
public override string FullyQualifiedName {get { return fqname;}}
public bool IsTransient () {
@@ -418,14 +378,11 @@ namespace System.Reflection.Emit {
}
public ISymbolWriter GetSymWriter () {
- return symbol_writer;
+ throw new InvalidOperationException ();
}
public ISymbolDocumentWriter DefineDocument (string url, Guid language, Guid languageVendor, Guid documentType) {
- if (symbol_writer == null)
- throw new InvalidOperationException ();
-
- return symbol_writer.DefineDocument (url, language, languageVendor, documentType);
+ throw new InvalidOperationException ();
}
public override Type [] GetTypes ()
@@ -643,16 +600,6 @@ namespace System.Reflection.Emit {
build_metadata (this);
- if (symbol_writer != null) {
- string res_name;
- if (is_main)
- res_name = "MonoSymbolFile";
- else
- res_name = "MonoSymbolFile:" + fqname;
- byte[] data = symbol_writer.CreateSymbolFile (assemblyb);
- assemblyb.EmbedResource (res_name, data, ResourceAttributes.Public);
- }
-
string fileName = fqname;
if (assemblyb.AssemblyDir != null)
fileName = System.IO.Path.Combine (assemblyb.AssemblyDir, fileName);
diff --git a/mcs/class/corlib/corlib.dll.sources b/mcs/class/corlib/corlib.dll.sources
index 6aa8e432d56..cb2ee65b337 100755
--- a/mcs/class/corlib/corlib.dll.sources
+++ b/mcs/class/corlib/corlib.dll.sources
@@ -408,7 +408,6 @@ System.Reflection.Emit/FieldBuilder.cs
System.Reflection.Emit/FieldToken.cs
System.Reflection.Emit/FlowControl.cs
System.Reflection.Emit/GenericTypeParameterBuilder.cs
-System.Reflection.Emit/IMonoSymbolWriter.cs
System.Reflection.Emit/ILGenerator.cs
System.Reflection.Emit/Label.cs
System.Reflection.Emit/LocalBuilder.cs