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

Simon Taylor stayl at cs.mu.OZ.AU
Mon Jan 10 10:24:48 AEDT 2000



Estimated hours taken: 0.1

library/private_builtin:
	Add `free_heap/1', for use by compile-time garbage collection.


Index: private_builtin.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/private_builtin.m,v
retrieving revision 1.36
diff -u -u -r1.36 private_builtin.m
--- private_builtin.m	2000/01/03 08:53:00	1.36
+++ private_builtin.m	2000/01/09 02:49:24
@@ -31,6 +31,17 @@
 
 :- interface.
 
+	% free_heap/1 is used internally by the compiler to implement
+	% compile-time garbage collection. Don't use it in programs.
+	% 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).
+
+%-----------------------------------------------------------------------------%
+
 	% This section of the module contains predicates that are used
 	% by the compiler, to implement polymorphism. These predicates
 	% should not be used by user programs directly.
--------------------------------------------------------------------------
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