find_method changes and proposals

Jonathan Worthington jonathan at jnthn.net
Wed Mar 3 03:05:51 UTC 2010


Andrew Whitworth wrote:
> First, I would love to see an example of a compiler providing it's own
> Class and it's own Object. I'm not even certain how that would work
> internally.
You may (or may not...it's your sanity... ;-)) like to peek at Rakudo's 
P6opaque PMC, which is a subclass of the Object PMC. We override 
find_method and implement a bunch of custom dispatch stuff (including 
all the deferral bits, delegation handling, interaction with the 
multi-dispatcher to know to keep walking the MRO if no multi candidates 
match at a certain level, and so forth).

Thanks,

Jonathan



More information about the parrot-dev mailing list