Bug 318652 (MONO75712) - [ANONYMOUS METHODS] More anonymous helper classes than needed are created
Summary: [ANONYMOUS METHODS] More anonymous helper classes than needed are created
Status: RESOLVED FIXED
Alias: MONO75712
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Marek Safar
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-04 20:48 UTC by Ben Maurer
Modified: 2008-06-19 17:03 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:26:36 UTC


---- Reported by bmaurer@users.sf.net 2005-08-04 13:48:43 MST ----

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.



---- Additional Comments From miguel@ximian.com 2007-01-01 03:53:56 MST ----

The code was redone, but it likely still generates more helper classes
than needed.




Unknown operating system unknown. Setting to default OS "Other".

Comment 1 Marek Safar 2008-06-19 17:02:42 UTC
Fixed in SVN.
Comment 2 Marek Safar 2008-06-19 17:03:24 UTC
Fixed in SVN.