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

Peter Ross peter.ross at miscrit.be
Fri Mar 30 19:08:25 AEST 2001

On Fri, Mar 30, 2001 at 05:54:32PM +1000, Fergus Henderson wrote:
> 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'...
You can declare that the two cells are aliased, as part of the pragma c
code.  Nancy will this alias be ignored, because it involves floats.

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