mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 09:53:36 +00:00
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:
@@ -6,33 +6,6 @@
|
||||
|
||||
package mercury.runtime;
|
||||
|
||||
public class TypeInfo_Struct extends PseudoTypeInfo {
|
||||
|
||||
public TypeCtorInfo_Struct type_ctor;
|
||||
public PseudoTypeInfo args[];
|
||||
|
||||
public TypeInfo_Struct(TypeCtorInfo_Struct tc, PseudoTypeInfo[] as)
|
||||
{
|
||||
type_ctor = tc;
|
||||
args = as;
|
||||
}
|
||||
|
||||
public TypeInfo_Struct(TypeCtorInfo_Struct tc)
|
||||
{
|
||||
type_ctor = tc;
|
||||
args = null;
|
||||
}
|
||||
|
||||
public TypeInfo_Struct(TypeCtorInfo_Struct tc, PseudoTypeInfo a1)
|
||||
{
|
||||
type_ctor = tc;
|
||||
args = new PseudoTypeInfo[] { a1 };
|
||||
}
|
||||
|
||||
public TypeInfo_Struct(TypeCtorInfo_Struct tc, PseudoTypeInfo a1,
|
||||
PseudoTypeInfo a2)
|
||||
{
|
||||
type_ctor = tc;
|
||||
args = new PseudoTypeInfo[] { a1, a2 };
|
||||
}
|
||||
public class TypeclassInfo extends PseudoTypeInfo {
|
||||
// stub only
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user