[m-rev.] diff: fix hlc bootstrap problem

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 10 04:22:43 AEDT 2004


Estimated hours taken: 2
Branches: main

Fix a bug in Zoltan's recent type class RTTI changes
that broke bootstrapping in high-level C grades
(the symptom was a type error in stage2/library/enum.c).

compiler/mlds_to_c.m:
	Change mlds_output_data_var_name so that the names
	that it outputs are consistent with the names output by
	mlds_output_fully_qualified_name (for the corresponding
	definitions): only base_typeclass_infos should be
	un-module-qualified, not all typeclass-related RTTI data.

compiler/mlds_to_gcc.m:
	Likewise (for build_data_var_name and maybe_add_qualifier).

Workspace: /home/jupiter/fjh/ws-jupiter/mercury
Index: compiler/mlds_to_c.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_c.m,v
retrieving revision 1.158
diff -u -d -r1.158 mlds_to_c.m
--- compiler/mlds_to_c.m	3 Feb 2004 05:40:00 -0000	1.158
+++ compiler/mlds_to_c.m	9 Feb 2004 16:54:51 -0000
@@ -3590,7 +3590,7 @@
 		% instance decls, even if they are in a different
 		% module
 		%
-		DataName = rtti(tc_rtti_id(_))
+		DataName = rtti(tc_rtti_id(base_typeclass_info(_, _, _)))
 	->
 		true
 	;
Index: compiler/mlds_to_gcc.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_gcc.m,v
retrieving revision 1.91
diff -u -d -r1.91 mlds_to_gcc.m
--- compiler/mlds_to_gcc.m	3 Feb 2004 05:40:00 -0000	1.91
+++ compiler/mlds_to_gcc.m	9 Feb 2004 17:21:01 -0000
@@ -2540,7 +2540,8 @@
 			% instance decls, even if they are in a different
 			% module
 			%
-			Name = data(rtti(tc_rtti_id(_)))
+			Name = data(rtti(tc_rtti_id(
+				base_typeclass_info(_, _, _))))
 		;
 			% We don't module qualify pragma export names.
 			Name = export(_)
@@ -3693,7 +3694,7 @@
 		% instance decls, even if they are in a different
 		% module
 		%
-		DataName = rtti(tc_rtti_id(_))
+		DataName = rtti(tc_rtti_id(base_typeclass_info(_, _, _)))
 	->
 		ModuleQualifier = ""
 	;

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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