minor change to common.m
Simon TAYLOR
stayl at students.cs.mu.oz.au
Fri May 23 11:54:01 AEST 1997
Estimated hours taken: 0.1
compiler/common.m
Avoid creating X = X assignment unifications.
Index: common.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/common.m,v
retrieving revision 1.40
diff -u -r1.40 common.m
--- common.m 1997/05/21 02:13:17 1.40
+++ common.m 1997/05/21 07:35:00
@@ -576,7 +576,12 @@
common__create_output_unifications(NonLocals, InstMap, InstMapDelta,
[OutputArg | OutputArgs], [OutputArg2 | OutputArgs2],
Goals, RecomputeAtomic0, RecomputeAtomic) :-
- ( set__member(OutputArg, NonLocals) ->
+ (
+ set__member(OutputArg, NonLocals),
+ % This can happen if the first cell was created with a
+ % partially instantiated deconstruction.
+ OutputArg \= OutputArg2
+ ->
Unification = assign(OutputArg, OutputArg2),
instmap__lookup_var(InstMap, OutputArg2, Inst0),
% Check if OutputArg2 was local to the call or deconstruction
More information about the developers
mailing list