[m-dev.] trivial diff: add MR_ prefixes in runtime/mercury_context.h

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Oct 27 15:17:35 AEST 1999


Estimated hours taken: 0.25

runtime/mercury_context.h:
	Add missing `MR_' prefixes.

Workspace: /home/mercury0/fjh/mercury
Index: runtime/mercury_context.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_context.h,v
retrieving revision 1.11
diff -u -d -r1.11 mercury_context.h
--- mercury_context.h	1999/08/27 00:42:52	1.11
+++ mercury_context.h	1999/10/27 05:15:53
@@ -42,7 +42,7 @@
 #ifndef MERCURY_CONTEXT_H
 #define MERCURY_CONTEXT_H
 
-#include "mercury_regs.h"		/* for hp. Must come before
+#include "mercury_regs.h"		/* for MR_hp, etc. Must come before
 					   system headers. */
 
 #include <stdio.h>
@@ -130,7 +130,7 @@
 		/* saved hp for this context */
 	Word		*min_hp_rec;
 		/*
-		** this pointer marks the minimum value of hp to which we can
+		** this pointer marks the minimum value of MR_hp to which we can
 		** truncate the heap on backtracking. See comments before the
 		** set_min_heap_reclamation_point macro (below).
 		*/
@@ -267,26 +267,26 @@
 
   /*
   ** To figure out the maximum amount of heap we can reclaim on backtracking,
-  ** we compare hp with the context_hp.
+  ** we compare MR_hp with the context_hp.
   **
   ** If context_hp == NULL then this is the first time this context has been
   ** scheduled, so the furthest back down the heap we can reclaim is to the
-  ** current value of hp. 
+  ** current value of MR_hp. 
   **
-  ** If hp > context_hp, another context has allocated data on the heap since
-  ** we were last scheduled, so the furthest back that we can reclaim is to
-  ** the current value of hp, so we set MR_min_hp_rec and the
+  ** If MR_hp > context_hp, another context has allocated data on the heap
+  ** since we were last scheduled, so the furthest back that we can reclaim is
+  ** to the current value of MR_hp, so we set MR_min_hp_rec and the
   ** field of the same name in our context structure.
   **
-  ** If hp < context_hp, then another context has truncated the heap on failure.
-  ** For this to happen, it must be the case that last time we were scheduled,
+  ** If MR_hp < context_hp, then another context has truncated the heap on
+  ** failure. For this to happen, it must be the case that last time we were
   ** that other context was the last one to allocate data on the heap, and we
-  ** did not allocate any heap during that period of execution. That being the
-  ** case, the furthest back to which we can reset the heap is to the current
-  ** value of hp. This is a conservative approximation - it is possible that
-  ** the current value of hp is the same as some previous value that we held,
-  ** and we are now contiguous with our older data, so this algorithm will lead
-  ** to holes in the heap, though GC will reclaim these.
+  ** scheduled, did not allocate any heap during that period of execution.
+  ** That being the case, the furthest back to which we can reset the heap is
+  ** to the current value of hp. This is a conservative approximation - it is
+  ** possible that the current value of hp is the same as some previous value
+  ** that we held, and we are now contiguous with our older data, so this
+  ** algorithm will lead to holes in the heap, though GC will reclaim these.
   **
   ** If hp == context_hp then no other process has allocated any heap since we
   ** were last scheduled, so we can proceed as if we had not stopped, and the
@@ -294,11 +294,11 @@
   ** were executing.
   */
   #define set_min_heap_reclamation_point(ctxt)	do {		\
-		if (hp != (ctxt)->context_hp 			\
+		if (MR_hp != (ctxt)->context_hp 		\
 			|| (ctxt)->context_hp == NULL)		\
 		{						\
-			MR_min_hp_rec = hp;			\
-			(ctxt)->min_hp_rec = hp;		\
+			MR_min_hp_rec = MR_hp;			\
+			(ctxt)->min_hp_rec = MR_hp;		\
 		}						\
 		else						\
 		{						\
@@ -308,7 +308,7 @@
 
   #define save_hp_in_context(ctxt)				\
   	do {							\
-		(ctxt)->context_hp = hp;			\
+		(ctxt)->context_hp = MR_hp;			\
 		(ctxt)->min_hp_rec = MR_min_hp_rec;		\
 	} while (0)
 

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