[Mono-bugs] [Bug 75712][Wis] New - More anonymous helper classes
than needed are created
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Aug 4 13:48:43 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by bmaurer at users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=75712
--- shadow/75712 2005-08-04 13:48:43.000000000 -0400
+++ shadow/75712.tmp.8375 2005-08-04 13:48:43.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 75712
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: bmaurer at users.sf.net
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: More anonymous helper classes than needed are created
+
+Consider
+
+class X {
+ delegate void D ();
+ static void Main ()
+ {
+ bool b = false;
+ bool bb = false;
+ D d = delegate {
+ b = true;
+ };
+
+ D dd = delegate {
+ b = true;
+ bb = true;
+ };
+ d ();
+ dd ();
+ }
+}
+
+We create
+
+.class nested assembly auto ansi '<>AnonHelp<0>'
+and
+.class nested assembly auto ansi '<>AnonHelp<1>'
+
+creating two helper objects in the method. However, Microsoft only creates
+one. This increases performance by reducing the number of dereferences.
More information about the mono-bugs
mailing list