[m-dev.] trivial diff: add more `MR_' prefixes, etc.

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Oct 29 02:25:15 AEST 1999


Estimated hours taken: 0.5

Update various files to reflect recent name changes.

extras/trailed_update/var.m:
tests/hard_coded/existential_types_test.m:
tests/debugger/existential_type_classes.m:
	Add missing `MR_' prefixes.

extras/trailed_update/tr_array.m:
	s/make_many/MR_GC_NEW_ARRAY/

Workspace: /home/mercury0/fjh/mercury
Index: extras/trailed_update/tr_array.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/trailed_update/tr_array.m,v
retrieving revision 1.4
diff -u -d -r1.4 tr_array.m
--- tr_array.m	1997/10/06 18:44:55	1.4
+++ tr_array.m	1999/10/28 16:22:36
@@ -300,7 +300,7 @@
 		elements_to_copy = array_size;
 	}
 
-	array = (MR_ArrayType *) make_many(Word, array_size + 1);
+	array = (MR_ArrayType *) MR_GC_NEW_ARRAY(Word, array_size + 1);
 	array->size = array_size;
 	for (i = 0; i < elements_to_copy; i++) {
 		array->elements[i] = old_array->elements[i];
@@ -356,7 +356,7 @@
 		fatal_error(""tr_array__shrink: can't shrink to a larger size"");
 	}
 
-	array = (MR_ArrayType *) make_many(Word, array_size + 1);
+	array = (MR_ArrayType *) MR_GC_NEW_ARRAY(Word, array_size + 1);
 	array->size = array_size;
 	for (i = 0; i < array_size; i++) {
 		array->elements[i] = old_array->elements[i];
Index: extras/trailed_update/var.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/trailed_update/var.m,v
retrieving revision 1.12
diff -u -d -r1.12 var.m
--- var.m	1998/03/04 19:59:49	1.12
+++ var.m	1999/10/28 14:49:02
@@ -907,7 +907,7 @@
 	setarg(MercuryTerm::in(any), ArgNum::in, NewValue::in(any)),
 	will_not_call_mercury,
 "{
-	Word *ptr = (Word *) strip_tag(MercuryTerm); /* strip off tag bits */
+	Word *ptr = (Word *) MR_strip_tag(MercuryTerm); /* strip off tag bits */
 	MR_trail_current_value(&ptr[ArgNum - 1]);
 	ptr[ArgNum - 1] = NewValue;
 }").
@@ -921,7 +921,7 @@
 	untrailed_setarg(MercuryTerm::in(any), ArgNum::in, NewValue::in(any)),
 	will_not_call_mercury,
 "{
-	Word *ptr = (Word *) strip_tag(MercuryTerm); /* strip off tag bits */
+	Word *ptr = (Word *) MR_strip_tag(MercuryTerm); /* strip off tag bits */
 	ptr[ArgNum - 1] = NewValue;
 }").
 
Index: tests/debugger/existential_type_classes.m
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/existential_type_classes.m,v
retrieving revision 1.3
diff -u -d -r1.3 existential_type_classes.m
--- existential_type_classes.m	1998/10/29 10:14:05	1.3
+++ existential_type_classes.m	1999/10/28 16:16:15
@@ -75,13 +75,13 @@
 
 :- pragma c_code(my_univ_value(Univ::in) = (Value::out), will_not_call_mercury, "
 	TypeClassInfo_for_existential_type_classes__fooable_T =
-		field(mktag(0), Univ, 0);
-	Value = field(mktag(0), Univ, 1);
+		MR_field(MR_mktag(0), Univ, 0);
+	Value = MR_field(MR_mktag(0), Univ, 1);
 ").
 
 :- pragma c_code(my_univ(Value::in) = (Univ::out), will_not_call_mercury, "
 	incr_hp(Univ, 2);
-	field(mktag(0), Univ, 0) =
+	MR_field(MR_mktag(0), Univ, 0) =
 		(Word) TypeClassInfo_for_existential_type_classes__fooable_T;
-	field(mktag(0), Univ, 1) = (Word) Value;
+	MR_field(MR_mktag(0), Univ, 1) = (Word) Value;
 ").
Index: tests/hard_coded/existential_types_test.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/existential_types_test.m,v
retrieving revision 1.2
diff -u -d -r1.2 existential_types_test.m
--- existential_types_test.m	1998/07/08 20:58:49	1.2
+++ existential_types_test.m	1999/10/28 16:17:56
@@ -40,8 +40,8 @@
 call_my_univ_value(Univ) = my_univ_value(Univ).
 
 :- pragma c_code(my_univ_value(Univ::in) = (Value::out), will_not_call_mercury, "
-	TypeInfo_for_T = field(mktag(0), Univ, UNIV_OFFSET_FOR_TYPEINFO);
-	Value = field(mktag(0), Univ, UNIV_OFFSET_FOR_DATA);
+	TypeInfo_for_T = MR_field(MR_mktag(0), Univ, UNIV_OFFSET_FOR_TYPEINFO);
+	Value = MR_field(MR_mktag(0), Univ, UNIV_OFFSET_FOR_DATA);
 ").
 
 % The predicate has_type/2 is basically an existentially typed

-- 
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