Add a new constructor which takes a PseudoTypeInfo[] array, and

Estimated hours taken: 0.25
Branches: main

java/runtime/TypeClassConstraint.java:
	Add a new constructor which takes a PseudoTypeInfo[] array, and
	also a variant which takes an Object[] array.  These are needed
	because the compiler sometimes generates calls to them.
This commit is contained in:
Fergus Henderson
2004-02-20 07:38:25 +00:00
parent b61cb1adea
commit 1e87a2cd36

View File

@@ -19,6 +19,26 @@ public class TypeClassConstraint {
tc_constr_arg_ptis = new PseudoTypeInfo[] {};
}
public TypeClassConstraint(TypeClassDeclStruct type_class,
PseudoTypeInfo[] ptis)
{
tc_constr_type_class = type_class;
tc_constr_arg_ptis = ptis;
}
public TypeClassConstraint(TypeClassDeclStruct type_class,
// XXX Object[] should be mercury.runtime.PseudoTypeInfo[],
// but mlds_to_java.m generates Object[] since
// init_array/1 doesn't give type info
Object[] ptis)
{
tc_constr_type_class = type_class;
tc_constr_arg_ptis = new PseudoTypeInfo[ptis.length];
for (int i = 0; i < ptis.length; i++) {
tc_constr_arg_ptis[i] = (PseudoTypeInfo) ptis[i];
}
}
public TypeClassConstraint(TypeClassDeclStruct type_class,
PseudoTypeInfo pti1)
{