[m-dev.] diff: move the initialisation of MR_mmc_options in MR_trace_event_external()
Erwan Jahier
Erwan.Jahier at irisa.fr
Tue May 25 18:23:08 AEST 1999
| Fergus Henderson wrote:
[...]
| I had a more detailed look at the order of initialization, and I think
| it should be OK to initialize MR_mmc_options in MR_trace_init_external.
| So doing the initialization there is probably a better idea.
|
Here is the new diff
Estimated hours taken: 0.1
Initialise the variable MR_mmc_options in MR_trace_init_external() rather
than in MR_trace_event_external().
only if an interactive query request is
made; it is useless to pay the price of a call to MR_TRACE_CALL_MERCURY() for
the other kinds of requests.
trace/mercury_trace_external.c:
Move the call to
MR_TRACE_CALL_MERCURY(ML_DI_init_mercury_string(&MR_mmc_options))
from MR_trace_event_external() to MR_trace_init_external().
Index: trace/mercury_trace_external.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_external.c,v
retrieving revision 1.17
diff -u -r1.17 mercury_trace_external.c
--- mercury_trace_external.c 1999/05/21 14:38:21 1.17
+++ mercury_trace_external.c 1999/05/25 08:17:37
@@ -213,6 +213,14 @@
struct sockaddr* addr;
Word debugger_request;
Integer debugger_request_type;
+ static String MR_mmc_options;
+
+ /*
+ ** MR_mmc_options contains the options to pass to mmc when compiling
+ ** queries. We initialise it to the String "".
+ */
+
+ MR_TRACE_CALL_MERCURY(ML_DI_init_mercury_string(&MR_mmc_options));
/*
** We presume that the user's program has been invoked from
@@ -401,13 +409,7 @@
Integer modules_list_length;
Word modules_list;
int ancestor_level;
-
- /*
- ** MR_mmc_options contains the options to pass to mmc when compiling
- ** queries. We initialise it to the String "".
- */
- static String MR_mmc_options;
- MR_TRACE_CALL_MERCURY(ML_DI_init_mercury_string(&MR_mmc_options));
+ static String MR_mmc_options;
/* by default, print variables from the current call */
ancestor_level = 0;
--
R1.
--------------------------------------------------------------------------
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