[m-dev.] for review: GCC back-end: integrate with mmc

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Jan 14 20:45:35 AEDT 2001


On 14-Jan-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> gcc/mercury/mercury-gcc.c:
> 	If we're being invoked with main() defined in Mercury,
> 	then change yyparse() so that it calls back to
> 	MC_continue_frontend() rather than mercury_main().

I seem to have a bad habit of omitting files from the diffs that
I post.  For this one, I forgot to mention my changes to the
corresponding header file.  That part of the log message
should include mercury-gcc.h:

	gcc/mercury/mercury-gcc.h:
	gcc/mercury/mercury-gcc.c:
		If we're being invoked with main() defined in Mercury,
		then change yyparse() so that it calls back to
		MC_continue_frontend() rather than mercury_main().

Here's the diff for that file.  I'll try to be more careful about
omitting files from the diffs that I post in future.

Index: gcc/mercury/mercury-gcc.h
===================================================================
RCS file: /home/mercury1/repository/gcc/mercury/mercury-gcc.h,v
retrieving revision 1.13
diff -u -d -u -r1.13 mercury-gcc.h
--- mercury-gcc.h	2001/01/01 13:57:05	1.13
+++ mercury-gcc.h	2001/01/13 17:59:51
@@ -28,6 +28,13 @@
 
 /* global variables */
 
+/* If main() is defined in Mercury, then the Mercury compiler should set this
+   function pointer before invoking gcc's toplev_main().  We'll call it back
+   via this function when gcc is ready to start building the trees.
+   If main() is defined in C, this should remain null, and we'll use
+   mercury_main() as the call-back function.  */
+extern void (*merc_continue_frontend) PARAMS((void));
+
 extern tree merc_alloc_function_node;
 extern tree merc_strcmp_function_node;
 extern tree merc_hash_string_function_node;

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