[m-rev.] diff: simplify table_io_copy_io_state
Fergus Henderson
fjh at cs.mu.OZ.AU
Sun Oct 20 21:45:50 AEST 2002
Estimated hours taken: 0.5
Branches: main
library/table_builtin.m:
Simplify the code for table_io_copy_io_state. As well as making
the code more portable, easier to maintain and potentially more
efficient, this change also avoids a determinism warning for
targets such as IL that don't support the C interface.
Workspace: /home/ceres/fjh/mercury
Index: library/table_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/table_builtin.m,v
retrieving revision 1.22
diff -u -d -r1.22 table_builtin.m
--- library/table_builtin.m 12 Sep 2002 10:00:51 -0000 1.22
+++ library/table_builtin.m 20 Oct 2002 11:42:17 -0000
@@ -572,11 +572,7 @@
SUCCESS_INDICATOR = (table->MR_answerblock != NULL);
").
-:- pragma foreign_proc("C", table_io_copy_io_state(S0::di, S::uo),
- [will_not_call_mercury, promise_pure],
-"
- S = S0;
-").
+table_io_copy_io_state(IO, IO).
:- pragma foreign_proc("C",
table_io_left_bracket_unitized_goal(TraceEnabled::out),
@@ -606,11 +602,6 @@
% matching foreign_proc version.
impure private_builtin__imp,
private_builtin__sorry("table_io_has_occurred").
-
-table_io_copy_io_state(_, _) :-
- % This version is only used for back-ends for which there is no
- % matching foreign_proc version.
- private_builtin__sorry("table_io_copy_io_state").
%-----------------------------------------------------------------------------%
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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