[m-dev.] for review: use gcc's regparm attribute (was: fastcall for the x86)

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Dec 3 13:21:38 AEDT 2000


One more little addendum to this diff, since my previous diff broke
things for the LLDS grades, due to a problem with header dependencies.

I'll go ahead and commit this change now.  Pete tells me that I didn't
get the syntax quite right for use with MSVC, but I'll address that
one as a separate change.

runtime/mercury_types.h:
runtime/mercury.h:
	Move the definition of MR_Cont and MR_NestedCont from
	mercury_types.h to mercury.h.  This was needed to avoid a
	cyclic header dependency problem and is also a good idea
	anyway, since MR_Cont and MR_NestedCont are specific to the
	MLDS back-end.

Index: runtime/mercury_types.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_types.h,v
retrieving revision 1.23
diff -u -d -u -r1.23 mercury_types.h
--- runtime/mercury_types.h	2000/11/23 02:00:49	1.23
+++ runtime/mercury_types.h	2000/11/29 14:43:56
@@ -92,10 +92,6 @@
 typedef MR_Char *MR_String;
 typedef const MR_Char *MR_ConstString;
 
-/* continuation function type, for --high-level-code option */
-typedef void (*MR_NestedCont) (void);	/* for --gcc-nested-functions */
-typedef void (*MR_Cont) (void *);	/* for --no-gcc-nested-functions */
-
 #ifndef MR_HIGHLEVEL_CODE
   /*
   ** semidet predicates indicate success or failure by leaving nonzero or zero
Index: runtime/mercury.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury.h,v
retrieving revision 1.25
diff -u -d -u -r1.25 mercury.h
--- runtime/mercury.h	2000/11/06 10:43:40	1.25
+++ runtime/mercury.h	2000/11/29 14:48:48
@@ -24,7 +24,7 @@
 #include "mercury_tags.h"
 #include "mercury_grade.h"
 #include "mercury_thread.h"	/* for the MR_*_GLOBAL_LOCK() macros */
-#include "mercury_std.h"
+#include "mercury_std.h"	/* for the MR_CALL macro (and others) */
 #include "mercury_type_info.h"
 #include "mercury_ho_call.h"	/* for the `MR_Closure' type */
 #include "mercury_bootstrap.h"
@@ -60,6 +60,13 @@
 */
 
 /*
+** The continuation function types used for implementing
+** nondeterministic procedures.
+*/
+typedef void MR_CALL (*MR_NestedCont) (void); /* for --gcc-nested-functions */
+typedef void MR_CALL (*MR_Cont) (void *); /* for --no-gcc-nested-functions */
+
+/*
 ** The types uses to represent the Mercury builtin types,
 ** MR_Char, MR_Float, MR_Integer, MR_String, and MR_ConstString,
 ** are defined in mercury_types.h and mercury_float.h.

-- 
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