[m-rev.] for review: copy/2 implementation for il backend

Peter Ross pro at missioncriticalit.com
Wed Nov 27 00:44:13 AEDT 2002


One questioned that needs to be asked is how does this behave compared
to the implementation of MR_deep_copy on the C backend?

On the C backend MR_deep_copy only deep copies Mercury values.  If
you have any references to foreign types then only the reference to
their location will be copied.  However my implementation below will
copy the foreign type.  Is this the behaviour we want?

I think not, so how do we avoid it.  We could add a custom attribute to
every Mercury type indicating that it is a Mercury type and then only
copy those types which have this attribute.

This would avoid the problems where the foreign type could have circular
references.

Opinions?
--------------------------------------------------------------------------
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