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

Julien Fischer juliensf at cs.mu.OZ.AU
Fri May 20 13:01:15 AEST 2005


On Fri, 20 May 2005, Zoltan Somogyi wrote:

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

> 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.)
>
> Mmake.workspace:
> 	Comment out the additions of search paths to CFLAGS.
>
> */Mmakefile:
> 	Delete the additions of search paths to CFLAGS.
>
> */.mgnuc_copts:
> 	New files containing the directory-specific search paths, and in some
> 	cases the required macro definitions. These replace what was taken out
> 	of Mmake.workspace and */Mmakefile. In some cases, the old search paths
> 	included inappropriate directories; the .mgnuc_copt files don't.
>
> tests/.mgnuc_copts.ws:
> 	New files containing the directory-specific search paths; bootcheck
> 	makes tests/.mgnuc_copts from it.
>
> tools/bootcheck:
> 	Copy the various .mgnuc_copts files from the stage1 to stages 2 and 3.
> 	They aren't needed in stage3 right now, but that may change.
>
> 	Create tests/.mgnuc_copts.
>
> browser/util.m:
> 	Delete an unused and inappropriate #include.
>
> scripts/Mmake.rules:
> 	Use a single invocation of mkdir -p to create all subdirectories
> 	needed by Java. Update a piece of documentation.
>
> scripts/Mmakefile:
> 	Reorganize the process of invoking config.status to avoid invoking
> 	it on inappropriate files, and to ensure the right permissions
> 	on the files it is invoked on.
>
> scripts/prepare_tmp_dir_grade_part:
> 	Copy the .mgnuc_copts files when populating tmp_dir.
>

I that you should document the .mgnuc_copts files somwhere,
in mgnuc --help for example.  Otherwise that looks fine.

...

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

This is part of another change you posted.

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