[m-rev.] for review: data passing convention documentation

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Dec 6 19:24:03 AEDT 2001


On 03-Dec-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> doc/reference_manual.texi:
>     Reorganise the documentation about the data passing
>     conventions so that it is all located in one spot.

> Index: reference_manual.texi
...
> +* Data passing conventions::	       How Mercury types are represented
> +				       on the various backends.

s/represented on the various backends/passed to different languages/

> + at node Data passing conventions
> + at section Data passing conventions
> +
> +Each backend will have its own conventions for passing data.

s/backend/language/

> + at menu
> +* C backend	:: Data passing convention for the C backend.
> +* IL backend	:: Data passing convention for the IL backend.
> + at end menu

Get rid of all of the occurrences of "backend" here.

I suggesting something like this:

	* C data passing convention::
	* IL data passing convention::

> + at node C backend
> + at subsection C backend

Likewise.

> + at node IL backend
> + at subsection IL backend

Likewise.

> +The Mercury types @code{int}, @code{float}, @code{char},
> +and @code{string} are mapped to the Common Language Runtime types 
> + at code{System.Int32}, @code{System.Double}, @code{System.Char} and
> + at code{System.String} respectively.
> +
> +Mercury variables which are polymorphically typed (e.g. whose type is a 
> +type variables) will be passed as @code{System.Object} while all other
> +Mercury variables are passed as @code{System.Object[]}.
> +This mapping is subject to change and you should try to avoid writing
> +code that relies heavily upon a particular representation of Mercury
> +terms.

The documentation here should explain both the --high-level-data
and --no-high-level-data case, rather than assuming --no-high-level-data.

> @@ -6014,49 +6088,7 @@
>  @node Passing data to and from C
>  @section Passing data to and from C
>  
> +This section has moved to @pxref{C backend}.

Until the "Foreign language interfacing" chapter is ready for prime time,
I'd rather the pointers go in the other direction.  That is, the definitive
version should go in the "C interface" chapter and the C language sections of
the "Foreign language interfacing" chapter should have pointers to the
"C interface" chapter, rather than vice versa.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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