Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • 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

    • Leo,

      Our orderings do not match. However, most of my tests are for destruction order (normal MRO), and are all examples taken directly from the papers on C3 (so I expect they would be correct). I think it would be good to compare our implementations and possibly add some destruction order tests to parrot to see if those match up or not.

      - Stevan
    • Leo,

      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
         \   /
          \ /
      • 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.