[m-dev.] diff: fix bug with tuples & transient registers

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Oct 4 22:13:39 AEDT 2000


Estimated hours taken: 0.5

library/std_util.m:
	Fix a bug that broke things in LLDS grades on the SPARC:
	in `construct_tuple_2', add calls to save/restore transient
	registers around a call to ML_make_type(), as the
	documentation for ML_make_type() says is required.

Workspace: /home/pgrad/fjh/ws/hg
Index: library/std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.200
diff -u -d -r1.200 std_util.m
--- library/std_util.m	2000/10/03 02:21:39	1.200
+++ library/std_util.m	2000/10/04 11:09:21
@@ -2019,8 +2019,10 @@
 	/*
 	** Construct a type_info for the tuple.
 	*/
+	save_transient_registers();
 	type_info = ML_make_type(Arity, MR_TYPECTOR_DESC_MAKE_TUPLE(Arity),
 			ArgTypes);
+	restore_transient_registers();
 
 	/*
 	** Create the tuple.
@@ -2042,7 +2044,7 @@
 	** Create a univ.
 	*/
 	incr_hp_msg(Term, 2, MR_PROC_LABEL, ""std_util:univ/0"");
-    MR_define_univ_fields(Term, type_info, new_data);
+	MR_define_univ_fields(Term, type_info, new_data);
 }
 ").
 

-- 
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list