[m-rev.] diff: Implement some procedures in private_builtin.m in C#.
Peter Ross
pro at missioncriticalit.com
Thu Nov 13 23:58:48 AEDT 2003
Hi,
===================================================================
Estimated hours taken: 1
Branches: main
library/private_builtin.m:
Implement the trail procedures in C#.
Implement the heap reclamation on failure procedures in C#.
Index: private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.126
diff -u -r1.126 private_builtin.m
--- private_builtin.m 7 Nov 2003 16:51:35 -0000 1.126
+++ private_builtin.m 13 Nov 2003 12:56:35 -0000
@@ -774,86 +774,86 @@
#endif
").
-:- pragma foreign_proc("MC++",
+:- pragma foreign_proc("C#",
store_ticket(Ticket::out),
[will_not_call_mercury, thread_safe],
"
-#ifdef MR_USE_TRAIL
- mercury::runtime::Errors::SORRY(S""foreign code for this function"");
+#if MR_USE_TRAIL
+ mercury.runtime.Errors.SORRY(""foreign code for this function"");
// MR_store_ticket(Ticket);
#else
- Ticket = 0;
+ Ticket = null;
#endif
").
-:- pragma foreign_proc("MC++",
+:- pragma foreign_proc("C#",
reset_ticket_undo(Ticket::in),
[will_not_call_mercury, thread_safe],
"
-#ifdef MR_USE_TRAIL
- mercury::runtime::Errors::SORRY(S""foreign code for this function"");
+#if MR_USE_TRAIL
+ mercury.runtime.Errors.SORRY(""foreign code for this function"");
// MR_reset_ticket(Ticket, MR_undo);
#endif
").
-:- pragma foreign_proc("MC++",
+:- pragma foreign_proc("C#",
reset_ticket_commit(Ticket::in),
[will_not_call_mercury, thread_safe],
"
-#ifdef MR_USE_TRAIL
- mercury::runtime::Errors::SORRY(S""foreign code for this function"");
+#if MR_USE_TRAIL
+ mercury.runtime.Errors.SORRY(""foreign code for this function"");
// MR_reset_ticket(Ticket, MR_commit);
#endif
").
-:- pragma foreign_proc("MC++",
+:- pragma foreign_proc("C#",
reset_ticket_solve(Ticket::in),
[will_not_call_mercury, thread_safe],
"
-#ifdef MR_USE_TRAIL
- mercury::runtime::Errors::SORRY(S""foreign code for this function"");
+#if MR_USE_TRAIL
+ mercury.runtime.Errors.SORRY(""foreign code for this function"");
// MR_reset_ticket(Ticket, MR_solve);
#endif
").
-:- pragma foreign_proc("MC++",
+:- pragma foreign_proc("C#",
discard_ticket,
[will_not_call_mercury, thread_safe],
"
-#ifdef MR_USE_TRAIL
- mercury::runtime::Errors::SORRY(S""foreign code for this function"");
+#if MR_USE_TRAIL
+ mercury.runtime.Errors.SORRY(""foreign code for this function"");
// MR_discard_ticket();
#endif
").
-:- pragma foreign_proc("MC++",
+:- pragma foreign_proc("C#",
prune_ticket,
[will_not_call_mercury, thread_safe],
"
-#ifdef MR_USE_TRAIL
- mercury::runtime::Errors::SORRY(S""foreign code for this function"");
+#if MR_USE_TRAIL
+ mercury.runtime.Errors.SORRY(""foreign code for this function"");
// MR_prune_ticket();
#endif
").
-:- pragma foreign_proc("MC++",
+:- pragma foreign_proc("C#",
mark_ticket_stack(TicketCounter::out),
[will_not_call_mercury, thread_safe],
"
-#ifdef MR_USE_TRAIL
- mercury::runtime::Errors::SORRY(S""foreign code for this function"");
+#if MR_USE_TRAIL
+ mercury.runtime.Errors.SORRY(""foreign code for this function"");
// MR_mark_ticket_stack(TicketCounter);
#else
- TicketCounter = 0;
+ TicketCounter = null;
#endif
").
-:- pragma foreign_proc("MC++",
+:- pragma foreign_proc("C#",
prune_tickets_to(TicketCounter::in),
[will_not_call_mercury, thread_safe],
"
-#ifdef MR_USE_TRAIL
- mercury::runtime::Errors::SORRY(S""foreign code for this function"");
+#if MR_USE_TRAIL
+ mercury.runtime.Errors.SORRY(""foreign code for this function"");
// MR_prune_tickets_to(TicketCounter);
#endif
").
@@ -991,15 +991,15 @@
#endif
").
-:- pragma foreign_proc("MC++",
+:- pragma foreign_proc("C#",
mark_hp(SavedHeapPointer::out),
[will_not_call_mercury, thread_safe],
"
/* We can't do heap reclamation on failure in the .NET back-end. */
- SavedHeapPointer = 0;
+ SavedHeapPointer = null;
").
-:- pragma foreign_proc("MC++",
+:- pragma foreign_proc("C#",
restore_hp(_SavedHeapPointer::in),
[will_not_call_mercury, thread_safe],
"
--
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