[Mono-dev] Generic Variance
lunchtimemama at gmail.com
lunchtimemama at gmail.com
Mon Feb 2 08:54:21 EST 2009
> 1)mono_class_has_variant_generic_params (MonoClass *klass)
> Don't move functions around together with patches that add functionality.
Cleanups, when justifiable, are ok but must
> be done on a separate refactoring only patch. On this case, please just
add a forward declaration on the top.
Will do
> 2)mono_class_is_assignable_from
> Don't do unneeded changes to existing conditions that just make your
patch harder to read. By merging the two conditions your
> patch got huge for no reason at all. Please revert this change so the
patch is smaller.
The chunk of code was extracted into the mono_class_is_variant_of method
because it is also needed in mono_class_interface_offset. Duplicating the
code in both places would just cause problems in the long-run.
> 3)mono_class_interface_offset
> This function is used to define layout of classes, vtables and the such.
You patch lacks neither a proper Changelog notice on why this change is
needed or tests that evidence it.
Tests are a bit of a chicken-and-egg problem. They can't be written in C#
until it has variance support (there is a patch for that on the list which
Marek is handling), and the C# patch has tests which require these VM
changes. I _could_ write a test in IL, but that would take me a while. The
changes to mono_class_interface_offset look for a legal variant of the
supplied interface if nothing was found with the binary search. How
specific do you want me to be in the ChangeLog?
I'll have a new patch soon. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090202/1b9894b2/attachment-0001.html
More information about the Mono-devel-list
mailing list