[m-dev.] for review: bugfix for gc.m

Thomas Conway conway at cs.mu.OZ.AU
Wed Jan 24 13:14:01 AEDT 2001


Hi

Here's a fix for a little bug that deep profiling provoked.

-- 
  Thomas Conway )O+
 <conway at cs.mu.oz.au>       499 User error! Replace user, and press any key.

library/gc.m:
	Make the garbage_collect/0 predicate use may_call_mercury
	rather than will_not_call_mercury.
	This fixes a bug where if the code gets transformed
	to be part of a larger goal (as it does with deep profiling),
	then live registers get clobbered.

Index: gc.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/gc.m,v
retrieving revision 1.3
diff -u -r1.3 gc.m
--- gc.m	2001/01/01 04:03:50	1.3
+++ gc.m	2001/01/24 02:10:06
@@ -38,7 +38,7 @@
 
 :- pragma no_inline(garbage_collect/0).
 
-:- pragma foreign_code("C", garbage_collect, [will_not_call_mercury], "
+:- pragma foreign_code("C", garbage_collect, [may_call_mercury], "
 #ifdef CONSERVATIVE_GC
   #ifndef MR_HIGHLEVEL_CODE
 	/* clear out the stacks and registers before garbage collecting */
--------------------------------------------------------------------------
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