[m-rev.] diff: implement the trail procedures in C#.

Peter Ross pro at missioncriticalit.com
Thu Nov 13 23:39:43 AEDT 2003


Hi,


===================================================================


Estimated hours taken: 1
Branches: main

library/std_util.m:
	Implement the trail procedures in C#.


Index: std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.287
diff -u -r1.287 std_util.m
--- std_util.m	13 Nov 2003 12:26:51 -0000	1.287
+++ std_util.m	13 Nov 2003 12:34:15 -0000
@@ -1029,21 +1029,22 @@
 #endif
 ").
 
-:- pragma foreign_proc("MC++", 
+:- pragma foreign_proc("C#", 
 	get_registers(HeapPtr::out, SolutionsHeapPtr::out, TrailPtr::out),
 	[will_not_call_mercury, thread_safe],
 "
 	/*
-	** For MC++, we always use the MS garbage collector,
+	** For .NET we always use the MS garbage collector,
 	** so we don't have to worry here about heap reclamation on failure.
 	*/
-	HeapPtr = SolutionsHeapPtr = 0;
+	HeapPtr = null;
+	SolutionsHeapPtr = null;
 
-#ifdef MR_USE_TRAIL
+#if MR_USE_TRAIL
 	/* XXX trailing not yet implemented for the MLDS back-end */
-	mercury::runtime::Errors::SORRY(S""foreign code for get_registers"");
+	mercury.runtime.Errors.SORRY(""foreign code for get_registers"");
 #else
-	TrailPtr = 0;
+	TrailPtr = null;
 #endif
 ").
 
@@ -1059,13 +1060,13 @@
 #endif
 ").
 
-:- pragma foreign_proc("MC++", 
+:- pragma foreign_proc("C#", 
 	check_for_floundering(_TrailPtr::in),
 	[will_not_call_mercury, thread_safe],
 "
-#ifdef MR_USE_TRAIL
-	mercury::runtime::Errors::SORRY(
-		S""foreign code for check_for_floundering"");
+#if MR_USE_TRAIL
+	mercury.runtime.Errors.SORRY(
+		""foreign code for check_for_floundering"");
 #endif
 ").
 
@@ -1083,13 +1084,13 @@
 #endif
 ").
 
-:- pragma foreign_proc("MC++", 
+:- pragma foreign_proc("C#", 
 	discard_trail_ticket,
 	[will_not_call_mercury, thread_safe],
 "
-#ifdef MR_USE_TRAIL
-	mercury::runtime::Errors::SORRY(
-		S""foreign code for discard_trail_ticket"");
+#if MR_USE_TRAIL
+	mercury.runtime.Errors.SORRY(
+		""foreign code for discard_trail_ticket"");
 #endif
 ").
 


-- 
Peter Ross		
Software Engineer                                (Work)   +32 2 757 10 15
Mission Critical                                 (Mobile) +32 485 482 559
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list