[m-rev.] for reviews: fix optimization in unify_proc.m

Zoltan Somogyi zs at cs.mu.OZ.AU
Wed Mar 31 20:59:07 AEST 2004


On 31-Mar-2004, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > +			ConsTag = shared_local_tag(_, LocalTag)
> > +		->
> > +			BoundInst = functor(int_const(LocalTag), []),
> 
> Why do you ignore the first argument of shared_local_tag here?
> Won't that code give an incorrect result when the first argument of
> shared_local_tag is non-zero?

No. All the constants of a given type will have the same primary tag,
regardless of what that tag is. The inst of the cast-to variable, if
set to a given int, says that the cast-from variable is set to the
constant with the primary tag shared by all constants of that type
and the given int as the secondary tag. The scheme doesn't depend
on the primary tag being zero.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list