| |
perl.perl6.internals |
> 2) Vtable entries should be real methods > All non-defaulted, non-inherited entries of a vtable interface should be > Px = Py."__pop_pmc"() > or > Px = Py."__string"() # $x = ~$y string kontext > This easily allows overloading of all the vtable methods. The PIC code > They work basically like other methods except that there is no VTABLE > "__i_add"(Px, Py) # $x += $y > The distinct slots for the inplace operations are at least necessary for - Sam Ruby
> available as methods, like now with the METHOD keyword. This allows
> eventually code like this:
> gets even rid of the additional indirection as the function is called
> directly from opcodes. The vtable slots are just for calling these
> methods from within C source.
description of the default behavior, not a hard requirement.
> slot and the method lookup is more complicated. The more detailed (and
> very preliminary) proposal below has some additional MMD functions that
> we'll need (IMHO):
> Px = "__n_add"(Py, Pz) # x = y + z ; x is newly created
> Python, as these are separate methods in Python. It also simplifies the
> implementation as a check for "self == dest" isn't necessary in the
> plain operations.
> The variants with an "n_" prefix create and return a new PMC.
apriori exactly which methods are to be mmd universally for all
languages and all objects.