[m-rev.] for review: type class constraint info in du functor descriptors

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Feb 9 20:17:10 AEDT 2004


On 05-Feb-2004, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 27-Jan-2004, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> > Index: compiler/rtti.m
> > @@ -1345,6 +1384,9 @@
> > +rtti__pred_or_func_to_string(predicate, "MR_PREDICATE").
> > +rtti__pred_or_func_to_string(function,  "MR_FUNCTION").
> > +
> >  rtti__sectag_locn_to_string(sectag_none,   "MR_SECTAG_NONE").
> >  rtti__sectag_locn_to_string(sectag_local,  "MR_SECTAG_LOCAL").
> >  rtti__sectag_locn_to_string(sectag_remote, "MR_SECTAG_REMOTE").
> 
> This change (together with the changes to rtti_to_mlds.m to generate
> these) requires appropriate support in the Java back-end, in particular
> defining a PredFunc class in java/runtime/PredFunc.java analagous to
> the way Sectag_Locn is defined in java/runtime/Sectag_Locn.java.

I've fixed this one myself -- see diff below.  But this change
also seems to have introduced some other new regressions in the Java
back-end which still prevent the library from building.  In particular
(1) the DuExistInfo constructor is being called with an extra argument,
but java/runtime/runtime/DuExistInfo hasn't been updated, and
(2) there are a lot of type errors with mixing "int" and "Object" for the
type_class_id structures, e.g.

	private static final java.lang.Object[] ops__type_class_id_op_table_1 =
			new java.lang.Object[] {
		"ops",
                "op_table",
                1,	<------- error, expecting "Object", found "int"
                1,
                8,
                mercury.ops.ops__type_class_id_var_names_op_table_1,
                mercury.ops.ops__type_class_id_method_ids_op_table_1};

----------

Estimated hours taken: 0.25
Branches: main

java/runtime/PredFunc.java:
	New file.  Needed as a result of Zoltan's recent
	typeclass_info-related changes.

Workspace: /home/jupiter/fjh/ws-jupiter/mercury
Index: java/runtime/PredFunc.java
===================================================================
RCS file: java/runtime/PredFunc.java
diff -N java/runtime/PredFunc.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ java/runtime/PredFunc.java	9 Feb 2004 09:06:56 -0000
@@ -0,0 +1,19 @@
+//
+// Copyright (C) 2004 The University of Melbourne.
+// This file may only be copied under the terms of the GNU Library General
+// Public License - see the file COPYING.LIB in the Mercury distribution.
+//
+
+package mercury.runtime;
+
+public class PredFunc {
+	
+	public static final int MR_PRED = 0;
+	public static final int MR_FUNC = 1;
+
+	public int value;
+
+	public PredFunc(int arg) {
+		this.value = arg;
+	}
+}

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