[m-rev.] for review: allow lists in terms in breakpoint conditions

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Jun 13 18:15:48 AEST 2007


On Tue, 12 Jun 2007, Zoltan Somogyi wrote:

> Provide support for list syntax and quoted function symbols in the terms
> that appear in breakpoint conditions.
>
> runtime/mercury_trace_term.[ch]:
> 	Provide the new capability when creating terms from strings.
>
> 	Since with nonempty lists, the function symbol of the created term
> 	("[|]") does not appear in the original string, do not try to reuse
> 	the memory of the string for the memory of the function symbols;
> 	instead, make a copy of each function symbol as needed. This also
> 	makes the code simpler by avoiding the need to mangle the original
> 	string to null-terminate these function symbols.
>
> 	Add a mechanism for reporting the location and nature of syntax errors.
>
> 	Don't assume that the initial string has no spaces.
>
> trace/mercury_trace_spy.[ch]:
> 	Don't record the strings from which the terms in breakpoint conditions
> 	came from, since function symbols' memory no longer comes from there,
> 	and thus we don't have to free them when the breakpoint is deleted.
>
> trace/mercury_trace_cmd_breakpoint.c:
> 	Use the new mechanism for reporting the details of syntax errors in
> 	terms.
>
> 	Include spaces in the string from which terms are constructed
> 	at the points at which the user included spaces, since the absence
> 	of such spaces in any reports of syntax errors would be surprising.
>
> 	Delete the temporary memory for strings containing terms as soon
> 	as they has been used to construct their terms.

s/has/have/

>
> trace/mercury_trace_internal.c:
> 	Document a problem.
>
> trace/Mmakefile:
> 	Rebuild this directory automatically if a few more headers in the
> 	runtime change.
>
> doc/user_guide.texi:
> 	Document the new capability.

Test case?

...

That looks okay.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list