[m-rev.] diff: fix test case failures for the il backend

Peter Ross pro at missioncriticalit.com
Sun Oct 26 23:43:04 AEDT 2003


Hi,


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


Estimated hours taken: 4
Branches: main

Fixes for the testing infrastructure for the il grade.

hard_coded/Mmakefile:
	Don't do the fact table tests in the il and java grades.

hard_coded/string_strip.m:
hard_coded/string_strip.exp:
	Add a new line at the end of the program, so that the last
	line is complete.

hard_coded/string_strip.exp2:
	The IL grade does string comparison in a different order to
	the C grades, thus the second version of string_strip.

hard_coded/user_compare.m:
	Add il versions of the foreign procs.

invalid/Mmakefile:
valid/Mmakefile:
	Remove the reserve_tag tests from the il and java grades.

invalid/foreign_type_2.err_exp2:
	Update the expected output now that '.' is the module
	seperator.

warnings/singleton_test.m:
warnings/singleton_test.exp2:
	Modify this test to include tests for the IL backend.

New File: hard_coded/string_strip.exp2
===================================================================
chomp("foo") = "foo"
chomp("\ foo") = "\ foo"
chomp("foo\ ") = "foo\ "
chomp("\ foo\ ") = "\ foo\ "
chomp("foo") = "foo"
chomp("\tfoo") = "\tfoo"
chomp("foo\t") = "foo\t"
chomp("\tfoo\t") = "\tfoo\t"
chomp("foo") = "foo"
chomp("\nfoo") = "\nfoo"
chomp("foo\n") = "foo"
chomp("\nfoo\n") = "\nfoo"
chomp("foo") = "foo"
chomp("\ \ foo") = "\ \ foo"
chomp("foo\ \ ") = "foo\ \ "
chomp("\ \ foo\ \ ") = "\ \ foo\ \ "
chomp("foo") = "foo"
chomp("\ \tfoo") = "\ \tfoo"
chomp("foo\ \t") = "foo\ \t"
chomp("\ \tfoo\ \t") = "\ \tfoo\ \t"
chomp("foo") = "foo"
chomp("\ \nfoo") = "\ \nfoo"
chomp("foo\ \n") = "foo\ "
chomp("\ \nfoo\ \n") = "\ \nfoo\ "
chomp("foo") = "foo"
chomp("\t\ foo") = "\t\ foo"
chomp("foo\t\ ") = "foo\t\ "
chomp("\t\ foo\t\ ") = "\t\ foo\t\ "
chomp("foo") = "foo"
chomp("\t\tfoo") = "\t\tfoo"
chomp("foo\t\t") = "foo\t\t"
chomp("\t\tfoo\t\t") = "\t\tfoo\t\t"
chomp("foo") = "foo"
chomp("\t\nfoo") = "\t\nfoo"
chomp("foo\t\n") = "foo\t"
chomp("\t\nfoo\t\n") = "\t\nfoo\t"
chomp("foo") = "foo"
chomp("\n\ foo") = "\n\ foo"
chomp("foo\n\ ") = "foo\n\ "
chomp("\n\ foo\n\ ") = "\n\ foo\n\ "
chomp("foo") = "foo"
chomp("\n\tfoo") = "\n\tfoo"
chomp("foo\n\t") = "foo\n\t"
chomp("\n\tfoo\n\t") = "\n\tfoo\n\t"
chomp("foo") = "foo"
chomp("\n\nfoo") = "\n\nfoo"
chomp("foo\n\n") = "foo\n"
chomp("\n\nfoo\n\n") = "\n\nfoo\n"
lstrip("foo") = "foo"
lstrip("\ foo") = "foo"
lstrip("foo\ ") = "foo\ "
lstrip("\ foo\ ") = "foo\ "
lstrip("foo") = "foo"
lstrip("\tfoo") = "foo"
lstrip("foo\t") = "foo\t"
lstrip("\tfoo\t") = "foo\t"
lstrip("foo") = "foo"
lstrip("\nfoo") = "foo"
lstrip("foo\n") = "foo\n"
lstrip("\nfoo\n") = "foo\n"
lstrip("foo") = "foo"
lstrip("\ \ foo") = "foo"
lstrip("foo\ \ ") = "foo\ \ "
lstrip("\ \ foo\ \ ") = "foo\ \ "
lstrip("foo") = "foo"
lstrip("\ \tfoo") = "foo"
lstrip("foo\ \t") = "foo\ \t"
lstrip("\ \tfoo\ \t") = "foo\ \t"
lstrip("foo") = "foo"
lstrip("\ \nfoo") = "foo"
lstrip("foo\ \n") = "foo\ \n"
lstrip("\ \nfoo\ \n") = "foo\ \n"
lstrip("foo") = "foo"
lstrip("\t\ foo") = "foo"
lstrip("foo\t\ ") = "foo\t\ "
lstrip("\t\ foo\t\ ") = "foo\t\ "
lstrip("foo") = "foo"
lstrip("\t\tfoo") = "foo"
lstrip("foo\t\t") = "foo\t\t"
lstrip("\t\tfoo\t\t") = "foo\t\t"
lstrip("foo") = "foo"
lstrip("\t\nfoo") = "foo"
lstrip("foo\t\n") = "foo\t\n"
lstrip("\t\nfoo\t\n") = "foo\t\n"
lstrip("foo") = "foo"
lstrip("\n\ foo") = "foo"
lstrip("foo\n\ ") = "foo\n\ "
lstrip("\n\ foo\n\ ") = "foo\n\ "
lstrip("foo") = "foo"
lstrip("\n\tfoo") = "foo"
lstrip("foo\n\t") = "foo\n\t"
lstrip("\n\tfoo\n\t") = "foo\n\t"
lstrip("foo") = "foo"
lstrip("\n\nfoo") = "foo"
lstrip("foo\n\n") = "foo\n\n"
lstrip("\n\nfoo\n\n") = "foo\n\n"
rstrip("foo") = "foo"
rstrip("\ foo") = "\ foo"
rstrip("foo\ ") = "foo"
rstrip("\ foo\ ") = "\ foo"
rstrip("foo") = "foo"
rstrip("\tfoo") = "\tfoo"
rstrip("foo\t") = "foo"
rstrip("\tfoo\t") = "\tfoo"
rstrip("foo") = "foo"
rstrip("\nfoo") = "\nfoo"
rstrip("foo\n") = "foo"
rstrip("\nfoo\n") = "\nfoo"
rstrip("foo") = "foo"
rstrip("\ \ foo") = "\ \ foo"
rstrip("foo\ \ ") = "foo"
rstrip("\ \ foo\ \ ") = "\ \ foo"
rstrip("foo") = "foo"
rstrip("\ \tfoo") = "\ \tfoo"
rstrip("foo\ \t") = "foo"
rstrip("\ \tfoo\ \t") = "\ \tfoo"
rstrip("foo") = "foo"
rstrip("\ \nfoo") = "\ \nfoo"
rstrip("foo\ \n") = "foo"
rstrip("\ \nfoo\ \n") = "\ \nfoo"
rstrip("foo") = "foo"
rstrip("\t\ foo") = "\t\ foo"
rstrip("foo\t\ ") = "foo"
rstrip("\t\ foo\t\ ") = "\t\ foo"
rstrip("foo") = "foo"
rstrip("\t\tfoo") = "\t\tfoo"
rstrip("foo\t\t") = "foo"
rstrip("\t\tfoo\t\t") = "\t\tfoo"
rstrip("foo") = "foo"
rstrip("\t\nfoo") = "\t\nfoo"
rstrip("foo\t\n") = "foo"
rstrip("\t\nfoo\t\n") = "\t\nfoo"
rstrip("foo") = "foo"
rstrip("\n\ foo") = "\n\ foo"
rstrip("foo\n\ ") = "foo"
rstrip("\n\ foo\n\ ") = "\n\ foo"
rstrip("foo") = "foo"
rstrip("\n\tfoo") = "\n\tfoo"
rstrip("foo\n\t") = "foo"
rstrip("\n\tfoo\n\t") = "\n\tfoo"
rstrip("foo") = "foo"
rstrip("\n\nfoo") = "\n\nfoo"
rstrip("foo\n\n") = "foo"
rstrip("\n\nfoo\n\n") = "\n\nfoo"
strip("foo") = "foo"
strip("\ foo") = "foo"
strip("foo\ ") = "foo"
strip("\ foo\ ") = "foo"
strip("foo") = "foo"
strip("\tfoo") = "foo"
strip("foo\t") = "foo"
strip("\tfoo\t") = "foo"
strip("foo") = "foo"
strip("\nfoo") = "foo"
strip("foo\n") = "foo"
strip("\nfoo\n") = "foo"
strip("foo") = "foo"
strip("\ \ foo") = "foo"
strip("foo\ \ ") = "foo"
strip("\ \ foo\ \ ") = "foo"
strip("foo") = "foo"
strip("\ \tfoo") = "foo"
strip("foo\ \t") = "foo"
strip("\ \tfoo\ \t") = "foo"
strip("foo") = "foo"
strip("\ \nfoo") = "foo"
strip("foo\ \n") = "foo"
strip("\ \nfoo\ \n") = "foo"
strip("foo") = "foo"
strip("\t\ foo") = "foo"
strip("foo\t\ ") = "foo"
strip("\t\ foo\t\ ") = "foo"
strip("foo") = "foo"
strip("\t\tfoo") = "foo"
strip("foo\t\t") = "foo"
strip("\t\tfoo\t\t") = "foo"
strip("foo") = "foo"
strip("\t\nfoo") = "foo"
strip("foo\t\n") = "foo"
strip("\t\nfoo\t\n") = "foo"
strip("foo") = "foo"
strip("\n\ foo") = "foo"
strip("foo\n\ ") = "foo"
strip("\n\ foo\n\ ") = "foo"
strip("foo") = "foo"
strip("\n\tfoo") = "foo"
strip("foo\n\t") = "foo"
strip("\n\tfoo\n\t") = "foo"
strip("foo") = "foo"
strip("\n\nfoo") = "foo"
strip("foo\n\n") = "foo"
strip("\n\nfoo\n\n") = "foo"
lstrip(is_alpha)("foo") = ""
lstrip(is_alpha)("\ foo") = "\ foo"
lstrip(is_alpha)("foo\ ") = "\ "
lstrip(is_alpha)("\ foo\ ") = "\ foo\ "
lstrip(is_alpha)("foo") = ""
lstrip(is_alpha)("\tfoo") = "\tfoo"
lstrip(is_alpha)("foo\t") = "\t"
lstrip(is_alpha)("\tfoo\t") = "\tfoo\t"
lstrip(is_alpha)("foo") = ""
lstrip(is_alpha)("\nfoo") = "\nfoo"
lstrip(is_alpha)("foo\n") = "\n"
lstrip(is_alpha)("\nfoo\n") = "\nfoo\n"
lstrip(is_alpha)("foo") = ""
lstrip(is_alpha)("\ \ foo") = "\ \ foo"
lstrip(is_alpha)("foo\ \ ") = "\ \ "
lstrip(is_alpha)("\ \ foo\ \ ") = "\ \ foo\ \ "
lstrip(is_alpha)("foo") = ""
lstrip(is_alpha)("\ \tfoo") = "\ \tfoo"
lstrip(is_alpha)("foo\ \t") = "\ \t"
lstrip(is_alpha)("\ \tfoo\ \t") = "\ \tfoo\ \t"
lstrip(is_alpha)("foo") = ""
lstrip(is_alpha)("\ \nfoo") = "\ \nfoo"
lstrip(is_alpha)("foo\ \n") = "\ \n"
lstrip(is_alpha)("\ \nfoo\ \n") = "\ \nfoo\ \n"
lstrip(is_alpha)("foo") = ""
lstrip(is_alpha)("\t\ foo") = "\t\ foo"
lstrip(is_alpha)("foo\t\ ") = "\t\ "
lstrip(is_alpha)("\t\ foo\t\ ") = "\t\ foo\t\ "
lstrip(is_alpha)("foo") = ""
lstrip(is_alpha)("\t\tfoo") = "\t\tfoo"
lstrip(is_alpha)("foo\t\t") = "\t\t"
lstrip(is_alpha)("\t\tfoo\t\t") = "\t\tfoo\t\t"
lstrip(is_alpha)("foo") = ""
lstrip(is_alpha)("\t\nfoo") = "\t\nfoo"
lstrip(is_alpha)("foo\t\n") = "\t\n"
lstrip(is_alpha)("\t\nfoo\t\n") = "\t\nfoo\t\n"
lstrip(is_alpha)("foo") = ""
lstrip(is_alpha)("\n\ foo") = "\n\ foo"
lstrip(is_alpha)("foo\n\ ") = "\n\ "
lstrip(is_alpha)("\n\ foo\n\ ") = "\n\ foo\n\ "
lstrip(is_alpha)("foo") = ""
lstrip(is_alpha)("\n\tfoo") = "\n\tfoo"
lstrip(is_alpha)("foo\n\t") = "\n\t"
lstrip(is_alpha)("\n\tfoo\n\t") = "\n\tfoo\n\t"
lstrip(is_alpha)("foo") = ""
lstrip(is_alpha)("\n\nfoo") = "\n\nfoo"
lstrip(is_alpha)("foo\n\n") = "\n\n"
lstrip(is_alpha)("\n\nfoo\n\n") = "\n\nfoo\n\n"
rstrip(is_alpha)("foo") = ""
rstrip(is_alpha)("\ foo") = "\ "
rstrip(is_alpha)("foo\ ") = "foo\ "
rstrip(is_alpha)("\ foo\ ") = "\ foo\ "
rstrip(is_alpha)("foo") = ""
rstrip(is_alpha)("\tfoo") = "\t"
rstrip(is_alpha)("foo\t") = "foo\t"
rstrip(is_alpha)("\tfoo\t") = "\tfoo\t"
rstrip(is_alpha)("foo") = ""
rstrip(is_alpha)("\nfoo") = "\n"
rstrip(is_alpha)("foo\n") = "foo\n"
rstrip(is_alpha)("\nfoo\n") = "\nfoo\n"
rstrip(is_alpha)("foo") = ""
rstrip(is_alpha)("\ \ foo") = "\ \ "
rstrip(is_alpha)("foo\ \ ") = "foo\ \ "
rstrip(is_alpha)("\ \ foo\ \ ") = "\ \ foo\ \ "
rstrip(is_alpha)("foo") = ""
rstrip(is_alpha)("\ \tfoo") = "\ \t"
rstrip(is_alpha)("foo\ \t") = "foo\ \t"
rstrip(is_alpha)("\ \tfoo\ \t") = "\ \tfoo\ \t"
rstrip(is_alpha)("foo") = ""
rstrip(is_alpha)("\ \nfoo") = "\ \n"
rstrip(is_alpha)("foo\ \n") = "foo\ \n"
rstrip(is_alpha)("\ \nfoo\ \n") = "\ \nfoo\ \n"
rstrip(is_alpha)("foo") = ""
rstrip(is_alpha)("\t\ foo") = "\t\ "
rstrip(is_alpha)("foo\t\ ") = "foo\t\ "
rstrip(is_alpha)("\t\ foo\t\ ") = "\t\ foo\t\ "
rstrip(is_alpha)("foo") = ""
rstrip(is_alpha)("\t\tfoo") = "\t\t"
rstrip(is_alpha)("foo\t\t") = "foo\t\t"
rstrip(is_alpha)("\t\tfoo\t\t") = "\t\tfoo\t\t"
rstrip(is_alpha)("foo") = ""
rstrip(is_alpha)("\t\nfoo") = "\t\n"
rstrip(is_alpha)("foo\t\n") = "foo\t\n"
rstrip(is_alpha)("\t\nfoo\t\n") = "\t\nfoo\t\n"
rstrip(is_alpha)("foo") = ""
rstrip(is_alpha)("\n\ foo") = "\n\ "
rstrip(is_alpha)("foo\n\ ") = "foo\n\ "
rstrip(is_alpha)("\n\ foo\n\ ") = "\n\ foo\n\ "
rstrip(is_alpha)("foo") = ""
rstrip(is_alpha)("\n\tfoo") = "\n\t"
rstrip(is_alpha)("foo\n\t") = "foo\n\t"
rstrip(is_alpha)("\n\tfoo\n\t") = "\n\tfoo\n\t"
rstrip(is_alpha)("foo") = ""
rstrip(is_alpha)("\n\nfoo") = "\n\n"
rstrip(is_alpha)("foo\n\n") = "foo\n\n"
rstrip(is_alpha)("\n\nfoo\n\n") = "\n\nfoo\n\n"
prefix_length(is_whitespace)("foo") = "0"
prefix_length(is_whitespace)("\ foo") = "1"
prefix_length(is_whitespace)("foo\ ") = "0"
prefix_length(is_whitespace)("\ foo\ ") = "1"
prefix_length(is_whitespace)("foo") = "0"
prefix_length(is_whitespace)("\tfoo") = "1"
prefix_length(is_whitespace)("foo\t") = "0"
prefix_length(is_whitespace)("\tfoo\t") = "1"
prefix_length(is_whitespace)("foo") = "0"
prefix_length(is_whitespace)("\nfoo") = "1"
prefix_length(is_whitespace)("foo\n") = "0"
prefix_length(is_whitespace)("\nfoo\n") = "1"
prefix_length(is_whitespace)("foo") = "0"
prefix_length(is_whitespace)("\ \ foo") = "2"
prefix_length(is_whitespace)("foo\ \ ") = "0"
prefix_length(is_whitespace)("\ \ foo\ \ ") = "2"
prefix_length(is_whitespace)("foo") = "0"
prefix_length(is_whitespace)("\ \tfoo") = "2"
prefix_length(is_whitespace)("foo\ \t") = "0"
prefix_length(is_whitespace)("\ \tfoo\ \t") = "2"
prefix_length(is_whitespace)("foo") = "0"
prefix_length(is_whitespace)("\ \nfoo") = "2"
prefix_length(is_whitespace)("foo\ \n") = "0"
prefix_length(is_whitespace)("\ \nfoo\ \n") = "2"
prefix_length(is_whitespace)("foo") = "0"
prefix_length(is_whitespace)("\t\ foo") = "2"
prefix_length(is_whitespace)("foo\t\ ") = "0"
prefix_length(is_whitespace)("\t\ foo\t\ ") = "2"
prefix_length(is_whitespace)("foo") = "0"
prefix_length(is_whitespace)("\t\tfoo") = "2"
prefix_length(is_whitespace)("foo\t\t") = "0"
prefix_length(is_whitespace)("\t\tfoo\t\t") = "2"
prefix_length(is_whitespace)("foo") = "0"
prefix_length(is_whitespace)("\t\nfoo") = "2"
prefix_length(is_whitespace)("foo\t\n") = "0"
prefix_length(is_whitespace)("\t\nfoo\t\n") = "2"
prefix_length(is_whitespace)("foo") = "0"
prefix_length(is_whitespace)("\n\ foo") = "2"
prefix_length(is_whitespace)("foo\n\ ") = "0"
prefix_length(is_whitespace)("\n\ foo\n\ ") = "2"
prefix_length(is_whitespace)("foo") = "0"
prefix_length(is_whitespace)("\n\tfoo") = "2"
prefix_length(is_whitespace)("foo\n\t") = "0"
prefix_length(is_whitespace)("\n\tfoo\n\t") = "2"
prefix_length(is_whitespace)("foo") = "0"
prefix_length(is_whitespace)("\n\nfoo") = "2"
prefix_length(is_whitespace)("foo\n\n") = "0"
prefix_length(is_whitespace)("\n\nfoo\n\n") = "2"
suffix_length(is_whitespace)("foo") = "0"
suffix_length(is_whitespace)("\ foo") = "0"
suffix_length(is_whitespace)("foo\ ") = "1"
suffix_length(is_whitespace)("\ foo\ ") = "1"
suffix_length(is_whitespace)("foo") = "0"
suffix_length(is_whitespace)("\tfoo") = "0"
suffix_length(is_whitespace)("foo\t") = "1"
suffix_length(is_whitespace)("\tfoo\t") = "1"
suffix_length(is_whitespace)("foo") = "0"
suffix_length(is_whitespace)("\nfoo") = "0"
suffix_length(is_whitespace)("foo\n") = "1"
suffix_length(is_whitespace)("\nfoo\n") = "1"
suffix_length(is_whitespace)("foo") = "0"
suffix_length(is_whitespace)("\ \ foo") = "0"
suffix_length(is_whitespace)("foo\ \ ") = "2"
suffix_length(is_whitespace)("\ \ foo\ \ ") = "2"
suffix_length(is_whitespace)("foo") = "0"
suffix_length(is_whitespace)("\ \tfoo") = "0"
suffix_length(is_whitespace)("foo\ \t") = "2"
suffix_length(is_whitespace)("\ \tfoo\ \t") = "2"
suffix_length(is_whitespace)("foo") = "0"
suffix_length(is_whitespace)("\ \nfoo") = "0"
suffix_length(is_whitespace)("foo\ \n") = "2"
suffix_length(is_whitespace)("\ \nfoo\ \n") = "2"
suffix_length(is_whitespace)("foo") = "0"
suffix_length(is_whitespace)("\t\ foo") = "0"
suffix_length(is_whitespace)("foo\t\ ") = "2"
suffix_length(is_whitespace)("\t\ foo\t\ ") = "2"
suffix_length(is_whitespace)("foo") = "0"
suffix_length(is_whitespace)("\t\tfoo") = "0"
suffix_length(is_whitespace)("foo\t\t") = "2"
suffix_length(is_whitespace)("\t\tfoo\t\t") = "2"
suffix_length(is_whitespace)("foo") = "0"
suffix_length(is_whitespace)("\t\nfoo") = "0"
suffix_length(is_whitespace)("foo\t\n") = "2"
suffix_length(is_whitespace)("\t\nfoo\t\n") = "2"
suffix_length(is_whitespace)("foo") = "0"
suffix_length(is_whitespace)("\n\ foo") = "0"
suffix_length(is_whitespace)("foo\n\ ") = "2"
suffix_length(is_whitespace)("\n\ foo\n\ ") = "2"
suffix_length(is_whitespace)("foo") = "0"
suffix_length(is_whitespace)("\n\tfoo") = "0"
suffix_length(is_whitespace)("foo\n\t") = "2"
suffix_length(is_whitespace)("\n\tfoo\n\t") = "2"
suffix_length(is_whitespace)("foo") = "0"
suffix_length(is_whitespace)("\n\nfoo") = "0"
suffix_length(is_whitespace)("foo\n\n") = "2"
suffix_length(is_whitespace)("\n\nfoo\n\n") = "2"

