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

Simon Taylor stayl at cs.mu.OZ.AU
Tue Feb 19 01:12:03 AEDT 2002


On 18-Feb-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 18-Feb-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > 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.
> 
> Separate change.

MR_Bool isn't used anywhere so I'll remove it.

Simon.



Estimated hours taken: 0.2

runtime/mercury_bootstrap.h:
runtime/mercury_types.h:
	Move the definition of MR_Bool (which is the C representation
	of bool__bool) into mercury_bootstrap.h. It's not used anywhere,
	and it probably doesn't make sense to use it (bool__bool is an
	ordinary enumeration type, not a builtin, so its representation
	type shouldn't have a special name in the runtime).

Index: mercury_bootstrap.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_bootstrap.h,v
retrieving revision 1.24
diff -u -u -r1.24 mercury_bootstrap.h
--- mercury_bootstrap.h	18 Feb 2002 07:01:13 -0000	1.24
+++ mercury_bootstrap.h	18 Feb 2002 14:05:59 -0000
@@ -84,7 +84,12 @@
 typedef MR_UnsignedChar 	UnsignedChar;
 typedef MR_String 		String;
 typedef MR_ConstString 		ConstString;
-typedef MR_Bool 		Bool;
+/*
+** MR_Bool is the C representation for the Mercury type bool__bool.
+** For ordinary booleans, use MR_bool in mercury_std.h.
+*/
+typedef MR_intptr_t		MR_Bool;
+typedef MR_Bool			Bool;
 
 /*
 ** The list manipulation macros are available for use by ordinary Mercury
Index: mercury_types.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_types.h,v
retrieving revision 1.27
diff -u -u -r1.27 mercury_types.h
--- mercury_types.h	18 Feb 2002 07:01:23 -0000	1.27
+++ mercury_types.h	18 Feb 2002 07:20:08 -0000
@@ -57,11 +57,6 @@
 typedef	MR_uintptr_t		MR_Word;
 typedef	MR_intptr_t		MR_Integer;
 typedef	MR_uintptr_t		MR_Unsigned;
-/*
-** MR_Bool is the C representation for the Mercury type bool__bool.
-** For ordinary booleans, use MR_bool in mercury_std.h.
-*/
-typedef	MR_intptr_t		MR_Bool;
 
 /*
 ** Convert a size in bytes to a size in words, rounding up if necessary.
--------------------------------------------------------------------------
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