projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
666d378
)
Fix output of local variable names in debugging symbols
author
Jb Evain
<jbevain@gmail.com>
Thu, 30 Dec 2010 19:56:32 +0000
(20:56 +0100)
committer
Jb Evain
<jbevain@gmail.com>
Mon, 10 Jan 2011 23:10:33 +0000
(
00:10
+0100)
mcs/ilasm/codegen/MethodDef.cs
patch
|
blob
|
history
diff --git
a/mcs/ilasm/codegen/MethodDef.cs
b/mcs/ilasm/codegen/MethodDef.cs
index 529a886ca8536a7b6c45c8ea65f1abcbbeb240e3..a13d9f1f9f2e2d803757ff38c7aec06e8cf6295f 100644
(file)
--- a/
mcs/ilasm/codegen/MethodDef.cs
+++ b/
mcs/ilasm/codegen/MethodDef.cs
@@
-295,17
+295,13
@@
namespace Mono.ILASM {
public LocalVariableEntry[] GetLocalVars()
{
public LocalVariableEntry[] GetLocalVars()
{
- System.IO.MemoryStream str = new System.IO.MemoryStream();
- int i = 0;
- int num_locals = ((Hashtable) named_local_tables [current_scope_depth]).Count;
- LocalVariableEntry[] locals = new LocalVariableEntry[num_locals];
-
+ ArrayList named_locals = new ArrayList ();
foreach (Local local in local_list) {
if (local.Name != null) { // only named variables
foreach (Local local in local_list) {
if (local.Name != null) { // only named variables
-
locals[i++] = new LocalVariableEntry(local.Slot, local.Name, 0
);
+
named_locals.Add (new LocalVariableEntry(local.Slot, local.Name, 0)
);
}
}
}
}
- return
locals
;
+ return
(LocalVariableEntry []) named_locals.ToArray (typeof (LocalVariableEntry))
;
}
}