NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
C3 method resolution order (Score:1)
This should exactly match my implementation on the Parrot side. There is just one test showing init order (which is reverse MRO). Please grep for "constructor - diamond parents" in t/pmc/object-meths.t
Re:C3 method resolution order (Score:1)
I have been looking over your MRO test, and I have to say, I think your algoritm might be wrong, or at least not the C3 algorithm we are talking about. I cannot tell for sure until I have seen it tested in destruction order. But my reasoning for this conclusion is as follows.
Take your reverse MRO (E A D B C F) for this class structure (both extracted from the test you mention):
A B A E
\
C D
\ /
\
Re:C3 method resolution order (Score:1)
If now implemented C3 MRO (r8650 in trunk). It's of course true that the VM shouldn't dictate a particular MRO, but we have to provide one, so why not that of our major users. If more flexibility is needed, we can always use the current HLL setting and select something different.
There is one additional test in t/pmc/object-meths.t, showing how to print the MRO of a class.
Re:C3 method resolution order (Score:1)
Excellent, we now match! Your test example is now in the metamodel test suite. If I find time, I will try to port my other C3 tests to Parrot for you.
- StevanReply to This
Parent