[CVS ci] MMD 16 - builtin infix multis

Skip to first unread message

Leopold Toetsch

Apr 4, 2005, 10:02:00 AM4/4/05
to Perl 6 Internals
During class registration of classes that define a MMD_init table,
several new things happen:

1) a MultiSub PMC is created in the "__parrot_core" namespace once
2a) if there is just one MMD variant:
a NCI method is created in the classes namespace
2b) if there are more then one MMD variants with the same short_name
a MultiSub is created in the class namespace
a NCI method is created and appended to that multi
3) the method is appended to the "__parrot_core" multi sub from 1)

A method or function call does the right thing:

l = new Integer
r = new Float
d = new Undef
l."__add"(r, d)


"__add"(l, r, d)

both dispatch to Parrot_Integer_add_Float().

Related changes:
- S1 holds now the call signature used for MMD search
- renamed is_equal_str MMD to is_equal_string

still TODO:
- rebuilt static MMD_table after adding MMD functions
- add inplace variants of prefix and infix operations
- add variants that return a new destination PMC


Reply all
Reply to author
0 new messages