On Thu, Jan 26, 2006 at 02:12:41AM +0100, Leopold Toetsch wrote: > On Jan 25, 2006, at 21:21, Chip Salzenberg wrote: > >On Tue, Jan 24, 2006 at 05:43:25PM +0100, Leopold Toetsch wrote: > >>*) what is vtable->package? A pointer to the namespace PMC of this > >>class? (It's currently unused) > > > >Beats me. Vtables don't have namespaces. > > Given that in P6 speak ... > > 00:27 < stevan> Class.isa(Package) > 00:27 < stevan> Class.isa(Module), Module.isa(Package), Package.isa(Object) > > See also pugs/trunk/src/PIL/Native/Bootstrap/*.pil > > ... and a package/module is a namespace, it would make some sense, that > a vtable (which is part of the PMC class scheme) has a 'namespace' > field (as it already has 'class' and 'mro' fields). > > Well, there is another vtable function that is very much related with > that: C<STRING* namespace_name()> currently used just for an extra > indirection to burn some CPU cycles in method lookup.
Ah yes, of *course*. PMCs have methods, and the methods need to be found somewhere, so the default place to look should be vtable->namespace. Is there a problem with killing vtable->namespace_name and replacing its usages with the existing vtable->namespace? -- Chip Salzenberg <[EMAIL PROTECTED]>