mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-17 23:05:21 +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:
@@ -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.
|
||||
//
|
||||
@@ -21,4 +21,27 @@ public class DuFunctorDesc {
|
||||
public /*final*/ java.lang.String[] du_functor_arg_names;
|
||||
public /*final*/ mercury.runtime.DuExistInfo[] du_functor_exist_info;
|
||||
|
||||
public DuFunctorDesc(java.lang.String functor_name, int orig_arity,
|
||||
int arg_type_contains_var, int sectag_locn, int primary,
|
||||
int secondary, int ordinal,
|
||||
// XXX why do we need to use Object here?
|
||||
java.lang.Object arg_types,
|
||||
java.lang.Object arg_names,
|
||||
java.lang.Object exist_info)
|
||||
{
|
||||
du_functor_name = functor_name;
|
||||
du_functor_orig_arity = orig_arity;
|
||||
du_functor_ordinal = ordinal;
|
||||
du_functor_arg_type_contains_var = arg_type_contains_var;
|
||||
du_functor_sectag_locn =
|
||||
new mercury.runtime.Sectag_Locn(sectag_locn);
|
||||
du_functor_primary = primary;
|
||||
du_functor_secondary = secondary;
|
||||
du_functor_ordinal = ordinal;
|
||||
du_functor_arg_types = (mercury.runtime.PseudoTypeInfo [])
|
||||
arg_types;
|
||||
du_functor_arg_names = (java.lang.String []) arg_names;
|
||||
du_functor_exist_info =
|
||||
(mercury.runtime.DuExistInfo[]) exist_info;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user