[m-dev.] for review: cleanup of tabling
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Dec 31 15:38:22 AEDT 1999
On 30-Dec-1999, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
>
> +++ trace/mercury_trace_internal.c 1999/12/30 08:21:35
> @@ -97,6 +97,18 @@
> #endif
>
> /*
> +** We don't want to see any messages from initialization code about
> +** entering and leaving commits. We must therefore disable MR_tabledebug
> +** at the start after saving its old value in MR_saved_tabledebug, and
> +** restore the old value when we have finished executing all initialization
> +** code.
> +*/
> +
> +#ifdef MR_TABLE_DEBUG
> +bool MR_saved_tabledebug;
> +#endif
Why is that a global variable, rather than
a static or local variable?
> @@ -203,6 +215,7 @@
> char *line;
> MR_Next res;
> MR_Event_Details event_details;
> + bool saved_tabledebug;
Hmm, here you are using a local variable with a very
similar name... that is rather confusing.
> @@ -289,6 +312,10 @@
> if (! MR_trace_internal_initialized) {
> char *env;
> int n;
> +#ifdef MR_TABLE_DEBUG
> + MR_saved_tabledebug = MR_tabledebug;
> + MR_tabledebug = FALSE;
> +#endif
Hmm, that appears to be the only use of `MR_saved_tabledebug':
you assign to it, but as far as I can tell it is never referenced.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- 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