[mercury-users] Exceptions and unique modes

Ralph Becket rbeck at microsoft.com
Thu Feb 22 22:45:32 AEDT 2001


>From Peter Ross on 22/02/2001 11:41:32
> > 
> You would think that the best canditate for reuse of that memory is the
> next state.  Unfortunately it is not quite that easy as the following
> type indicates.
> 
> :- type t
>     --->    f(int)
>     ;       g(int, int).
> 
> No matter what you initialise this type to you need to make sure that
> you allocate 2 words so that you can possibly hold the g constructor at
> some later date.

I don't think di/uo guarantees structure reuse, just that SR may happen,
in which case you have to take the conservative line.  It would certainly
be good if the compiler did perform this optimization for unique objects,
though.

--
Ralph Becket      |      MSR Cambridge      |      rbeck at microsoft.com 

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list