[m-dev.] for review: cleanup of mercury_stack_layout.h

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Jul 9 03:10:23 AEST 1998


On 08-Jul-1998, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> 
> runtime/mercury_stack_layout.h:
> 	Reorder the components of this file into a sequence of submodules,
> 	with each submodule containing the definition of a type and all
> 	the macros that operate on that type. This should remind people
> 	that updating a type without updating the macros is not a good idea.

I have a couple of comments about this change:

> Index: runtime/mercury_stack_layout.h
> -/*
> -** Definitions for MR_PredFunc
> -*/
> +/* MR_PredFunc ----------------------------------------------------------- */

This is a commenting style that is not used elsewhere.
Other places that break things into different sections (e.g. mercury_regs.h)
use the following style:

	/*-------------------------------------------------------------------*/
	/*
	** The section heading goes here
	*/

	... other stuff goes here (with a blank line before to separate it) ...

Similarly, our Mercury code uses the convention

	%---------------------------------------------------------------------%
	%
	% The section heading goes here
	%

	... other stuff goes here (with a blank line before to separate it) ...

and our shell scripts and Mmake files also use a similar convention
(with `#' rather than `*').

I'd rather we keep the style consistent.
So how about changing that from

	/* MR_PredFunc --------------------------------------------------- */

to

	/*-------------------------------------------------------------------*/
	/*
	** Definitions for MR_PredFunc
	*/

?

> +#ifdef	MR_LABEL_STRUCTS_INCLUDE_NUMBER

This macro should be documented in runtime/mercury_conf_param.h.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list