On 5/9/07, Will Coleda <[EMAIL PROTECTED]> wrote:
Looking at PDD15, I see this paragraph... > To override a vtable function, either add the :vtable pragma to the > declaration of the method, or pass a named parameter "vtable" into the > add_method method on a class or role. ... which is kind of lonely, since, as you point out, there is no way in PDD15 to *declare* a method (and not that vtable ISA method, either.)
Oops, missed that part. Attached a patch to bring that in line with the rest of the patch, and also to s/vtable function/vtable method/gi. In addition, a vtable method ISA method; it's just not returned by 'find_method'. On a related note, :method is mentioned in docs/compiler_faq.pod &
docs/imcc/calling_conventions.pod. If it's dead, it needs to be deprecated; if it's not, it should probably be mentioned in PDD15.
As far as I know, we still need :method, because it changes the arg signature of the sub to get 'self' as the first argument. If we were to remove it, we could work around this and still get 'self' to work without it being an argument, but then how would 'self' be defined if the sub is called as a non-method, and uses 'self'? -- Alek Storm
pdd15_vtable.patch
Description: Binary data