Runtime fixes for the Java back-end.

Estimated hours taken: 2
Branches: main

Runtime fixes for the Java back-end.

java/runtime/DuExistLocn.java:
java/runtime/DuFunctorDesc.java:
java/runtime/DuPtagLayout.java:
	Define constructors for these types.

java/runtime/MaybeResAddrFunctorDesc.java:
	New file (corresponds to MR_MaybeResAddrFunctorDesc type in C).

java/runtime/MaybeResFunctorDesc.java:
	New file (corresponds to MR_MaybeResFunctorDesc type in C).

java/runtime/PseudoTypeInfo.java:
	Define constructors.
	Make non-abstract (XXX temp work-around only).

java/runtime/TypeCtorInfo_Struct.java:
	XXX Pass some parameters of the constructor as "Object",
	to work around type errors in invocations of those constructors.

java/runtime/TypeFunctors.java:
java/runtime/TypeLayout.java:
	Model the C unions better; use a single field, with accessor
	functions that convert to each alternative, not several fields.

java/runtime/TypeclassInfo.java:
	Implement as stub (previous code was just copy of TypeInfo.java).

java/runtime/VA_PseudoTypeInfo_Struct*.java:
	Fix a bug: change the order of the constructor parameters
	to match the way we generate code which invokes those constructors.
This commit is contained in:
Fergus Henderson
2003-12-01 06:55:51 +00:00
parent 12418653ee
commit cfea29cba0
14 changed files with 144 additions and 60 deletions

View File

@@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2002 The University of Melbourne.
// Copyright (C) 2001-2003 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.
//
@@ -10,6 +10,19 @@ public class DuPtagLayout {
public int sectag_sharers;
public mercury.runtime.Sectag_Locn sectag_locn;
public /* final */ DuFunctorDesc[] sectag_alternatives;
public /* final */ mercury.runtime.DuFunctorDesc[] sectag_alternatives;
public DuPtagLayout(int sharers, mercury.runtime.Sectag_Locn locn,
mercury.runtime.DuFunctorDesc[] alts)
{
sectag_sharers = sharers;
sectag_locn = locn;
sectag_alternatives = alts;
}
public DuPtagLayout(int sharers, int locn, DuFunctorDesc[] alts) {
sectag_sharers = sharers;
sectag_locn = new mercury.runtime.Sectag_Locn(locn);
sectag_alternatives = alts;
}
}