slide.o.mix at gmail.com
Thu Feb 9 14:11:40 CET 2012
Hmmm, ok, that may be beyond my current knowledge of the internals :-)
On Wed, Feb 8, 2012 at 10:36 PM, Dino Viehland <dinov at microsoft.com> wrote:
> The reason we don't keep looking through the type hierarchy is because
> we should have generated code which does the dispatch to the base method -
> that's much more efficient then searching at doing a dynamic invoke at
> runtime. We generate the code in
> NewTypeMaker.EmitBaseClassCallCheckForProperties which ultimately calls
> EmitBaseMethodDispatch which checks if we can do the base-method dispatch
> and emits the code which throws when the method is abstract.
> I think what's probably happening is that we're overriding the interface
> slot and the class slot independently. The class slot dispatches to the
> base virtual method correctly, but we see the interface method as abstract
> and emit code to throw. EmitBaseMethodDispatch probably just needs to do a
> Type.GetInterfaceMap on the base type and map it to the correct base method
> if the method is abstract and the method is declared on an interface type.
> *From:* ironpython-users-bounces+dinov=exchange.microsoft.com at python.org [
> mailto:ironpython-users-bounces+dinov=exchange.microsoft.com at python.org<ironpython-users-bounces+dinov=exchange.microsoft.com at python.org>]
> *On Behalf Of *Slide
> *Sent:* Wednesday, February 08, 2012 7:56 PM
> *To:* ironpython-users at python.org
> *Subject:* [Ironpython-users]
> While looking a little bit into  I found that the two methods above in
> UserTypeOps.cs stop when they get to .NET types. If I remove the condition
> to stop at .NET types, the issue no longer appears. Is there a reason that
> these two methods are not looking at .NET types?
>  *http://ironpython.codeplex.com/workitem/32166*<http://ironpython.codeplex.com/workitem/32166>
> Website: *http://earl-of-code.com* <http://earl-of-code.com>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users