[m-rev.] for review: fix univs in .memprof grades

David Jeffery dgj at cs.mu.OZ.AU
Thu Apr 5 17:54:07 AEST 2001


===================================================================

Estimated hours taken: 1

Fix a bug that was stopping us bootstrapping in .memprof grades.
This bug was checked in with my changes to merge the HAL and main
branches.

runtime/mercury_type_info.h:
	When allocating a univ with MR_new_univ_on_hp(), allocate the
	storate required with MR_tag_incr_hp rather than MR_tag_incr_hp_msg
	seeing that we don't necessarily have a handle on the current
	proc label.

	Also fix some whitespace errors.

===================================================================
Index: runtime/mercury_type_info.h
===================================================================
RCS file: /home/staff/zs/imp/mercury/runtime/mercury_type_info.h,v
retrieving revision 1.68
diff -u -t -r1.68 mercury_type_info.h
--- runtime/mercury_type_info.h	2001/03/20 21:02:20	1.68
+++ runtime/mercury_type_info.h	2001/04/04 05:44:59
@@ -421,25 +421,25 @@
 
 #define MR_unravel_univ(univ, typeinfo, value)                      \
     do {                                                            \
-        typeinfo = (MR_TypeInfo) MR_field(MR_UNIV_TAG, (univ),\
+        typeinfo = (MR_TypeInfo) MR_field(MR_UNIV_TAG, (univ),      \
                         MR_UNIV_OFFSET_FOR_TYPEINFO);               \
-        value = MR_field(MR_UNIV_TAG, (univ),             \
+        value = MR_field(MR_UNIV_TAG, (univ),                       \
                         MR_UNIV_OFFSET_FOR_DATA);                   \
     } while (0)
 
 #define MR_define_univ_fields(univ, typeinfo, value)                \
     do {                                                            \
-        MR_field(MR_UNIV_TAG, (univ), MR_UNIV_OFFSET_FOR_TYPEINFO) \
+        MR_field(MR_UNIV_TAG, (univ), MR_UNIV_OFFSET_FOR_TYPEINFO)  \
             = (MR_Word) (typeinfo);                                 \
-        MR_field(MR_UNIV_TAG, (univ), MR_UNIV_OFFSET_FOR_DATA)     \
+        MR_field(MR_UNIV_TAG, (univ), MR_UNIV_OFFSET_FOR_DATA)      \
             = (MR_Word) (value);                                    \
     } while (0)
 
 /* Allocate a univ on the heap */
+/* XXX we should use MR_tag_incr_hp_msg() here */
 #define MR_new_univ_on_hp(univ, typeinfo, value)                    \
     do {                                                            \
-        MR_tag_incr_hp_msg((univ), MR_UNIV_TAG,                     \
-                        2, MR_PROC_LABEL, "std_util:univ/0");       \
+        MR_tag_incr_hp((univ), MR_UNIV_TAG, 2);                     \
         MR_define_univ_fields((univ), (typeinfo), (value));         \
     } while (0)
 


dgj
-- 
David Jeffery (dgj at cs.mu.oz.au) | If you want to build a ship, don't drum up 
PhD student,                    | people together to collect wood or assign 
Dept. of Comp. Sci. & Soft. Eng.| them tasks and work, but rather teach them 
The University of Melbourne     | to long for the endless immensity of the sea.
Australia                       | -- Antoine de Saint Exupery
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list