Commit Graph

3 Commits

Author SHA1 Message Date
Peter Wang
1b648d0ac2 Put all Mercury-generated Java classes into the package `jmercury' and
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.
2009-06-17 07:48:16 +00:00
Julien Fischer
68a2800d8c Get configure to add a comment to Constants.java and Native.java
Estimated hours taken: 0.1
Branches: main

Get configure to add a comment to Constants.java and Native.java
saying that they are automatically generated.

Update the java/runtime/.cvsignore.

java/runtime/Constants.java.in:
java/runtime/Native.java.in:
	Get configure to add a comment saying that these files
	are automatically generated.

java/runtime/.cvsignore:
	Ignore the automatically generated file Native.java.
2004-02-11 04:40:07 +00:00
James Goddard
0ead7626cd Implement library version for Java.
Estimated hours taken: 2
Branches: main

Implement library version for Java.

library/library.m:
	Implement library__version in Java.

java/runtime/Constants.java.in:
	File from which Constants.java is to be generated, which is the source
	for a class to hold mercury-related constants, such as the library
	version.

configure.in:
	Added java/runtime/Constants.java to the list of files to generate.
2004-01-20 23:02:24 +00:00