On Fri, May 02, 2008 at 02:16:01AM -0500, Patrick R. Michaud wrote:
> > When you try to invoke a sub that doesn't exist, Parrot currently gives the
> > unhelpful error message "Null PMC access in invoke()". Sometimes you can
> > figure out what's wrong given the backtrace. Often you can't.
> > ...
> > The attached patch -- for discussion only -- adds an experimental op which
> > performs the lookup and throws an exception if the sub is PMCNULL. Nothing
> > else uses this op, and it doesn't perturb the existing find_name op, which
> > is
> > important.
>
> I'd like to see this patch or something like it applied relatively
> soon. If it's not likely to happen within the next week or so, then
> I'll go ahead with my plan to resolve the issue from within PCT until
> Parrot does have a good solution.
The PCT-based solution is now implemented in r27351. In particular,
when running a PCT-based language such as NQP or Rakudo (perl6),
a statement like
foo(1);
now throws an exception saying "Cannot invoke non-existent sub 'foo'"
instead of "Null PMC in invoke".
Pm