[m-rev.] for review: module to read trace counts

Ralph Becket rafe at cs.mu.OZ.AU
Tue Jan 11 14:49:38 AEDT 2005


Peter Wang, Tuesday, 11 January 2005:
> For review by anyone.
> 
> Estimated hours taken: 10
> 
> This adds a module libs__trace_counts that reads in the .mercury_trace_counts
> files produced by the compiler's trace mechanism.  The format of said files
> was slightly changed.
> 
> compiler/trace_counts.m:
> 	New module.
> 
> compiler/libs.m:
> 	Add trace_counts to the libs module.
> 
> runtime/mercury_trace_base.c:
> 	In the format of .mercury_trace_counts, write module and predicate
> 	names using quoted atom syntax so that names with spaces and
> 	non-printable characters can be machine-parsed.

s/using/now use/

> Index: compiler/trace_counts.m
> ===================================================================
[...]
> +
> +read_trace_counts(FileName, MaybeTraceCounts, !IO) :-
> +        io__open_input(FileName, Result, !IO),
> +        (
> +		Result = ok(FileStream),
> +                io__set_input_stream(FileStream, OldInputStream, !IO),
> +		promise_only_solution_io(read_trace_counts_2, MaybeTraceCounts,
> +			!IO),
> +                io__set_input_stream(OldInputStream, _, !IO),
> +                io__close_input(FileStream, !IO)
> +        ;
> +		Result = error(_),
> +		MaybeTraceCounts = no
> +	).

The indentation of the io__... calls is odd.  This may be an artifact of
you mixing tabs and spaces for indentation in this file.  If you're
using vim, `:retab' will make the entire file consistent in this regard.

Otherwise that looks fine.

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