Author: martin
Date: 2006-12-20 04:46:46 -0500 (Wed, 20 Dec 2006)
New Revision: 69802
Modified:
branches/mono-1-2-2/mcs/mcs/ChangeLog
branches/mono-1-2-2/mcs/mcs/statement.cs
Log:
2006-12-19 Martin Baulig <[EMAIL PROTECTED]>
* statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
the symbol file info here.
Modified: branches/mono-1-2-2/mcs/mcs/ChangeLog
===================================================================
--- branches/mono-1-2-2/mcs/mcs/ChangeLog 2006-12-20 09:31:18 UTC (rev
69801)
+++ branches/mono-1-2-2/mcs/mcs/ChangeLog 2006-12-20 09:46:46 UTC (rev
69802)
@@ -1,3 +1,8 @@
+2006-12-19 Martin Baulig <[EMAIL PROTECTED]>
+
+ * statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
+ the symbol file info here.
+
2006-11-29 Martin Baulig <[EMAIL PROTECTED]>
* class.cs (Constructor.Emit): Correctly handle anonymous methods;
Modified: branches/mono-1-2-2/mcs/mcs/statement.cs
===================================================================
--- branches/mono-1-2-2/mcs/mcs/statement.cs 2006-12-20 09:31:18 UTC (rev
69801)
+++ branches/mono-1-2-2/mcs/mcs/statement.cs 2006-12-20 09:46:46 UTC (rev
69802)
@@ -1024,6 +1024,7 @@
Flags flags;
ReadOnlyContext ro_context;
+ LocalBuilder builder;
public LocalInfo (Expression type, string name, Block block,
Location l)
{
@@ -1047,7 +1048,6 @@
var = theblock.ScopeInfo.GetCapturedVariable
(this);
if (var == null) {
- LocalBuilder builder;
if (Pinned)
//
// This is needed to compile on both
.NET 1.x and .NET 2.x
@@ -1061,6 +1061,12 @@
}
}
+ public void EmitSymbolInfo (EmitContext ec, string name)
+ {
+ if (builder != null)
+ ec.DefineLocalVariable (name, builder);
+ }
+
public bool IsThisAssigned (EmitContext ec, Location loc)
{
if (VariableInfo == null)
@@ -2231,9 +2237,20 @@
DoEmit (ec);
ec.Mark (EndLocation, true);
- if (emit_debug_info && is_lexical_block)
- ec.EndScope ();
+ if (emit_debug_info) {
+ if (is_lexical_block)
+ ec.EndScope ();
+ if (variables != null) {
+ foreach (DictionaryEntry de in
variables) {
+ string name = (string) de.Key;
+ LocalInfo vi = (LocalInfo)
de.Value;
+
+ vi.EmitSymbolInfo (ec, name);
+ }
+ }
+ }
+
ec.CurrentBlock = prev_block;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches