[Mono-list] Re: Java VM for .NET

Paolo Molaro lupus@ximian.com
Fri, 21 Jun 2002 18:30:47 +0200

On 06/21/02 Jeroen Frijters wrote:
> (process:3972): ** WARNING **: unhandled exception
> System.NotImplementedException: "The requested feature is not yet
> implemented"
> in <0x00032> System.Reflection.Emit.TypeBuilder:GetMethodImpl
> (string,System.Reflection.BindingFlags,System.Reflection.Binder,System.R
> eflection.CallingConventions,System.Type[],System.Reflection.ParameterMo
> difier[])
> in <0x0006a> System.Type:GetMethod (string)
> in <0x002d4> .Test:Main ()
> RESULT: -1
> I haven't yet submitted a bug, should this go under runtime or BCL?

This is a runtime bug: we still don't support the use of a on the fly generated
assembly, i.e. you need to first save the assembly to disk
and then load it.
The CreateType() call still returns the TypeBuilder and not a
fully-built and runnable type (and GetMethodImpl() doesn't work on
TypeBuilders, but I guess that may happen with the ms runtime, too).

And, no, it won't be an easy bug to fix: you're creating a type
and a method of this type references a type that has not been created,
and we currently 'fix' the token of a method only when the type that
owns it is created (because the method indexes need to be in sequence
for each type).
I need to think more about it.
Probably we'll need to use a special token type, like DynamicMethodDef
(and borrow an unused table number for it) so that the the token can't
change under us. That should work. Proposals and suggestions are
welcome, of course.


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