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

Peter Wang novalazy at gmail.com
Wed Jan 30 12:29:20 AEDT 2008


On 2008-01-30, Zoltan Somogyi <zs at csse.unimelb.edu.au> wrote:
> 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.

Yes.  However, there is currently no type category for no-tag types.
Should one be added?

Peter

--------------------------------------------------------------------------
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