[m-dev.] diff: add `private_builtin:free_heap/1'

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jan 11 10:52:34 AEDT 2000


On 10-Jan-2000, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:

> +	% The `di' mode on the argument is a lie - it only clobbers the
> +	% top-level cell. This is handled correctly by
> +	% mode_util__recompute_instmap_delta.
> +:- pred free_heap(_T).
> +:- mode free_heap(di) is det.
> +:- external(free_heap/1).

The `di' mode is not a lie.  It's just overly conservative.
There's no requirement that a procedure with mode `di'
actually clobber its argument.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list