[m-dev.] diff: more trailing changes

Fergus Henderson fjh at cs.mu.oz.au
Sun Aug 24 11:32:51 AEST 1997


Fergus Henderson, you wrote:
> Hi,
> 
> Peter Schachte, can you please review this one?
> 
> Change the generated code for trailing to match the new trailing interface.

And this one:

runtime/mercury_trail.h:
	Change the trailing interface to match the new generated code for
	trailing.

Index: mercury_trail.h
===================================================================
RCS file: /home/staff/zs/imp/mercury/runtime/mercury_trail.h,v
retrieving revision 1.1
diff -u -u -r1.1 mercury_trail.h
--- mercury_trail.h	1997/08/23 22:34:04	1.1
+++ mercury_trail.h	1997/08/24 01:22:19
@@ -47,10 +47,10 @@
 	} while(0)
 
 	  /*
-	  ** Unwind restoration info back to old.  `kind' indicates
+	  ** Unwind restoration info back to `old'.  `kind' indicates
 	  ** whether we are restoring or just discarding the info.
 	  */
-#define MR_discard_ticket_because(old, kind)			\
+#define MR_reset_ticket(old, kind)				\
 	do {							\
 		MR_TrailEntry *old_trail_ptr =  		\
 			(MR_TrailEntry *)old;			\
@@ -59,18 +59,12 @@
 			MR_untrail_to(old_trail_ptr, kind);	\
 			restore_transient_registers();		\
 		}						\
-		--MR_ticket_counter;				\
 	} while(0)
 
-
-	/* restore to the state back to old and discard restoration info */
-#define MR_restore_and_discard_ticket(old)	\
-	MR_discard_ticket_because(old, MR_undo)
-
-	/* discard restoration info back to old */
-#define MR_discard_ticket(old) \
-	MR_discard_ticket_because(old, MR_commit)
-
+#define MR_discard_ticket()					\
+	do {							\
+		--MR_ticket_counter;				\
+	} 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.



More information about the developers mailing list