trivial diff: use float.m functions instead of predicates

Simon Taylor stayl at cs.mu.OZ.AU
Thu Mar 18 12:32:06 AEDT 1999


Estimated hours taken: 0.1

compiler/fact_table.m:
compiler/term_pass1.m:
	Use floating point functions instead of the obsolete predicates.


Index: fact_table.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/fact_table.m,v
retrieving revision 1.23
diff -u -u -r1.23 fact_table.m
--- fact_table.m	1999/02/08 22:42:44	1.23
+++ fact_table.m	1999/03/15 23:39:15
@@ -2158,8 +2158,7 @@
 		% XXX This method of hashing floats may not work cross-compiling
 		% between architectures that have different floating-point
 		% representations.
-		float__hash(Float, N0),
-		int__abs(N0, N),
+		int__abs(float__hash(Float), N),
 		Ns = [N]
 	;
 		error("fact_table_hash: unsupported type in key")
Index: term_pass1.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/term_pass1.m,v
retrieving revision 1.9
diff -u -u -r1.9 term_pass1.m
--- term_pass1.m	1998/11/20 04:09:22	1.9
+++ term_pass1.m	1999/03/15 23:40:51
@@ -354,7 +354,7 @@
 lookup_coeff(PPIds, Soln, PPId, PPId - ICoeff) :-
 	map__lookup(PPIds, PPId, Var),
 	map__lookup(Soln, Var, Coeff),
-	float__ceiling_to_int(Coeff, ICoeff).
+	ICoeff = float__ceiling_to_int(Coeff).
 
 :- pred pred_proc_var(pred_proc_id::in, var::out, varset::in, varset::out,
 	map(pred_proc_id, var)::in, map(pred_proc_id, var)::out) is det.



More information about the developers mailing list