for review: inst_is_free(free(Type), _)
Fergus Henderson
fjh at cs.mu.oz.au
Mon Apr 7 00:55:35 AEST 1997
compiler/mode_util.m:
Change `inst_is_free' so that it succeeds for free/1 insts
as well as free/0 insts. (Currently we're not creating any
free/1 insts, so this bug has gone unnoticed.)
Index: mode_util.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/mode_util.m,v
retrieving revision 1.83
diff -u -r1.83 mode_util.m
--- mode_util.m 1997/02/28 05:30:31 1.83
+++ mode_util.m 1997/04/06 08:32:00
@@ -420,7 +420,7 @@
ArgInst = not_reached
).
get_single_arg_inst(free, _, _, free).
-get_single_arg_inst(free(_Type), _, _, free).
+get_single_arg_inst(free(_Type), _, _, free). % XXX loses type info
get_single_arg_inst(any(Uniq), _, _, any(Uniq)).
get_single_arg_inst(abstract_inst(_, _), _, _, _) :-
error("get_single_arg_inst: abstract insts not supported").
@@ -483,6 +483,7 @@
:- inst_is_free(_, X) when X. % NU-Prolog indexing.
inst_is_free(_, free).
+inst_is_free(_, free(_Type)).
inst_is_free(_, inst_var(_)) :-
error("internal error: uninstantiated inst parameter").
inst_is_free(ModuleInfo, defined_inst(InstName)) :-
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list