On Fri, Dec 21, 2007 at 01:30:42AM -0700, Kevin Tew wrote:
I've added parsing of :namespace to imcc, now I'm trying to figure out
what I'm suppose to do differently when :namespace is present in a
methods prototype.
I thought I was suppose to add the :method to a namespace, but that
seems to already work.
The relevant code is the 'set_pmc_keyed_str' vtable function in
src/pmc/namespace.pmc. After inserting a method or vtable override, it
used to skip the rest of the routine and so not insert the namespace
entry. Not sure when the code changed, but it doesn't particularly matter.
What the code should do is note that the namespace entry was inserted as
a method or vtable override, maybe by setting an integer flag, and then
at line 289 check the flag and return if it's true. (It can't just
return immediately, because some entries are both vtable overrides and
methods.)
I think I must have misinterpreted some problem in the past
as being due to a missing namespace entry, when it may have been
something else. (Looking in the wrong namespace comes to mind.)
So, it looks like Parrot already does what I need as its current
default behavior.
It was set that way in the past, which may have caused an earlier
problem. But, if you don't actually need the feature now, we won't add
the flag.
Allison