New File: warnings/singleton_test.exp2
===================================================================
singleton_test.m:022: In clause for predicate `singleton_test.my_append/3':
singleton_test.m:022:   warning: variable `L2' occurs only once in this scope.
singleton_test.m:026: In clause for function `singleton_test.my_append_func/2':
singleton_test.m:026:   warning: variables `L1, L2' occur only once in this scope.
singleton_test.m:027: In clause for function `singleton_test.my_append_func/2':
singleton_test.m:027:   warning: variable `T' occurs only once in this scope.
singleton_test.m:032: In the C# code for predicate `singleton_test.my_c_pred/3':
singleton_test.m:032:   warning: variable `Y' does not occur in the C# code.
singleton_test.m:040: In the C# code for function `singleton_test.my_c_func/2':
singleton_test.m:040:   warning: variable `X' does not occur in the C# code.
singleton_test.m:052: In the C# code for predicate `singleton_test.c_hello_world/3':
singleton_test.m:052:   warning: variable `Msg' does not occur in the C# code.
singleton_test.m:008: In function `singleton_test.my_append_func/2':
singleton_test.m:008:   warning: unresolved polymorphism.
singleton_test.m:008:   The variables with unbound types were:
singleton_test.m:008:       L2: V_1
singleton_test.m:008:       L1: V_1
singleton_test.m:008:   The unbound type variable(s) will be implicitly
singleton_test.m:008:   bound to the builtin type `void'.

Index: hard_coded/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/Mmakefile,v
retrieving revision 1.206
diff -u -r1.206 Mmakefile
--- hard_coded/Mmakefile	15 Aug 2003 03:20:07 -0000	1.206
+++ hard_coded/Mmakefile	26 Oct 2003 12:36:42 -0000
@@ -54,8 +54,6 @@
 	existential_types_test \
 	expand \
 	export_test \
-	factt \
-	factt_sort_test \
 	failure_unify \
 	field_syntax \
 	float_field \
@@ -175,6 +173,15 @@
 	write_reg1 \
 	write_reg2
 
+# Fact tables current only work in the C grades.
+ifeq "$(filter il% java%,$(GRADE))" ""
+FACTT_PROGS= \
+	factt \
+	factt_sort_test
+else
+FACTT_PROGS=
+endif
+
 # XXX test_array2d does not work in at least asm_fast.gc.profdeep; the
 # problem does not lie in test_array2d or array2d and has not yet been
 # fixed.
@@ -327,7 +334,8 @@
 		$(CLOSURE_LAYOUT_PROGS) $(EXCEPTION_PROGS) \
 		$(BACKEND_PROGS) $(NONDET_C_PROGS) \
 		$(C_AND_GC_ONLY_PROGS) $(STATIC_LINK_PROGS) \
-		$(CHAR_REP_PROGS) $(BROKEN_FOR_PROFDEEP)
+		$(CHAR_REP_PROGS) $(BROKEN_FOR_PROFDEEP)  \
+		$(FACTT_PROGS)
 endif
 
 # --split-c-files does not work in the hl* grades (e.g. hlc.gc),
Index: hard_coded/string_strip.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/string_strip.exp,v
retrieving revision 1.1
diff -u -r1.1 string_strip.exp
--- hard_coded/string_strip.exp	13 Feb 2003 01:36:47 -0000	1.1
+++ hard_coded/string_strip.exp	26 Oct 2003 12:36:45 -0000
@@ -381,4 +381,4 @@
 suffix_length(is_whitespace)("foo") = "0"
 suffix_length(is_whitespace)("\ \ foo") = "0"
 suffix_length(is_whitespace)("foo\ \ ") = "2"
-suffix_length(is_whitespace)("\ \ foo\ \ ") = "2"
\ No newline at end of file
+suffix_length(is_whitespace)("\ \ foo\ \ ") = "2"
Index: hard_coded/string_strip.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/string_strip.m,v
retrieving revision 1.1
diff -u -r1.1 string_strip.m
--- hard_coded/string_strip.m	13 Feb 2003 01:36:47 -0000	1.1
+++ hard_coded/string_strip.m	26 Oct 2003 12:36:45 -0000
@@ -91,7 +91,9 @@
             )
         ),
 
-    io.write_list(Results, "\n", io.write_string, !IO).
+    io.write_list(Results, "\n", io.write_string, !IO),
+
+    io.nl(!IO).
 
 %-----------------------------------------------------------------------------%
 
Index: hard_coded/user_compare.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/user_compare.m,v
retrieving revision 1.1
diff -u -r1.1 user_compare.m
--- hard_coded/user_compare.m	12 Feb 2003 22:58:18 -0000	1.1
+++ hard_coded/user_compare.m	26 Oct 2003 12:36:45 -0000
@@ -53,12 +53,18 @@
 :- type foreign.
 :- pragma foreign_type(c, foreign, "int") where
 		 equality is foreign_equals, comparison is foreign_compare.
+:- pragma foreign_type(il, foreign, "int32") where
+		 equality is foreign_equals, comparison is foreign_compare.
 
 :- pred foreign_equals(foreign::in, foreign::in) is semidet.
 :- pragma foreign_proc(c, foreign_equals(Foreign1::in, Foreign2::in),
                 [will_not_call_mercury, promise_pure],
 "SUCCESS_INDICATOR = (Foreign1 == Foreign2);"
 ).
+:- pragma foreign_proc("c#", foreign_equals(Foreign1::in, Foreign2::in),
+                [will_not_call_mercury, promise_pure],
+"SUCCESS_INDICATOR = (Foreign1 == Foreign2);"
+).
 
 :- pred foreign_compare `with_type` compare(foreign)
 			`with_inst` compare.
@@ -73,9 +79,18 @@
                 [will_not_call_mercury, promise_pure],
 ).
+:- pragma foreign_proc("C#", foreign_compare_2(Result::out, Foreign1::in,
+			Foreign2::in),
+                [will_not_call_mercury, promise_pure],
+).
 
 :- func foreign(int) = foreign.
 :- pragma foreign_proc(c, foreign(Int::in) = (Foreign::out),
+                [will_not_call_mercury, promise_pure],
+"Foreign = Int;"
+).
+:- pragma foreign_proc("C#", foreign(Int::in) = (Foreign::out),
                 [will_not_call_mercury, promise_pure],
 "Foreign = Int;"
 ).
Index: invalid/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/Mmakefile,v
retrieving revision 1.141
diff -u -r1.141 Mmakefile
--- invalid/Mmakefile	21 Aug 2003 07:01:17 -0000	1.141
+++ invalid/Mmakefile	26 Oct 2003 12:36:47 -0000
@@ -29,7 +29,7 @@
 	transitive_import_class \
 	undef_mod_qual
 
-SINGLEMODULE_PROGS= \
+SINGLEMODULE= \
 	any_mode \
 	any_should_not_match_bound \
 	assert_in_interface \
@@ -109,7 +109,6 @@
 	qual_basic_test2 \
 	qualified_cons_id2 \
 	record_syntax_errors \
-	reserve_tag \
 	some \
 	spurious_mode_error \
 	state_vars_test1 \
@@ -169,6 +168,11 @@
 USE_SUBDIR_MODULES = \
 	nonexistent_import
 
+# The following require that num_tag_bits > 1
+RESERVE_TAG_MODULES = \
+	reserve_tag
+
+
 # XXX we do not yet pass the following tests:
 #	foreign_decl_line_number (due to some errors being reported in .c
 #		files and .mh files rather than in .m files)
@@ -186,6 +190,13 @@
 #	inst_matches_final_bug (due to same bug as ho_default_func_4)
 
 #-----------------------------------------------------------------------------#
+
+# The java and il grades compile with num_tag_bits = 0.
+ifneq "$(filter java% il%,$(GRADE))" ""
+SINGLEMODULE_PROGS=$(SINGLEMODULE) 
+else
+SINGLEMODULE_PROGS=$(SINGLEMODULE) $(RESERVE_TAG_MODULES)
+endif
 
 ifeq ($(MMAKE_USE_SUBDIRS),yes)
 PROGS= $(SINGLEMODULE_PROGS) $(MULTIMODULE_PROGS) $(USE_SUBDIR_MODULES)
Index: invalid/foreign_type_2.err_exp2
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/foreign_type_2.err_exp2,v
retrieving revision 1.1
diff -u -r1.1 foreign_type_2.err_exp2
--- invalid/foreign_type_2.err_exp2	7 Nov 2002 16:17:08 -0000	1.1
+++ invalid/foreign_type_2.err_exp2	26 Oct 2003 12:36:47 -0000
@@ -1,4 +1,4 @@
-foreign_type_2.m:018: In clause for function `foreign_type_2:unwrap_foreign/1':
+foreign_type_2.m:018: In clause for function `foreign_type_2.unwrap_foreign/1':
 foreign_type_2.m:018:   in argument 1 of clause head:
 foreign_type_2.m:018:   error: undefined symbol `foreign/1'.
 For more information, try recompiling with `-E'.
Index: valid/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/valid/Mmakefile,v
retrieving revision 1.132
diff -u -r1.132 Mmakefile
--- valid/Mmakefile	20 Oct 2003 07:29:50 -0000	1.132
+++ valid/Mmakefile	26 Oct 2003 12:36:52 -0000
@@ -157,7 +157,6 @@
 	record_syntax_bug_5 \
 	recursive_no_tag_type \
 	reg_bug \
-	reserve_tag \
 	same_length_2 \
 	semidet_disj \
 	shape_type \
@@ -193,6 +192,14 @@
 	vn_float \
 	zero_arity
 
+# The following require that num_tag_bits > 1
+ifeq "$(filter java% il%,$(GRADE))" ""
+RESERVE_TAG= \
+	reserve_tag
+else
+RESERVE_TAG=
+endif
+
 # XXX The mode system can't handle the following test cases yet:
 #	assoc_list_bug
 #	determinism
@@ -263,9 +270,9 @@
 endif
 
 ifneq "$(findstring tsw,$(GRADE))$(findstring tsc,$(GRADE))" ""
-	PROGS = $(OBJ_PROGS) $(ALL_RLO_PROGS)
+	PROGS = $(OBJ_PROGS) $(ALL_RLO_PROGS) $(RESERVE_TAG)
 else
-	PROGS = $(OBJ_PROGS) $(ALL_RLO_PROGS) $(IL_PROGS)
+	PROGS = $(OBJ_PROGS) $(ALL_RLO_PROGS) $(IL_PROGS) $(RESERVE_TAG)
 endif
 
 # `mmc --make' doesn't expect subdirectories to appear in targets.
