code_util.m bug fix
Fergus Henderson
fjh at cs.mu.oz.au
Wed Mar 19 00:47:08 AEDT 1997
Fix a bug reported by Renaud Paquay from Mission Critical.
compiler/code_util.m:
Handle empty disjunctions in code_util__count_recursive_calls_disj;
don't call error/1, because empty disjunctions are perfectly valid
(they just mean `fail').
Index: code_util.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/code_util.m,v
retrieving revision 1.82
diff -u -r1.82 code_util.m
--- code_util.m 1997/03/06 05:08:58 1.82
+++ code_util.m 1997/03/18 13:38:09
@@ -822,8 +822,7 @@
pred_id, proc_id, int, int).
:- mode code_util__count_recursive_calls_disj(in, in, in, out, out) is det.
-code_util__count_recursive_calls_disj([], _, _, _, _) :-
- error("empty disj in code_util__count_recursive_calls_disj").
+code_util__count_recursive_calls_disj([], _, _, 0, 0).
code_util__count_recursive_calls_disj([Goal | Goals], PredId, ProcId,
Min, Max) :-
( Goals = [] ->
--
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