[m-rev.] for review: more namespace cleanliness changes

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Feb 18 12:38:40 AEDT 2002


On 16-Feb-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> 
> compiler/export.m:
> compiler/ml_code_gen.m:
> 	Use MR_bool rather than MR_Bool (I think MR_Bool is
> 	meant to be for references to the Mercury type
> 	bool__bool).

Your parenthetical remark here is correct.

It might be better to rename MR_Bool as MR_Mercury_Bool (as was done
with MR_Mercury_Type_Info), to avoid confusion between the two.

Also it would be good to add a comment at the definition of MR_Bool
explaining this.

> +++ runtime/mercury_std.h	15 Feb 2002 05:49:39 -0000
...
> +#define	MR_bool		char

It would be nicer to use a typedef rather than a #define.
(Previously the #define was needed to avoid conflicts,
but now that you've renamed it, there's no reason to not
use a typedef.)

> +/*
> +** XXX mercury_goto.h checks the value of MR_PIC, not whether
> +** it is defined, so this won't work if -DPIC=0 is passed
> +** on the command line. mmake/mercury_compile don't do that.
> +*/
> +#ifdef PIC
> +  #define MR_PIC 1
> +  #undef PIC
> +#endif

The XXX comment here raises the question: why not just use `#if PIC'
rather than `#ifdef PIC' here?  If PIC is not defined, then `#if PIC'
will expand to `#if 0'.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list