[m-rev.] For review: Fix seg fault bug in declarative debugger.

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Nov 24 15:29:01 AEDT 2004


On Wed, 24 Nov 2004, Ian MacLarty wrote:

> > > > Are MR_TRUE and MR_FALSE always going to be the same as yes and no?
> > >
> > > The original reason why we used ML_bool_return_{yes,no} instead of constants
> > > was the .rt grade, which we don't support anymore.
> >
A general question: is there any point in keeping ML_bool_return{yes, no}
then?

> I added the following comments to runtime/mercury_std.h and library/bool.m:
>
> Index: library/bool.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/library/bool.m,v
> retrieving revision 1.9
> diff -u -r1.9 bool.m
> --- library/bool.m	22 May 2003 03:54:39 -0000	1.9
> +++ library/bool.m	24 Nov 2004 03:16:23 -0000
> @@ -58,6 +58,12 @@
>
>  :- implementation.
>
> +%
> +% Important:
> +% The representation of bool values should correspond with the definitions of
> +% MR_TRUE and MR_FALSE in runtime/mercury_std.h.
> +%
> +
They are also defined in runtime/mercury_bootstrap.h as well.  You should
mention that as well.

> Index: runtime/mercury_std.h
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/runtime/mercury_std.h,v
> retrieving revision 1.28
> diff -u -r1.28 mercury_std.h
> --- runtime/mercury_std.h	24 May 2004 04:32:49 -0000	1.28
> +++ runtime/mercury_std.h	24 Nov 2004 03:07:44 -0000
> @@ -49,8 +49,17 @@
>  typedef	int		MR_bool;
>  typedef	char		MR_small_bool;
>
> +** arguments of exported Mercury procs.
> +*/
> +
I'd reword that first sentence as:

	The values of MR_TRUE and MR_FALSE should correspond with the
	representation of the standard library type bool.bool, so ....

>  #-----------------------------------------------------------------------------#
>
> I also added the following CVS log entries:
>
> library/bool.m
> 	Add comment noting that the representation of bool values should
> 	correspond to definitions given in runtime/mercury_std.h
>
> runtime/mercury_std.h
> 	Add comment noting that MR_TRUE and MR_FALSE should correspond
> 	with the representation of Mercury bools.
>
> tests/debugger/declaratibe/Mmakefile
> 	Report output if the command to build the .out file fails.
>

s/declartibe/declartive/ there.

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