[m-rev.] diff: fix sys_init problems in hlc.gc grade
Peter Ross
peter.ross at miscrit.be
Mon Jun 4 23:36:49 AEST 2001
Hi,
===================================================================
Estimated hours taken: 1
Fix a bootstrapping problem for the hlc.gc backend.
library/array.m:
library/builtin.m:
library/private_builtin.m:
library/std_util.m:
Provide empty definitions of all the handwritten sys_init functions for
the hlc.gc backend.
Index: array.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/array.m,v
retrieving revision 1.92
diff -u -r1.92 array.m
--- array.m 2001/05/31 06:00:03 1.92
+++ array.m 2001/06/04 13:23:59
@@ -425,16 +425,8 @@
/* forward decl, to suppress gcc -Wmissing-decl warning */
void sys_init_array_module_builtins(void);
-
-/*
-** This empty initialization function is needed just to
-** match the one that we use for LLDS grades.
-*/
-void
-sys_init_array_module_builtins(void)
-{
- /* no initialization needed */
-}
+void sys_init_array_module_builtins_init(void);
+void sys_init_array_module_builtins_init_type_tables(void);
bool MR_CALL
mercury__array__do_unify__array_1_0(MR_Mercury_Type_Info type_info,
@@ -572,20 +564,26 @@
MR_MODULE_STATIC_OR_EXTERN MR_ModuleFunc array_module_builtins;
+#endif /* ! MR_HIGHLEVEL_CODE */
+
void
sys_init_array_module_builtins_init(void)
{
+#ifndef MR_HIGHLEVEL_CODE
array_module_builtins();
MR_INIT_TYPE_CTOR_INFO(
mercury_data_array__type_ctor_info_array_1,
array__array_1_0);
+#endif
}
void
sys_init_array_module_builtins_init_type_tables(void)
{
+#ifndef MR_HIGHLEVEL_CODE
MR_register_type_ctor_info(
&mercury_data_array__type_ctor_info_array_1);
+#endif
}
#ifdef MR_DEEP_PROFILING
@@ -598,8 +596,6 @@
&MR_proc_static_compiler_name(array, __Compare__, array, 1, 0));
}
#endif
-
-#endif /* ! MR_HIGHLEVEL_CODE */
").
Index: builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/builtin.m,v
retrieving revision 1.55
diff -u -r1.55 builtin.m
--- builtin.m 2001/05/31 06:00:03 1.55
+++ builtin.m 2001/06/04 13:24:01
@@ -398,6 +398,7 @@
void
sys_init_builtin_types_module_init_type_tables(void)
{
+#ifndef MR_HIGHLEVEL_CODE
MR_register_type_ctor_info(
&mercury_data___type_ctor_info_int_0);
MR_register_type_ctor_info(
@@ -414,6 +415,7 @@
&mercury_data___type_ctor_info_tuple_0);
MR_register_type_ctor_info(
&mercury_data___type_ctor_info_void_0);
+#endif
}
#ifdef MR_DEEP_PROFILING
@@ -988,16 +990,6 @@
/* forward decl, to suppress gcc -Wmissing-decl warning */
void sys_init_copy_module(void);
-/*
-** This empty initialization function is needed just to
-** match the one that we use for LLDS grades.
-*/
-void
-sys_init_copy_module(void)
-{
- /* no initialization needed */
-}
-
#else /* ! MR_HIGHLEVEL_CODE */
#ifdef MR_DEEP_PROFILING
@@ -1086,6 +1078,8 @@
#undef copy_body
MR_END_MODULE
+#endif /* ! MR_HIGHLEVEL_CODE */
+
/* Ensure that the initialization code for the above module gets run. */
/*
@@ -1104,7 +1098,9 @@
void
sys_init_copy_module_init(void)
{
+#ifndef MR_HIGHLEVEL_CODE
copy_module();
+#endif
}
void
@@ -1123,7 +1119,6 @@
}
#endif
-#endif /* ! MR_HIGHLEVEL_CODE */
").
%-----------------------------------------------------------------------------%
@@ -1220,18 +1215,22 @@
void
sys_init_c_pointer_module_init(void)
{
+#ifndef MR_HIGHLEVEL_CODE
c_pointer_module();
MR_INIT_TYPE_CTOR_INFO(
mercury_data_builtin__type_ctor_info_c_pointer_0,
builtin__c_pointer_0_0);
+#endif
}
void
sys_init_c_pointer_module_init_type_tables(void)
{
+#ifndef MR_HIGHLEVEL_CODE
MR_register_type_ctor_info(
&mercury_data_builtin__type_ctor_info_c_pointer_0);
+#endif
}
#ifdef MR_DEEP_PROFILING
Index: private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.77
diff -u -r1.77 private_builtin.m
--- private_builtin.m 2001/05/31 06:00:04 1.77
+++ private_builtin.m 2001/06/04 13:24:02
@@ -482,6 +482,7 @@
void
sys_init_type_info_module_init_type_tables(void)
{
+#ifndef MR_HIGHLEVEL_CODE
MR_register_type_ctor_info(
&mercury_data_private_builtin__type_ctor_info_type_ctor_info_1);
MR_register_type_ctor_info(
@@ -490,6 +491,7 @@
&mercury_data_private_builtin__type_ctor_info_base_typeclass_info_1);
MR_register_type_ctor_info(
&mercury_data_private_builtin__type_ctor_info_typeclass_info_1);
+#endif
}
#ifdef MR_DEEP_PROFILING
Index: std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.230
diff -u -r1.230 std_util.m
--- std_util.m 2001/05/31 06:00:06 1.230
+++ std_util.m 2001/06/04 13:24:16
@@ -1341,8 +1341,10 @@
void
sys_init_type_desc_module_init_type_tables(void)
{
+#ifndef MR_HIGHLEVEL_CODE
MR_register_type_ctor_info(
&mercury_data_std_util__type_ctor_info_type_desc_0);
+#endif
}
#ifdef MR_DEEP_PROFILING
--------------------------------------------------------------------------
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