[m-rev.] [reuse] diff: no aliases between primitive types

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Mar 30 17:54:32 AEST 2001


On 30-Mar-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> I have been thinking about this, I think that for the MLDS backend we
> are safe.  However for the LLDS backend, we aren't.

Even for the MLDS back-end, where float arguments are passed unboxed,
there might be problems because floats in structures are boxed:

	:- type foo ---> f(float, float).
	:- pred nasty(foo::di, foo::uo) is det.
	:- pragma c_code(nasty(X::di, Y::uo), "...").

where the "..." is some code relying on the representation of `foo',
which destructively updates the memory used for `X'...

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  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