On Sunday 22 June 2008 09:04:53 [EMAIL PROTECTED] wrote:
> Modified: trunk/compilers/imcc/pbc.c
> ===========================================================================
> --- trunk/compilers/imcc/pbc.c  (original)
> +++ trunk/compilers/imcc/pbc.c  Sun Jun 22 09:04:48 2008
> @@ -1032,12 +1032,31 @@
>          }
>      }
>  
> +    /* Do we have to create an instance of a specific type for this sub?
> */ +    if (unit->instance_of) {
> +        /* Look it up as a class and as a PMC type. */
> +        STRING * const classname = string_from_cstring(interp,
> unit->instance_of + 1, +                 strlen(unit->instance_of) - 2);
> +        PMC * const classobj = Parrot_oo_get_class_str(interp, classname);
> +        if (!PMC_IS_NULL(classobj))
> +            sub_pmc = VTABLE_instantiate(interp, classobj, PMCNULL);
> +        else {

Would this be cleaner if you inverted the conditions?  That is, "If the PMC 
*is* null, do this.  Otherwise, do that.

In this case I'm not sure.  Generally the double negative is confusing though.

-- c    

Reply via email to