[Mono-devel-list] Corlib NUnit Failures

Paolo Molaro lupus at ximian.com
Mon May 12 04:24:58 EDT 2003


On 05/12/03 Varga Zoltan wrote:
> Ben Maurer <bmaurer at users.sourceforge.net> írta:
> 
> > * System.Reflection.Emit: No clue! Probably a problem with
> an icall.
> 
> This is caused by the fact that MethodBuilder::DefineParameter
> accepts a 0 index, while the MS version does not. Could somebody
> tell me why it is necessary? If it is used by mcs, then how
> does 
> mcs runs on the MS runtime which does not allow that?

mcs running on mono uses the 0 index to create a parameter and
set the marshaling info for the return type of a method. This is because
the Reflection.Emit API didn't allow it. When running on the MS runtime,
mcs catches the exception and basically tells the user to use the mono
runtime.
In version 1.1 of .net, MS added the SetMarshal() call on MethodBuilder,
so we should switch to use that instead of using the 0 index (internally
in the mono runtime we can continue to use the same mechanism, just not
expose it to the user). mcs should be changed to do a GetMethod/Invoke
on SetMarshal, so that it can be still compiled on the 1.1 version of
the framework.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list