Simon Glover <[EMAIL PROTECTED]> wrote:

>  Dan,

>  Firstly, when your doing the initialization for a new ParrotClass PMC,
>  you create an Array to hold various other PMCs, but you don't size the
>  array; this means that when you later try to put things in it in
>  Parrot_new_class, it dies with:

>   Array index out of bounds!

I would use an SArray. Its simpler then an Array. Also the DOD flag is
bogus. An Array is not a buffer of PMCs. Its a ptr to a PMC in data:
PObj_is_PMC_ptr_FLAG.

>  .... For instance, in findclass, you have:

>   if (VTABLE_get_pmc_keyed(interpreter, interpreter->class_hash,
>                            key_new_string(interpreter, $2))) {
>     $1 = 1;
>  } else {
>     $1 = 0;
>  }

this should be VTABLE_exists_keyed ...

And the second find_class op should be get_class.

And s/obj\.u\.int_val/cache.int_val/g

leo

Reply via email to