[m-rev.] diff: don't try to reuse no-tag values

Zoltan Somogyi zs at csse.unimelb.edu.au
Wed Jan 30 11:58:24 AEDT 2008


On 30-Jan-2008, Peter Wang <novalazy at gmail.com> wrote:
> @@ -188,6 +189,11 @@
>              ConsId = cons(_, Arity),
>              Arity \= 0,
>  
> +            % No-tag values don't have a cell to reuse.
> +            proc_info_get_vartypes(ProcInfo, VarTypes),
> +            map.lookup(VarTypes, Var, Type),
> +            \+ type_is_no_tag_type(ModuleInfo, Type),
> +

This would be more robust if instead of checking for one kind of type,
it called a predicate that did a switch on the type category, and returned
an appropriate value in each case.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list