[m-rev.] diff: fix type_info arity for C grades with --high-level-data

Julien Fischer juliensf at cs.mu.OZ.AU
Thu Dec 8 02:12:30 AEDT 2005


Estimated hours taken: 1.5
Branches: main

runtime/mercury_hlc_types.h:
	Update the arity of the high-level data version of type_info and
	friends.

library/private_butilin.m:
	Update the arity of type_info etc in some comments and also in the
	assertion messages used by the IL and Java backends.

compiler/ml_code_gen.m:
	Unrelated changed: s/Word/MR_Word/ in a comment.

Julien.

Index: compiler/ml_code_gen.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_code_gen.m,v
retrieving revision 1.165
diff -u -r1.165 ml_code_gen.m
--- compiler/ml_code_gen.m	28 Nov 2005 04:11:46 -0000	1.165
+++ compiler/ml_code_gen.m	7 Dec 2005 13:57:37 -0000
@@ -2930,7 +2930,7 @@
         ;
             HighLevelData = no,
             % For --no-high-level-data, we only need to use a cast is for
-            % polymorphic types, which are `Word' in the C interface but
+            % polymorphic types, which are `MR_Word' in the C interface but
             % `MR_Box' in the MLDS back-end. Except for MC++, where
             % polymorphic types are MR_Box, but we get here only if Lang
             % is c or java.
Index: library/private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.149
diff -u -r1.149 private_builtin.m
--- library/private_builtin.m	4 Dec 2005 01:09:48 -0000	1.149
+++ library/private_builtin.m	7 Dec 2005 06:42:56 -0000
@@ -286,7 +286,7 @@
 :- type base_typeclass_info.

     % The following types are used by compiler/ml_code_util.m as the types
-    % used for copying type_info/1 and typeclass_info/1 types.
+    % used for copying type_info/0 and typeclass_info/0 types.
     % XXX Document me better
     %
 :- type sample_type_info
@@ -340,7 +340,7 @@

 :- implementation.

-    % The definitions for type_ctor_info/1 and type_info/1.
+    % The definitions for type_ctor_info/0 and type_info/0.

 :- pragma foreign_code("C#", "

@@ -1453,7 +1453,7 @@
     {
         // stub only
         throw new java.lang.Error
-            (""unify/2 for type type_info/1"");
+            (""unify/2 for type type_info/0"");
     }

     public static boolean
@@ -1461,7 +1461,7 @@
         java.lang.Object[] x, java.lang.Object[] y)
     {
         // stub only
-        throw new java.lang.Error(""unify/2 for type typeclass_info/1"");
+        throw new java.lang.Error(""unify/2 for type typeclass_info/0"");
     }

     public static boolean
@@ -1508,7 +1508,7 @@
     {
         // stub only
         throw new java.lang.Error
-            (""compare/2 for type type_info/1"");
+            (""compare/2 for type type_info/0"");
     }

     public static mercury.builtin.Comparison_result_0
@@ -1525,7 +1525,7 @@
     {
         // stub only
         throw new java.lang.Error
-            (""compare/2 for type typeclass_info/1"");
+            (""compare/2 for type typeclass_info/0"");
     }

 ").
Index: runtime/mercury_hlc_types.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_hlc_types.h,v
retrieving revision 1.4
diff -u -r1.4 mercury_hlc_types.h
--- runtime/mercury_hlc_types.h	14 Dec 2004 01:07:24 -0000	1.4
+++ runtime/mercury_hlc_types.h	7 Dec 2005 06:34:01 -0000
@@ -66,13 +66,13 @@
   typedef struct mercury__type_desc__type_desc_0_s * MR_Type_Desc;
   typedef struct mercury__type_desc__pseudo_type_desc_0_s * MR_Pseudo_Type_Desc;
   typedef struct mercury__type_desc__type_ctor_desc_0_s * MR_Type_Ctor_Desc;
-  typedef struct mercury__private_builtin__type_info_1_s *
+  typedef struct mercury__private_builtin__type_info_0_s *
   	MR_Mercury_Type_Info;
-  typedef struct mercury__private_builtin__type_ctor_info_1_s *
+  typedef struct mercury__private_builtin__type_ctor_info_0_s *
   	MR_Mercury_Type_Ctor_Info;
-  typedef struct mercury__private_builtin__typeclass_info_1_s *
+  typedef struct mercury__private_builtin__typeclass_info_0_s *
   	MR_Mercury_TypeClass_Info;
-  typedef struct mercury__private_builtin__base_typeclass_info_1_s *
+  typedef struct mercury__private_builtin__base_typeclass_info_0_s *
   	MR_Mercury_Base_TypeClass_Info;
 #else
   /* for --no-high-level-data, they're all just `MR_Word' */

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