On 5/8/07, chromatic <[EMAIL PROTECTED]> wrote:

With :vtable, you define a sub of the appropriate name and use the :vtable
attribute.

Without :vtable, you define a sub of any name, add :anon so as not to
pollute
your namespace, somehow magically get that sub in a PMC, get the
appropriate
class in a PMC, and then call add_method on that class object with the sub
object, being sure to do all of this at load or instantiation time so that
people can use the right vtable entry any time during the program.


No, with :vtable you define a sub of any name and use the :vtable attribute,
specifying which vtable method it overrides if the name doesn't match the
vtable name.  Then you create a Class PMC and call 'add_method' on it,
passing the name, sub, flag that it's a vtable method, and flag that it's
anonymous.  However, since it's anonymous, the name parameter doesn't
matter.

Without :vtable, you define a sub of any name.  Then you create a Class PMC
and call 'add_vtable_method' on it, passing the vtable name and sub.

Remember that this patch is for PDD15, not the old object system.  Even so,
classes are *already* manually created at load time in both the PDD15 and
old object systems - that's where we stick the 'newclass' opcode.

--
Alek Storm

Reply via email to