[Mono-dev] [PATCH] Improve compiler generated class handling and ReferenceEquality comparer.

Kornél Pál kornelpal at gmail.com
Mon Mar 1 06:41:26 EST 2010

Attached the same patch with coding style fixed.

Kornél Pál wrote:
> Hi Marek,
>>> Emit and close top level compiler generated classes as well.
>> They are already closed.
> Most of the compiler generated classes are nested types and those are 
> closed.
> On the other hand DynamicExpressionStatement.StaticDataClass in 
> dynamic.cs is a top level compiler generated class.
> Currently it is closed by using 
> RootContext.RegisterCompilerGeneratedType that is very ugly hack because 
>  that is closing the TypeBuilder rather than the compiler generated 
> class instance that skips the whole infrastructure.
> In my opinion RootContext.RegisterCompilerGeneratedType is intended for 
> compiler generated TypeBuilders that have no higher level representation 
> that is not the case for compiler generated classes.
>  >> Don't make compiler generated classes sealed by default.
>  > What is benefit of not doing that?
> This is also related to the same class because that was explicitly 
> removing the sealed modifier to enable the static modifier.
> Although currently only a single compiler generated class benefits from 
> both of these modifications I don't see any drawbacks and in my opinion 
> the changes result in a more properly designed compiler generated class 
> infrastructure.
> Kornél
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mcs.patch.txt
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100301/53f64f91/attachment.txt 

More information about the Mono-devel-list mailing list