[m-rev.] for review: disable tagged trail at configuration time

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jan 22 00:03:39 AEDT 2008


Estimated hours taken: 0.5
Branches: main

Add a configuration option for disabling the use of tagged trail entries.

configure.in:
 	Add a new option, --disable-tagged-trail, that disables the use
 	of tagged trail entries.

runtime/mercury_conf.h.in:
 	Add a new parameter, MR_FORCE_NO_TAGGED_TRAIL, that is defined
 	if configure is invoked with --disable-tagged-trail.

runtime/mercury_trail.h:
 	Check whether MR_FORCE_NO_TAGGED_TRAIL is defined when
 	determining whether tagged trail entries should be used.

Julien.

Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.512
diff -u -r1.512 configure.in
--- configure.in	17 Jan 2008 00:17:19 -0000	1.512
+++ configure.in	21 Jan 2008 12:44:14 -0000
@@ -4405,6 +4405,21 @@
  fi

  #-----------------------------------------------------------------------------#
+#
+# Check whether to disable the use of tagged trail entries
+#
+
+AC_ARG_ENABLE([tagged-trail],
+    AC_HELP_STRING([--disable-tagged-trail],
+        [do not use tagged trail entries, even if they are supported.]),
+	[ac_tagged_trail="$enableval"], [ac_tagged_trail=yes])
+
+if test "$ac_tagged_trail" = "no"
+then
+	AC_DEFINE(MR_FORCE_NO_TAGGED_TRAIL)
+fi
+
+#-----------------------------------------------------------------------------#

  AC_ARG_WITH(msvcrt,
      AC_HELP_STRING([--with-msvcrt],
Index: runtime/mercury_conf.h.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_conf.h.in,v
retrieving revision 1.60
diff -u -r1.60 mercury_conf.h.in
--- runtime/mercury_conf.h.in	12 Jul 2007 07:49:31 -0000	1.60
+++ runtime/mercury_conf.h.in	21 Jan 2008 12:44:15 -0000
@@ -522,6 +522,14 @@
  */
  #undef	MR_NEW_MERCURYFILE_STRUCT

+/*
+** MR_FORCE_NO_TAGGED_TRAIL
+**	Set this if you _do not_ want to use tagged trail entries, even if
+**	there are sufficient tag bits to support a tagged trail.
+**	See runtime/mercury_trail.h for further details.
+*/
+#undef	MR_FORCE_NO_TAGGED_TRAIL
+
  /*---------------------------------------------------------------------------*/

  #include "mercury_conf_param.h"
Index: runtime/mercury_trail.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_trail.h,v
retrieving revision 1.27
diff -u -r1.27 mercury_trail.h
--- runtime/mercury_trail.h	21 Jan 2008 03:51:26 -0000	1.27
+++ runtime/mercury_trail.h	21 Jan 2008 12:44:15 -0000
@@ -16,6 +16,7 @@
  #ifndef MERCURY_TRAIL_H
  #define MERCURY_TRAIL_H

+#include "mercury_conf.h"
  #include "mercury_memory.h"

  #ifdef MR_USE_TRAIL
@@ -214,7 +215,7 @@
  typedef void MR_untrail_func_type(void *datum, MR_untrail_reason);

  struct MR_TrailEntry_Struct {
-#if !(MR_USE_TAGGED_TRAIL)
+#if !(MR_USE_TAGGED_TRAIL) || defined(MR_FORCE_NO_TAGGED_TRAIL)
      MR_trail_entry_kind MR_entry_kind;
  #endif
      union {
@@ -234,7 +235,7 @@
  ** DO NOT ACCESS THE FIELDS DIRECTLY.
  */

-#if MR_USE_TAGGED_TRAIL
+#if MR_USE_TAGGED_TRAIL && !defined(MR_FORCE_NO_TAGGED_TRAIL)
    #define MR_func_trail_tag MR_mktag(MR_func_entry)
    #define MR_value_trail_tag    MR_mktag(MR_val_entry)


--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list