[m-dev.] diff: bootstrap problem with init files in hlc grade
Peter Ross
peter.ross at miscrit.be
Thu Nov 2 22:07:16 AEDT 2000
Hi,
At some stage we should generate the correct initialization functions.
===================================================================
Estimated hours taken: 0.5
Zoltans recent change which provides a register of all the types defined
in the program breaks the MLDS backend as the new init functions are not
generated by the MLDS backend.
util/mkinit.c:
Protect calls to the new init functions inside
#ifndef MR_HIGHLEVEL_CODE.
Index: mkinit.c
===================================================================
RCS file: /home/mercury1/repository/mercury/util/mkinit.c,v
retrieving revision 1.67
diff -u -r1.67 mkinit.c
--- mkinit.c 2000/10/31 07:54:11 1.67
+++ mkinit.c 2000/11/02 11:00:19
@@ -817,8 +817,22 @@
(*num_calls_in_cur_bunch_ptr)++;
+ /*
+ ** XXX if the suffix isn't the empty string then we are
+ ** outputting an initialization function which isn't supported
+ ** by the MLDS backend.
+ */
+ if (*suffix != '\0') {
+ fputs("#ifndef MR_HIGHLEVEL_CODE\n", stdout);
+ }
+
printf("\t{ extern void %s%s(void);\n", func_name, suffix);
printf("\t %s%s(); }\n", func_name, suffix);
+
+ if (*suffix != '\0') {
+ fputs("#endif /* MR_HIGHLEVEL_CODE */\n", stdout);
+ }
+
}
/*---------------------------------------------------------------------------*/
--------------------------------------------------------------------------
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