aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog13
-rw-r--r--gcc/java/Make-lang.in14
-rw-r--r--gcc/java/gcj.texi97
3 files changed, 119 insertions, 5 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 724403a..fb30719b 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,5 +1,18 @@
2004-12-06 Tom Tromey <tromey@redhat.com>
+ * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
+ (java.uninstall): Likewise.
+ (java.maintainer-clean): Likewise.
+ (.INTERMEDIATE): Likewise.
+ (java.install-man): Likewise.
+ (gcj-dbtool.pod): New target.
+ * gcj.texi (Code Generation): Document -findirect-dispatch.
+ (libgcj Runtime Properties): Document
+ gnu.gcj.precompiled.db.path.
+ (Top): Link to "Invoking gcj-dbtool".
+
+2004-12-06 Tom Tromey <tromey@redhat.com>
+
PR java/14853:
* java-tree.h (extract_field_decl): Declare.
* parse.y (extract_field_decl): Renamed from
diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in
index 8adcf44..a9c47cf 100644
--- a/gcc/java/Make-lang.in
+++ b/gcc/java/Make-lang.in
@@ -177,7 +177,8 @@ java.srcinfo: doc/gcj.info
dvi:: doc/gcj.dvi
html:: $(htmldir)/java/index.html
JAVA_MANFILES = doc/gcj.1 doc/gcjh.1 doc/jv-scan.1 doc/jcf-dump.1 doc/gij.1 \
- doc/jv-convert.1 doc/grmic.1 doc/grmiregistry.1
+ doc/jv-convert.1 doc/grmic.1 doc/grmiregistry.1 \
+ doc/gcj-dbtool.1
java.man: $(JAVA_MANFILES)
@@ -237,6 +238,7 @@ java.uninstall:
-rm -rf $(DESTDIR)$(man1dir)/jcf-dump$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/gij$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/jv-convert$(man1ext)
+ -rm -rf $(DESTDIR)$(man1dir)/gcj-dbtool$(man1ext)
install-info:: $(DESTDIR)$(infodir)/gcj.info
@@ -261,6 +263,7 @@ java.maintainer-clean:
-rm -f $(docobjdir)/jv-convert.1
-rm -f $(docobjdir)/grmic.1
-rm -f $(docobjdir)/grmiregistry.1
+ -rm -f $(docobjdir)/gcj-dbtool.1
#
# Stage hooks:
# The main makefile has already created stage?/java.
@@ -400,7 +403,7 @@ $(htmldir)/java/index.html: $(TEXI_JAVA_FILES)
$(TEXI2HTML) -I $(docdir)/include -I $(srcdir)/java -o $(@D) $<
.INTERMEDIATE: gcj.pod gcjh.pod jv-scan.pod jcf-dump.pod gij.pod \
- jv-convert.pod grmic.pod grmiregistry.pod
+ jv-convert.pod grmic.pod grmiregistry.pod gcj-dbtool.pod
gcj.pod: java/gcj.texi
-$(TEXI2POD) -D gcj < $< > $@
@@ -418,14 +421,17 @@ grmic.pod: java/gcj.texi
-$(TEXI2POD) -D grmic < $< > $@
grmiregistry.pod: java/gcj.texi
-$(TEXI2POD) -D grmiregistry < $< > $@
+gcj-dbtool.pod: java/gcj.texi
+ -$(TEXI2POD) -D gcj-dbtool < $< > $@
# Install the man pages.
java.install-man: installdirs \
$(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext) \
$(JAVA_TARGET_INDEPENDENT_BIN_TOOLS:%=doc/%.1) \
- doc/gij.1 doc/jv-convert.1 doc/grmic.1 doc/grmiregistry.1
+ doc/gij.1 doc/jv-convert.1 doc/grmic.1 doc/grmiregistry.1 \
+ doc/gcj-dbtool.1
for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS) \
- gij jv-convert grmic grmiregistry ; do \
+ gij jv-convert grmic grmiregistry gcj-dbtool ; do \
tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
rm -f $$man_name ; \
diff --git a/gcc/java/gcj.texi b/gcc/java/gcj.texi
index 370585a..ae9cae7 100644
--- a/gcc/java/gcj.texi
+++ b/gcc/java/gcj.texi
@@ -64,6 +64,8 @@ man page gfdl(7).
* jcf-dump: (gcj)Invoking jcf-dump.
Print information about Java class files
* gij: (gcj)Invoking gij. GNU interpreter for Java bytecode
+* gcj-dbtool: (gcj)Invoking gcj-dbtool.
+ Tool for manipulating class file databases.
* jv-convert: (gcj)Invoking jv-convert.
Convert file from one encoding to another
* grmic: (gcj)Invoking grmic.
@@ -112,8 +114,9 @@ files and object files, and it can read both Java source code and
* Invoking jv-scan:: Print information about source files
* Invoking jcf-dump:: Print information about class files
* Invoking gij:: Interpreting Java bytecodes
+* Invoking gcj-dbtool:: Tool for manipulating class file databases.
* Invoking jv-convert:: Converting from one encoding to another
-* Invoking grmic:: Generate stubs for Remote Method Invocation.
+* Invoking grmic:: Generate stubs for Remote Method Invocation.
* Invoking grmiregistry:: The remote object registry.
* About CNI:: Description of the Compiled Native Interface
* System properties:: Modifying runtime behavior of the libgcj library
@@ -492,6 +495,23 @@ and we don't support any easy way to do that.
So this flag isn't very useful yet, except to partially override
@code{--disable-assertions}.
+@item -findirect-dispatch
+@command{gcj} has a special binary compatibility ABI, which is enabled
+by the @code{-findirect-dispatch} option. In this mode, the code
+generated by @command{gcj} honors the binary compatibility guarantees
+in the Java Language Specification, and the resulting object files do
+not need to be directly linked against their dependencies. Instead,
+all dependencies are looked up at runtime. This allows free mixing of
+interpreted and compiled code.
+
+Note that, at present, @code{-findirect-dispatch} can only be used
+when compiling @file{.class} files. It will not work when compiling
+from source. CNI also does not yet work with the binary compatibility
+ABI. These restrictions will be lifted in some future release.
+
+However, if you compile CNI code with the standard ABI, you can call
+it from code built with the binary compatibility ABI.
+
@end table
@@ -961,6 +981,75 @@ Each time a class is initialized, print a short message on standard error.
@c man end
+@node Invoking gcj-dbtool
+@chapter Invoking gcj-dbtool.
+
+@c man title gcj-dbtool Manipulate class file mapping databases for libgcj
+
+@ignore
+@c man begin SYNOPSIS gcj-dbtool
+gcj-dbtool @option{OPTION} @var{DBFILE} [@option{MORE}] @dots{}
+
+gcj-dbtool [@option{-n}] [@option{-a}] [@option{-t}] [@option{-l}]
+ [@option{-v}] [@option{--version}] [@option{--help}]
+
+@c man end
+@c man begin SEEALSO gij
+gcc(1), gcj(1), gcjh(1), jv-scan(1), jcf-dump(1), gfdl(7),
+and the Info entries for @file{gcj} and @file{gcc}.
+@c man end
+@end ignore
+
+@c man begin DESCRIPTION gcj-dbtool
+
+@code{gcj-dbtool} is a tool for creating and manipulating class file
+mapping databases. @code{libgcj} can use these databases to find a
+shared library corresponding to the bytecode representation of a
+class. This functionality is useful for ahead-of-time compilation of
+a program that has no knowledge of @code{gcj}.
+
+@code{gcj-dbtool} works best if all the jar files added to it are
+compiled using @code{-findirect-dispatch}.
+
+Note that @code{gcj-dbtool} is currently available as ``preview
+technology''. We believe it is a reasonable way to allow
+application-transparent ahead-of-time compilation, but this is an
+unexplored area. We welcome your comments.
+
+@c man end
+
+@c man begin OPTIONS gcj-dbtool
+
+@table @gcctabopt
+@item -n @var{DBFILE} [@var{SIZE}]
+This creates a new database. Currently, databases cannot be resized;
+you can choose a larger initial size if desired. The default size is
+32,749.
+
+@item -a @var{DBFILE} @var{JARFILE} @var{LIB}
+This adds a jar file to the database. For each class file in the jar,
+a cryptographic signature of the bytecode representation of the class
+is recorded in the database. At runtime, a class is looked up by its
+signature and the compiled form of the class is looked for in the
+corresponding shared library.
+
+@item -t @var{DBFILE}
+Test a database.
+
+@item -l @var{DBFILE}
+List the contents of a database.
+
+@item --help
+Print a help message, then exit.
+
+@item --version
+@itemx -v
+Print version information, then exit.
+
+@end table
+
+@c man end
+
@node Invoking jv-convert
@chapter Invoking jv-convert
@@ -2404,6 +2493,12 @@ This is the directory where cached shared library files are
stored. If not set, JIT compilation is disabled. This should never
be set to a directory that is writable by any other user.
+@item gnu.gcj.precompiled.db.path
+This is a sequence of file names, each referring to a file created by
+@command{gcj-dbtool}. These files will be used by @code{libgcj} to
+find shared libraries corresponding to classes that are loaded from
+bytecode.
+
@end table