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

Ian MacLarty maclarty at cs.mu.OZ.AU
Wed Nov 24 15:58:33 AEDT 2004


On 24 Nov 2004, at 15:29, Julien Fischer wrote:

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

It doesn't seem to be used anywhere else besides in  
extras/graphics/{mercury_opengl,mercury_glut}, however I'd feel  
uncomfortable just removing it as other software written in Mercury may  
use it.

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

Only TRUE and FALSE are defined there as aliases for MR_TRUE and  
MR_FALSE, so I don't think a comment is necessary.

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

>>   
>> #--------------------------------------------------------------------- 
>> --------#
>>
>> 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.
Fixed.

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