mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 18:03:36 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user