[m-rev.] for review: invisible mgnuc options

Ralph Becket rafe at cs.mu.OZ.AU
Fri May 20 12:53:49 AEST 2005


Zoltan Somogyi, Friday, 20 May 2005:
> For review by anyone.
> 
> Zoltan
> 
> Reduce the amount of clutter on mgnuc command lines by moving arguments that
> are always the same for a given directory into a file that is always consulted
> by mgnuc in the current directory.

Sounds good.

> scripts/mgnuc.in:
> 	Always include as C compiler arguments the contents of a file named
> 	.mgnuc_copts in the current directory, if it exists. (It is named
> 	.mgnuc_copts instead of .mgnuc_opts because it may not contain
> 	general mgnuc options, such as --no-mercury-stdlib-dir.)

What's the advantage in making this opts file "invisible".  Our other
configuration files start with `Mercury.'.  I think it would be better
to use `Mercury.mgnuc_c_opts' rather than `.mgnuc_copts'.

> Index: library/io.m
> ===================================================================
> RCS file: /home/mercury/mercury1/repository/mercury/library/io.m,v
> retrieving revision 1.329
> diff -u -r1.329 io.m
> --- library/io.m	18 May 2005 05:25:58 -0000	1.329
> +++ library/io.m	20 May 2005 00:22:20 -0000
> @@ -3692,6 +3692,17 @@
>  #endif
>  ").
>  
> +	% Chunk_size gives the maximum number of recursive calls we want to
> +	% allow in the binary_input_stream_foldl*_inner predicates. Without
> +	% such a limit, the depth of recursion, which depends on the size of
> +	% the file they read, will cause exhaustion of the det stack in debug
> +	% grades, since there is no tail recursion in such grades.
> +	%
> +	% With this arrangement, the maximum number of stack frames needed
> +	% to process a file of size N is N/1000 + 1000, the former being the
> +	% number of frames of binary_input_stream_foldl*_chunk predicates,
> +	% the latter being the max number of frames of the *_inner predicates.
> +	%
>  :- func chunk_size = int.
>  
>  chunk_size = 1000.
> cvs diff: Diffing mdbcomp

Isn't this part of a separate change?

Apart from the file name, that looks good to me.

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