[Mono-devel-list] Re: [Mono-patches] r40228 - trunk/mcs/class/System.Drawing/System.Drawing

Raja R Harinath rharinath at novell.com
Mon Feb 7 02:01:31 EST 2005


Hi,

"Ben Maurer <webmaster at theratnerschool.org>" <benm at mono-cvs.ximian.com> writes:

[snip]
> 2005-02-06  Ben Maurer  <bmaurer at ximian.com>
>
> 	* Brushes.cs: Kill the static ctor here, it has tons of code bloat.
>
> Modified: trunk/mcs/class/System.Drawing/System.Drawing/Brushes.cs
> ===================================================================
> --- trunk/mcs/class/System.Drawing/System.Drawing/Brushes.cs	2005-02-07 03:25:54 UTC (rev 40227)
> +++ trunk/mcs/class/System.Drawing/System.Drawing/Brushes.cs	2005-02-07 03:35:53 UTC (rev 40228)
> @@ -39,147 +39,147 @@
>  {
>  	public sealed class Brushes 
>  	{
> -		private static SolidBrush aliceBlue = null;
> -		private static SolidBrush antiqueWhite = null;
> -		private static SolidBrush aqua = null;
> -		private static SolidBrush aquamarine = null;
[snip]
> +		static SolidBrush aliceBlue;
> +		static SolidBrush antiqueWhite;
> +		static SolidBrush aqua;
> +		static SolidBrush aquamarine;

I think this would be great as a compiler optimization.  (In fact, GCC
has something similar for move '=0' static initializers to the BSS.)

One more to the TODO, :-)

- Hari



More information about the Mono-devel-list mailing list