Index: warnings/singleton_test.m
===================================================================
RCS file: /home/mercury1/repository/tests/warnings/singleton_test.m,v
retrieving revision 1.5
diff -u -r1.5 singleton_test.m
--- warnings/singleton_test.m	21 May 1997 02:16:52 -0000	1.5
+++ warnings/singleton_test.m	26 Oct 2003 12:36:52 -0000
@@ -29,15 +29,28 @@
 :- pragma c_code(my_c_pred(X::in, Y::in, Z::out), will_not_call_mercury, "
 	Z = 2 * X;
 ").
+:- pragma foreign_proc("C#", my_c_pred(X::in, Y::in, Z::out),
+	[promise_pure, will_not_call_mercury], "
+	Z = 2 * X;
+").
 
 :- pragma c_code(my_c_func(X::in, Y::in) = (Z::out), will_not_call_mercury, "
 	Z = 2 * Y;
 ").
+:- pragma foreign_proc("C#", my_c_func(X::in, Y::in) = (Z::out),
+	[promise_pure, will_not_call_mercury], "
+	Z = 2 * Y;
+").
 
 :- pragma c_header_code("#include <stdio.h>").
 
 :- pragma c_code(c_hello_world(Msg::in, IO0::di, IO::uo),
 		will_not_call_mercury, "
 	printf(""Hello, world"");
+	IO = IO0;
+").
+:- pragma foreign_proc("C#", c_hello_world(Msg::in, IO0::di, IO::uo),
+		[promise_pure, will_not_call_mercury], "
+	System.Console.WriteLine(""Hello, world"");
 	IO = IO0;
 ").


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