[m-rev.] diff: more java fixes

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Feb 20 15:38:05 AEDT 2004


This fixes some but not all of the bugs that cause problems when building
the "browser" directory in grade java.  The remaining ones seem to be due
to the use of nested modules.

Estimated hours taken: 0.5
Branches: main

More fixes for grade java.

library/builtin.m:
	Add Java stub implementation of compare_representation/3.

compiler/rtti.m:
	Handle "TypeClassContraint_*" in tc_rtti_name_java_type
	the same way that we already handle it in ctor_rtti_name_java_type.

Workspace: /home/jupiter/fjh/ws-jupiter/mercury
Index: compiler/rtti.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/rtti.m,v
retrieving revision 1.41
diff -u -d -r1.41 rtti.m
--- compiler/rtti.m	19 Feb 2004 09:37:14 -0000	1.41
+++ compiler/rtti.m	20 Feb 2004 01:44:33 -0000
@@ -1741,6 +1741,15 @@
 	->
 		JavaTypeName = "java.lang.String"
 	;
+		% In C, we do some nasty hacks to represent type class
+		% constraints of different arities as different structures
+		% ending with arrays of the appropriate length, but in
+		% Java we just use a single type for all of them
+		% (with an extra level of indirection for the array).
+		string__prefix(GenTypeName, "TypeClassConstraint_")
+	->
+		JavaTypeName = "mercury.runtime.TypeClassConstraint"
+	;
 		% The rest are all defined in Mercury's Java runtime
 		% (java/runtime/*.java).
 		JavaTypeName = string__append("mercury.runtime.",
Index: library/builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/builtin.m,v
retrieving revision 1.101
diff -u -d -r1.101 builtin.m
--- library/builtin.m	20 Jan 2004 23:06:29 -0000	1.101
+++ library/builtin.m	20 Feb 2004 01:55:35 -0000
@@ -835,6 +835,15 @@
 		return compare_3_p_0(ti, x, y);
 	}
 
+	public static comparison_result_0
+	compare_representation_3_p_0 (mercury.runtime.TypeInfo_Struct ti,
+		       java.lang.Object x, java.lang.Object y)
+	{
+		// stub only
+		throw new java.lang.Error (
+			""compare_representation_3_p_0/3 not implemented"");
+	}
+
 	//
 	// Type-specific unification routines for builtin types
 	//

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