https://bugzilla.novell.com/show_bug.cgi?id=353552
Summary: [PATH] Avoid making this_variable an IL variable
Product: Mono: Compilers
Version: 1.2.0
Platform: Other
OS/Version: Other
Status: NEW
Severity: Enhancement
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
Currently, mcs declares a local variable for holding definitive assignment
information for valuetype ctors. Unfortunately, this variable is then made into
a (dead) IL variable, and our JIT is not very good at eliminating dead
valuetype
variables, so we generate initialization code for this. The following mcs patch
avoids this. Tested by running a full bootstrap.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Index: statement.cs
===================================================================
--- statement.cs (revision 92798)
+++ statement.cs (working copy)
@@ -2767,6 +2767,10 @@
public override void EmitMeta (EmitContext ec)
{
+ // Avoid declaring an IL variable for this_variable
since it is not accessed
+ // from the generated IL
+ if (this_variable != null)
+ Variables.Remove ("this");
base.EmitMeta (ec);
parameters.ResolveVariable (this);
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs