[m-dev.] for review: cleanup of part of the runtime

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Apr 19 20:32:34 AEST 1999


On 16-Apr-1999, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> 
> Prefix everything defined in runtime/mercury_{stacks,tags}.h MR_.
> In the process, get rid of the grade component MR_DEBUG_NONDET_STACK,
> since this makes the update to mercury_stacks.h simpler and its use is
> long obsolete (e.g. the grade handling stuff in handle_options.m doesn't
> know about it, nor do the grade handling script fragments).

The remarks in parentheses don't imply that MR_DEBUG_NONDET_STACK is obsolete.
There are two categories of grade components, which for want of a better
name I will call first class and second class grade components.
The evidence you mention just implies that MR_DEBUG_NONDET_STACK is a
second class grade component, not that it is obsolete.

First class grade components are ones for knobs that we expect users
might wish to twiddle.  They can be specified as part of the `--grade'
option or GRADE mmake variable, and (as a more human-readable alternative)
they also have corresponding options which can be used in GRADEFLAGS.

Second class grade components, on the other hand, are knobs which
affect binary compatibility but which we expect only Mercury developers
will want to twiddle.  For these, there may be no corresponding option.
Those which do have corresponding mmc options are documented in
the Mercury User's Guide with "(Not for general use.)".  Those
for which an mmc option is not needed are documented only in
runtime/mercury_conf_param.h.  Examples of second class grade
components include MR_DEBUG_NONDET_STACK, --args {simple, compact}, etc.

Anyway, I don't particularly mind if you remove MR_DEBUG_NONDET_STACK,
because I agree that it is not very useful these days, since we've already
debugged the nondet stack manipulation code.  But the log message
is misleading, and so I think the log message should be changed.

> runtime/mercury_bootstrap.h:
> 	Add backward compability macros for the old names in the above two
> 	files.

s/compability/compatability/

The list manipulation macros (list_cons() etc.) are documented in the
C interface section of the Mercury Language Reference Manual,
so if you change those then you should update that documentation.
Also the old versions of those macros should be preserved for longer
than the old versions of other macros -- you should add a comment
about that to the definitions of the old versions in mercury_bootstrap.h.

> Index: runtime/mercury_bootstrap.h
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/runtime/mercury_bootstrap.h,v
> retrieving revision 1.5
> diff -u -b -u -r1.5 mercury_bootstrap.h
> --- mercury_bootstrap.h	1999/03/22 08:09:01	1.5
> +++ mercury_bootstrap.h	1999/04/05 12:48:53
> @@ -15,7 +15,7 @@
>  #ifndef	MERCURY_BOOTSTRAP_H
>  #define	MERCURY_BOOTSTRAP_H
>  
> +#ifndef	MERCURY_NO_BOOTSTRAP

That macro is a very good idea.  But I think that MR_NO_BACKWARDS_COMPAT
would be a better name.  Since it's a new configuration macro,
it should be documented in runtime/mercury_conf_param.h.
Also, you should mention it in the log message.

Otherwise, that looks fine.  But I would like to see another (relative)
diff before you commit this one.

Cheers,
	Fergus.

-- 
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list