[m-rev.] diff: fix for new type_ctor_info layout on .NET

Peter Ross peter.ross at miscrit.be
Wed Jan 16 10:59:01 AEDT 2002


Hi,


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


Estimated hours taken: 6
Branches: main

Change the RTTI on the .NET backed to using the new type_ctor
representation introduced by zs.

library/rtti_implementation.m:
    Renumber all the fields to reflect the new type_ctor layout.
    

runtime/mercury_mcpp.h:
    Reorder the fields in the MR_DEFINE_BUILTIN_TYPE_CTOR_INFO_FULL
    macro to reflect the new type_ctor layout.
    


Index: library/rtti_implementation.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/rtti_implementation.m,v
retrieving revision 1.8
diff -u -r1.8 rtti_implementation.m
--- library/rtti_implementation.m	31 Dec 2001 04:26:46 -0000	1.8
+++ library/rtti_implementation.m	15 Jan 2002 23:46:12 -0000
@@ -994,15 +994,20 @@
 
 	enum type_ctor_info_field_nums {
 		type_ctor_arity 	= 0,
-		type_ctor_unify_pred 	= 1,
-		type_ctor_compare_pred	= 3,
-		type_ctor_rep		= 4,
-		type_ctor_module_name	= 7,
-		type_ctor_name		= 8,
-		type_functors		= 10,
-		type_layout		= 11,
-		type_ctor_num_functors	= 12,
-		type_ctor_num_ptags	= 13
+		// type_ctor_version	= 1,
+		type_ctor_rep		= 2,
+		type_ctor_num_ptags	= 3,
+		type_ctor_unify_pred 	= 4,
+		type_ctor_compare_pred	= 5,
+		// 6
+		// 7
+		// 8
+		type_ctor_module_name	= 9,
+		type_ctor_name		= 10,
+		// 11
+		type_functors		= 12,
+		type_layout		= 13,
+		type_ctor_num_functors	= 14
 	}
 
 	enum ptag_layout_field_nums {
Index: runtime/mercury_mcpp.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_mcpp.h,v
retrieving revision 1.12
diff -u -r1.12 mercury_mcpp.h
--- runtime/mercury_mcpp.h	24 Oct 2001 07:43:24 -0000	1.12
+++ runtime/mercury_mcpp.h	15 Jan 2002 23:46:29 -0000
@@ -166,7 +166,9 @@
     MR_STRUCT_INIT(MR_PASTE5(mercury_data_, __type_ctor_info_, n, _, a) = {)   \
     MR_CLASS_INIT(MR_PASTE4(type_ctor_init_, n, _, a))   		\
 	MR_BOX_INT(a),							\
-	MR_MAYBE_STATIC_CODE(n##_unify),				\
+	MR_RTTI_VERSION,						\
+	MR_TYPECTOR_REP(cr),						\
+	MR_BOX_INT(-1),							\
 	MR_MAYBE_STATIC_CODE(n##_unify),				\
 	MR_MAYBE_STATIC_CODE(n##_compare),				\
 	MR_TYPECTOR_REP(cr),						\
@@ -175,8 +177,6 @@
 	MR_string_const(MR_STRINGIFY(m), sizeof(MR_STRINGIFY(m))-1),	\
 	MR_string_const(MR_STRINGIFY(n), sizeof(MR_STRINGIFY(n))-1),	\
 	MR_RTTI_VERSION,						\
-	NULL,								\
-	NULL,								\
 	MR_BOX_INT(-1),							\
 	MR_BOX_INT(-1)							\
     MR_STRUCT_INIT_END(})						\

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