Dan Sugalski <[EMAIL PROTECTED]> wrote: > ... We rework the current pmc > processor to take the entries that are getting tossed and > automatically add them to the MMD tables on PMC load instead.
I've now implemented MMD for PerlInt's bitwise_xor as a test case. Syntax looks like this: void bitwise_xor (PMC* value, PMC* dest) { MMD_PerlInt: { VTABLE_set_integer_native(INTERP, dest, PMC_int_val(SELF) ^ PMC_int_val(value)); } MMD_DEFAULT: { VTABLE_set_integer_native(INTERP, dest, PMC_int_val(SELF) ^ VTABLE_get_integer(INTERP, value)); } } This creates two functions: Parrot_PerlInt_bitwise_xor() Parrot_PerlInt_bitwise_xor_PerlInt() with the body parts from above and these initializer code snippet: { MMD_BXOR, enum_class_PerlInt, 0, (funcptr_t) Parrot_PerlInt_bitwise_xor }, { MMD_BXOR, enum_class_PerlInt, enum_class_PerlInt, (funcptr_t) Parrot_PerlInt_bitwise_xor_PerlInt } leo