[Mono-bugs] [Bug 353552] New: [PATH] Avoid making this_variable an IL variable

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Jan 13 20:34:07 EST 2008


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: mono-bugs at lists.ximian.com
        ReportedBy: vargaz at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          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.


More information about the mono-bugs mailing list