[m-dev.] Re: for review: add MR_ to Word, Integer, String, etc...

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Aug 1 15:24:06 AEST 2000


> Index: runtime/mercury.h
>  /*
> -** The following types are used to represent the Mercury builtin types.
> -** See mercury_types.h and mercury_float.h.
> -*/
> -typedef Char	MR_Char;
> -typedef Float	MR_Float;
> -typedef Integer	MR_Integer;
> -typedef String	MR_String;
> -typedef ConstString MR_ConstString;

I think it would be nicer to change that to a comment:

	/*
	** The types uses to represent the Mercury builtin types,
	** MR_Char, MR_Float, MR_Integer, MR_String, and MR_ConstString,
	** are defined in mercury_types.h and mercury_float.h.
	*/

>  /*
> -** With the low-level data representation, the MR_Word type
> -** is used for representing user-defined types.
> -*/
> -typedef Word	MR_Word;

Likewise here I think the comment should stay,
perhaps modified slightly, e.g. to

  /*
  ** With the low-level data representation, the MR_Word type,
  ** which is defined in runtime/mercury_types.h,
  ** is used for representing user-defined types.
  */

or (to match the previous one)

  /*
  ** The MR_Word type, which is used for representing user-defined
  ** types when we're using the low-level data representation,
  ** is defined in runtime/mercury_types.h.
  */

Currently runtime/mercury.h is quite self-contained,
which makes for an easy introduction to the runtime
support needed by the MLDS back-end.  Deleting comments
like this would IMHO make it harder for someone to understand
the MLDS back-end.

> -/*
> -** The MR_Box type is used for representing polymorphic types.
> -*/
> -typedef void 	*MR_Box;

Why was this removed from runtime/mercury.h?

>  
>  /*
> -** Code to box/unbox floats
> +** MR_Code to box/unbox floats

That was a false hit.  It should be "Code", not "MR_Code".

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