[Mono-dev] [PATCH] Improve compiler generated class handling and ReferenceEquality comparer.
Kornél Pál
kornelpal at gmail.com
Mon Mar 1 05:41:23 EST 2010
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
More information about the Mono-devel-list
mailing list