[m-rev.] diff: tests/hard_coded fixes for il grade

Peter Ross pro at missioncriticalit.com
Sat Nov 9 04:15:41 AEDT 2002


Hi,


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


Estimated hours taken: 0.5
Branches: main

Get the following tests working in the il grade.

tests/hard_coded/lp.m:
tests/hard_coded/c_write_string.m:
	Provide missing implementation of predicates.


Index: lp.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/lp.m,v
retrieving revision 1.2
diff -u -r1.2 lp.m
--- lp.m	18 Nov 2000 15:20:38 -0000	1.2
+++ lp.m	8 Nov 2002 17:14:32 -0000
@@ -369,6 +369,12 @@
 :- pred mkuniq(array(float)::in, array(float)::array_uo) is det.
 
 :- pragma c_code(mkuniq(A::in, B::array_uo), "B = A;").
+:- pragma foreign_proc(il, mkuniq(A::in, B::array_uo),
+		[will_not_call_mercury, max_stack_size(1), promise_pure],
+"
+	ldloc 'A'
+	stloc 'B'
+").
 
 %------------------------------------------------------------------------------%
 
Index: c_write_string.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/c_write_string.m,v
retrieving revision 1.1
diff -u -r1.1 c_write_string.m
--- c_write_string.m	20 Jul 1996 10:52:58 -0000	1.1
+++ c_write_string.m	8 Nov 2002 17:14:32 -0000
@@ -14,6 +14,8 @@
 
 :- pragma(c_code, c_write_string(Str::in, IO0::di, IO::uo),
 	"fputs(Str, stdout); IO = IO0;").
+c_write_string(Str) -->
+	io__write_string(Str).
 
 main -->
 	c_write_string("Hello, world\n"),

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