[m-dev.] for review: fix bogus declarations for layout structures

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu Apr 20 14:09:11 AEST 2000


For review by Fergus.

Estimated hours taken: 4

Fix a bug that was causing the compiler to output bogus declarations
of nonexistent layout structures, using undefined C structure tags.
For some reason, gcc accepted these declarations on all our platforms
except taifun.

compiler/llds.m:
	We used to have one field in pragma_c instructions that could name
	a label that cannot be renamed by optimizations. In some instructions,
	this label had a layout structure, in others it didn't. We now have
	two fields, one for labels that have layout structures and one for
	labels that don't.

compiler/llds_out.m:
	Declare the C global variable holding the layout structure of a fixed
	(non-renamable) label referred to by a pragma_c instruction only if
	that label does have a layout structure.

compiler/*.m:
	Minor changes to conform to the changes to pragma_c instructions.

Zoltan.

cvs diff: Diffing .
Index: mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.58
diff -u -b -B -r1.58 mercury_wrapper.c
--- mercury_wrapper.c	2000/04/05 06:29:01	1.58
+++ mercury_wrapper.c	2000/04/18 04:56:32
@@ -132,7 +132,6 @@
 /* we depend on these five structs being initialized to zero */
 MR_TypeStat	MR_type_stat_mer_unify;
 MR_TypeStat	MR_type_stat_c_unify;
-MR_TypeStat	MR_type_stat_mer_index;
 MR_TypeStat	MR_type_stat_mer_compare;
 MR_TypeStat	MR_type_stat_c_compare;
 
@@ -1026,7 +1025,6 @@
 
 	MR_print_one_type_ctor_stat(fp, "UNIFY", &MR_type_stat_mer_unify);
 	MR_print_one_type_ctor_stat(fp, "UNIFY_C", &MR_type_stat_c_unify);
-	MR_print_one_type_ctor_stat(fp, "INDEX", &MR_type_stat_mer_index);
 	MR_print_one_type_ctor_stat(fp, "COMPARE", &MR_type_stat_mer_compare);
 	MR_print_one_type_ctor_stat(fp, "COMPARE_C", &MR_type_stat_c_compare);
 
Index: mercury_wrapper.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.h,v
retrieving revision 1.30
diff -u -b -B -r1.30 mercury_wrapper.h
--- mercury_wrapper.h	2000/04/05 06:29:02	1.30
+++ mercury_wrapper.h	2000/04/18 04:56:09
@@ -203,7 +203,6 @@
 
 extern	MR_TypeStat	MR_type_stat_mer_unify;
 extern	MR_TypeStat	MR_type_stat_c_unify;
-extern	MR_TypeStat	MR_type_stat_mer_index;
 extern	MR_TypeStat	MR_type_stat_mer_compare;
 extern	MR_TypeStat	MR_type_stat_c_compare;
 
cvs diff: Diffing GETOPT
cvs diff: Diffing machdeps
--------------------------------------------------------------------------
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