[m-rev.] for review: generalize the specialization of compare/3 predicates

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Feb 5 09:51:35 AEDT 2002


On 05-Feb-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> The point I was trying to make was that you should be able to remove the
> code above this diff fragment that handles the single constructor case,
> and change the test in the diff fragment to `Ctors = [_ | _]'.

The code that handles two or more constructors always generates a disjunction.
For the one-constructor case, this disjunction is redundant. It seems simpler
as well as more efficient not to generate it, rather than let it be optimized
away during simplification.

> It's not a big deal, but it makes HLDS dumps easier to read
> if the order in the clauses_info matches the order in the
> proc_info.

Ah, but it won't match either way. Neither sorting on declaration order
nor sorting on reverse declaration order will match the switch in the
proc_info, which will be on alphabetical order.

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