Branches: main
Mark Java RTTI classes as implementing java.io.Serializable to
enable serialization of existentially typed values.
java/runtime/DuExistInfo.java:
java/runtime/DuExistLocn.java:
java/runtime/DuFunctorDesc.java:
java/runtime/DuPtagLayout.java:
java/runtime/EnumFunctorDesc.java:
java/runtime/ForeignEnumFunctorDesc.java:
java/runtime/MethodPtr.java:
java/runtime/NotagFunctorDesc.java:
java/runtime/PseudoTypeInfo.java:
java/runtime/ReservedAddrFunctorDesc.java:
java/runtime/Sectag_Locn.java:
java/runtime/TypeClassConstraint.java:
java/runtime/TypeClassDeclStruct.java:
java/runtime/TypeClassId.java:
java/runtime/TypeClassMethod.java:
java/runtime/TypeCtorInfo_Struct.java:
java/runtime/TypeCtorRep.java:
java/runtime/TypeFunctors.java:
java/runtime/TypeInfo_Struct.java:
java/runtime/TypeLayout.java:
As above.
TypeCtorInfo_Struct.unify() cannot rely on the uniqueness of
TypeCtorInfo_Struct instances, as deserialisation will create new
copies.
Branches: main
Put all Mercury-generated Java classes into the package `jmercury' and
runtime classes into `jmercury.runtime'. The Mercury module hierarchy is
not reflected in the package name. We name sub-module classes using
their fully-qualified module names with `__' between components, e.g.
`bit_buffer.read' produces `class bit_buffer__read'.
As all generated Java code is in the same package we don't need to package
qualify identifiers, and we don't need the hack to avoid clashing package
and class names. It also makes it easier to write Java foreign code because
generated Java class names are easier to predict from Mercury module names.
The package names are not `mercury' and `mercury.runtime' because on
case-insensitive file systems we may end up with a `mercury' directory
that could be confused with the `Mercury' directory.
compiler/java_names.m:
Delete code related to mangling package names.
Remove the extra `mercury' prefix added to standard library module
names, as it is redundant with `jmercury'.
Change runtime package name.
compiler/mlds_to_java.m:
Make generated code follow the new packaging scheme.
Don't automatically import all runtime classes. It doesn't seem
necessary.
Update for new packaging scheme.
compiler/file_names.m:
Fix Java file paths for the new packaging scheme.
compiler/module_cmds.m:
compiler/rtti.m:
library/array.m:
library/backjump.m:
library/benchmarking.m:
library/bitmap.m:
library/builtin.m:
library/exception.m:
library/io.m:
library/library.m:
library/mutvar.m:
library/private_builtin.m:
library/rtti_implementation.m:
library/store.m:
library/string.m:
library/time.m:
library/type_desc.m:
java/runtime/*.java:
Rename package names.
Delete unnecessary package qualification.
compiler/mlds.m:
Add some XXXs to be fixed later.
library/Mmakefile:
Update for new packaging scheme.
Let mmake --use-mmc-make work in this directory.
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.
Estimated hours taken: 3
Branches: main
This change introduces some (partial) Java versions of the mercury library
which are currently needed to compile some .java files generated by the
mercury compiler for the tests/benchmarks test cases.
These additions are required temporarily for testing purposes until the
mercury library can be compiled in grade java.
mercury/java/Commit.java:
mercury/java/DuExistInfo.java:
mercury/java/DuExistLocn.java:
mercury/java/DuFunctorDesc.java:
mercury/java/DuPtagLayout.java:
mercury/java/EnumFunctorDesc.java:
mercury/java/JavaInternal.java:
mercury/java/MethodPtr.java:
mercury/java/NotagFunctorDesc.java:
mercury/java/PseudoTypeInfo.java:
mercury/java/Sectag_Locn.java:
mercury/java/TypeCtorInfo_Struct.java:
mercury/java/TypeCtorRep.java:
mercury/java/TypeFunctors.java:
mercury/java/TypeLayout.java:
mercury/java/UnreachableDefault.java:
All files that were located in the mercury/java directory have been
moved to mercury/java/runtime.
mercury/java/Makefile:
A simple Makefile to set up a couple of symbolic links so we can
just include the mercury/java directory in our CLASSPATH.
mercury/java/library/assoc_list.java:
mercury/java/library/bool.java:
mercury/java/library/builtin.java:
mercury/java/library/deconstruct.java:
mercury/java/library/enum.java:
mercury/java/library/integer.java:
mercury/java/library/io.java:
mercury/java/library/list.java:
mercury/java/library/map.java:
mercury/java/library/mer_int.java:
mercury/java/library/mr_char.java:
mercury/java/library/mr_float.java:
mercury/java/library/mr_int.java:
mercury/java/library/ops.java:
mercury/java/library/private_builtin.java:
mercury/java/library/require.java:
mercury/java/library/set.java:
mercury/java/library/std_util.java:
mercury/java/library/string.java:
mercury/java/library/term.java:
mercury/java/library/time.java:
mercury/java/library/tree234.java:
mercury/java/library/type_desc.java:
These are partial Java versions of mercury library modules. They are
very rough but will currently allow for most of the tests/benchmark
directory to run in Java.