At 10:48 AM -0700 5/14/04, Jeff Clites wrote:
On May 14, 2004, at 9:04 AM, Dan Sugalski wrote:

Today's project is to get all the MMD things actually using MMD. I've put in the first wave of changes (well, OK, second if you consider Leo's BXOR test as the first) and should get the rest of the stuff in today.

This part's a bit hackish but, well, there you go. It does break some of the object tests, since they don't yet participate in MMD the way they ought, but that should happen later on.

It would be great to have a quick paragraph-or-two about the design/API/goals. I know what MMD is in general, but I got lost in figuring out whether this MMD is supposed to be the back-end for Perl6's multi's (I think it isn't), how it relates to PMCs and their VTABLE's, the high-level view of how it's implemented, why it's faster (than what?), what "types" we are dispatching on (I v. N v. S v. P, or PMC types, or Object types), how type fallbacking is done, what you have to put in a .pmc file (?) to create an MMD entry, etc.

Good point. I should write up something more formal, but for the moment...


This MMD stuff is only for the functions in the PMC vtable that take a PMC and a second parameter (right now only a PMC, but when we're done it'll work for any right-hand type). The goal here is to ultimately rip out all these functions from the vtable and leave them in the MMD subsystem where they really belong.

Ultimately it'll be faster since nearly all the PMC classes parrot will run with will have their vtable methods call the MMD system *anyway*, so we cut out that level of indirection.

PMC writing shouldn't change--the pmc preprocessor will pull out the code from it and treat any defined vtable methods that are now MMD as the default for that PMC class.

At the moment there's no hierarchy and distance searching for filling in the MMD table--either there's a dead-on correct entry or there isn't. That needs fixing, though there's still the issue of deciding what the class hierarchy is, but we'll get there in a bit.
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to