[m-dev.] for review: record trace level in the module layout structure

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Nov 9 22:53:27 AEDT 2000


On 09-Nov-2000, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> Record the trace level that the module was compiled with in the module
> layout structure.  Use this to avoid an abort if the 'dd' command is used
> on a module that is compiled with trace level 'deep'.

That change looks fine.
Just one small point:

...
> +++ trace/mercury_trace_declarative.c	2000/11/09 06:16:57
> @@ -115,10 +115,20 @@
>  
>  static	MR_Unsigned	MR_edt_max_depth;
>  static	MR_Unsigned	MR_edt_last_event;
> -static	bool		MR_edt_inside;
> +static	MR_Bool		MR_edt_inside;
>  static	MR_Unsigned	MR_edt_start_seqno;
>  
>  /*
> +** The declarative debugger ignores modules that were not compiled with
> +** the required information.  However, this may result in incorrect
> +** assumptions being made about the code, so the debugger gives a warning
> +** if this happens.  The following flag indicates whether a warning
> +** should be printed before calling the front end.
> +*/
> +
> +static	MR_Bool		MR_edt_compiler_flag_warning;

`MR_Bool' is not the right type to use for those two fields.
`MR_Bool' is a type which has the same representation as the
Mercury boolean type.  But this is C code, and so you should
use whatever boolean type we normally use in C code, i.e. `bool'.

Perhaps `MR_Bool' should be renamed `MR_Mercury_Bool' to make
this clearer.

The use of `bool' is against our normal naming convention, but we
decided to make an exception for that.  Perhaps that decision
should be changed.

But if those changes happen they should be separate changes.
So for this diff, please stick with the existing conventions
and use `bool' rather than `MR_bool'.

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