Diff: Bug fix in inst_util

Andrew Bromage bromage at hydra.cs.mu.oz.au
Mon Oct 6 12:59:07 AEST 1997


G'day all.

This has already been committed --- no need for review.

There's no test case, either.  I talked about it briefly with Fergus,
and we both agreed that it would be quite difficult to write an
appropriate test case, since we don't currently use any insts with
pred types anywhere.

Cheers,
Andrew Bromage
--------8<---CUT HERE---8<--------

Estimated hours taken: 0.1

Minor bug fix.

compiler/inst_util.m:
	A dead unification between a pred inst and an any inst is
	dead for the purpose of computing the final uniqueness, not
	live.

Index: inst_util.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/inst_util.m,v
retrieving revision 1.6
diff -u -r1.6 inst_util.m
--- inst_util.m	1997/09/21 09:22:18	1.6
+++ inst_util.m	1997/10/06 02:50:53
@@ -352,7 +352,7 @@
 abstractly_unify_inst_3(dead, ground(UniqX, yes(PredInst)), any(UniqY), Real, M,
 				ground(Uniq, yes(PredInst)), semidet, M) :-
 	allow_unify_bound_any(Real),
-	unify_uniq(live, Real, semidet, UniqX, UniqY, Uniq).
+	unify_uniq(dead, Real, semidet, UniqX, UniqY, Uniq).
 
 abstractly_unify_inst_3(dead, ground(Uniq, yes(PredInst)), free, _Real, M,
 				ground(Uniq, yes(PredInst)), det, M).




More information about the developers mailing list