On Thu, Jan 09, 2003 at 04:40:20PM -0500, Dan Sugalski wrote: > The find_method vtable entry should die, and be replaced with a plain > method entry. This should return either the address of the start of > the method's bytecode, or NULL. The NULL return is for those cases > where the method actually executed via native code, and thus doesn't > have to go anywhere. If an address is returned it's expected that the > engine will immediately dispatch to that spot, obeying parrot's > calling conventions.
What about the case where the object doesn't have the method you're asking for? You seem to be using NULL to mean something other than "not found", so does that mean not found is an exception? And if NULL is returned it is expected that the method has already been called? If so, there doesn't seem to be any way to find out if a PMC possesses (modulo AUTOLOAD) a method, without the danger of it being called. Will there be anything built in at parrot level like Perl's AUTOLOAD system? Or will that have to be done explicitly by the perl6 code generator wrapping methods in a routine that catches the "not found" exception, and attempts to use AUTOLOAD? [and whatever multimatch despatch system perl6 will be using to find the "best" method] Nicholas Clark