From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69017 invoked by alias); 28 Dec 2016 00:48:22 -0000 Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org Received: (qmail 68979 invoked by uid 89); 28 Dec 2016 00:48:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.8 required=5.0 tests=BAYES_80,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_PASS,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 spammy=San, West, incredible, camera X-Spam-User: qpsmtpd, 2 recipients X-HELO: ainaz.pair.com Received: from ainaz.pair.com (HELO ainaz.pair.com) (209.68.2.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Dec 2016 00:48:04 +0000 Received: from [10.50.50.90] (unknown [190.4.72.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ainaz.pair.com (Postfix) with ESMTPSA id 17DB93F531; Tue, 27 Dec 2016 19:47:10 -0500 (EST) Date: Wed, 28 Dec 2016 00:48:00 -0000 From: Gerald Pfeifer To: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org Subject: Re: [wwwdocs] Remove Java In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2016-q4/txt/msg00042.txt.bz2 On Mon, 5 Dec 2016, Gerald Pfeifer wrote: > Applied now, and more changes to follow later. Applied. Gerald Remove further GCJ related pages, including how to use GCJ, how to contribute, how to debug it, references to docs and projects done with it, and open projects. Index: java/compile.html =================================================================== RCS file: java/compile.html diff -N java/compile.html --- java/compile.html 31 Oct 2002 14:47:43 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,168 +0,0 @@ - - - -Compiling with GCJ - - - - -

Compiling with GCJ

- -

Introduction

- -

GCJ works in three ways: First GCJ can take .java files as - input and compile architecture-specific object files. Second, by - using the -C option, GCJ can take .java files as input, and - generate .class files. Third, GCJ can take .class files as input - to create architecture-specific object files.

- -

GCJ offers two run-time support libraries, libgcj and libgcjgc. - libgcj is a clean-room implementation of the core Java - libraries. libgcjgc is the garbage collector, which is - responsible for automatic memory management. This collector is - based on the Boehm-Weiser conservative collector, but it scans - Java objects precisely and has changes to work with the - cooperative threads-package. It uses a basic mark-sweep - algorithm to perform the actual collections, stopping all - threads as it works.

- -

Compiling Java Programs

- -

If you are working with Java, we recommend you use the gcj program -instead of using GCC directly.

- -

Java-specific file extensions

- -

GCJ (GNU Compiler for Java) deals with the following Java-specific -file extensions, and you can specify any of these as an input file:

- -
-
.java
-
A source file in the Java language, consisting of one or more class - definitions.
- -
.class
-
A binary file containing bytecode instructions and information -pertaining to a single class. It can be loaded into and executed by a -Java Virtual Machine. Compiling a .java source file results in one or -more .class files, one for each class definition in the source -file. The .class file format was designed as a portable and secure -representation of Java classes, but there also exist tools for -compiling program written in other languages (such as Ada, Scheme, and -ML) into .class files.
- -
.zip
-
The .zip file format is a file archival and compression format popular -in the PC world. In the Java world it is mainly used to bundle a -collection of .class files. When specified on the gcj command line, -gcj compiles all the .class files in the .zip archive. The result is a -single assembly file, object file, or executable, depending on the -options you specify.
- -
.jar
-
A .jar (Java ARchive) file is in .zip format, but following -certainly extra conventions. (Certain extra files should also be -included.) GCJ treats it the same as a .zip file.
- -
- -

GCJ command-line options

- -

In addition to the normal GCC options, GCJ recognizes the following -options:

- -
-
-C
-
The input file(s) must all be .java source files. They are compiled -into portable .class files. No machine code (.o files or executable) -is generated.
- -
--output-class-dir=OUTPUTDIR
-
When used with -C, specifies which directory the generated .class -should be written to. A class A.B (whose input file is usually -A/B.java) would be written to OUTPUTDIR/A/B.class.
- -
-d OUTPUTDIR
-
Synonym for --output-class-directory, for compatibility with Suns -javac.
- -
--bounds-check
-
When compiling to machine code, emit instructions to check that array -indexes are within bounds, and to throw an exception if they are -not. This is the default.
- -
--no-bounds-check
-
When compiling to machine code, do not emit instructions to check that -array indexes are within bounds.
- -
-M
-
-MM
-
-MD
-
-MMD
-
These options work as with the C compiler. For GCJs purposes, a system -header is any .zip file installed as part of the compiler system.
- -
--main=CLASSNAME
-
When linking an application, generate a stub so the application starts -executing with the main method of the class named. (This option is -ignored if you are only compiling and not linking.)
- -
- -

Path searching options

- -

At compile time, GCJ uses a list of paths to search for classes and -packages that it needs to find. This list is called the -classpath. Each element of the classpath can be either a directory or -the name of a .zip or .jar file. In the latter case, GCJ searches the -contents of the file for the required information. GCJ has a built-in -classpath, which includes the directory ., and the system libgcj.zip -file, which holds classes from the standard Java class libraries, such -as java.lang. There are several ways to set or augment the -classpath.

- -
-
-I directory
-
A directory (or file) specified using -I are prepended to the -classpath. -I options are never overridden by the other options listed -below.
- -
--classpath=path
-
-classpath path
-
If specified, the option to --classpath (or -classpath; the two -spellings are synonymous) overrides the built-in classpath, and -suppresses recognition of --CLASSPATH and the CLASSPATH environment -variable.
- -
--CLASSPATH=path --CLASSPATH path
-
If specified, the option to --CLASSPATH (or -CLASSPATH; the two -spellings are synonymous) is appended to the built-in classpath, but -suppresses recognition of the CLASSPATH environment variable.
- -
CLASSPATH
-
The CLASSPATH environment-variable can be set to a path. This path is -appended to the compiler-supplied default path. In the above, a path -is a colon-separated (on Windows, semicolon-separated) list of -directories or file names.
- -
- - -

Here are some other points worth noting:

- -
    -
  • If there is no -g or -O option (and no options starting with those - letters), the default is -g1. This is different from gcc, where the - default is -g0. Making -g1 the default causes line number - information to be generated, but not the other information necessary - for source-level debugging. The reason for this change is partly for - compatibility with Sun's tools, and partly because it is helpful - when printing an exceptions stack trace.
  • - -
  • When an application is linked, gcj will also link in the standard - Java run-time libraries (libgcj, and possibly others).
  • -
- - - Index: java/contrib.html =================================================================== RCS file: java/contrib.html diff -N java/contrib.html --- java/contrib.html 28 Jun 2014 11:59:44 -0000 1.38 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,77 +0,0 @@ - - - -GCJ - Contributing - - - - -

Contributing to the GCJ Project

- -

The main GCC contribute page contains -general information; below you will find GCJ-specific details.

- - -

Project Ideas

- -

We've started maintaining a list of useful -projects.

- - -

Coding Standards

- -

We follow the GCC Coding - Conventions with some extrapolations concerning Java programming - style:

- -
    -
  • Open braces go on a new line (like GNU C style).
  • - -
  • Two space indent for methods and inner classes
  • - -
  • if, for, try, and - synchronized blocks are indented four spaces (two for - the braces, and an additional two for the code).
  • - -
  • The open brace for a method body is indented only as far as the - method header.
  • -
- - -

Submitting Patches

- -

Send libgcj patches to java-patches@gcc.gnu.org. - This list is archived.

- -

Patches to the GCJ front end — the gcc/java - directory — should be sent to the gcc-patches list.

- - -

Testing

- -

We're accepting test case patches.

- -
    -
  • Put the .java file in - libjava/testsuite/libjava.compile - (if it is an expected compiler failure or other compile-time test -- - run-time tests usually go in libjava.lang)
  • - -
  • If the file is "foo.java" make a "foo.xfail" file. - For an expected failure the only thing in there should be - "shouldfail"
  • - -
  • If the test case matches a Java PR, it is customary to name it after - the PR number.
  • - -
  • Send the patch to java-patches and then commit of you're allowed to.
  • -
- -

More detailed documentation on how to run tests is -included in the GCC installation notes.

- - - Index: java/docs.html =================================================================== RCS file: java/docs.html diff -N java/docs.html --- java/docs.html 28 Jun 2014 07:45:14 -0000 1.28 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,113 +0,0 @@ - - - -GCJ - Documentation - - - - -

GCJ Documentation

- -

General documentation

- - - - -

Porting the GCJ runtime

- -

We've written three documents on how to port various components of -GCJ runtime, libgcj, to different target systems.

- -
    -
  • How to port the thread layer.
  • -
  • How to port the file handling layer.
  • -
  • How to port the signal handling layer.
  • -
- - -

Papers describing our work

- -

The engineers on this project have written a number of papers for -conferences and magazines.

- - - - - Index: java/done.html =================================================================== RCS file: java/done.html diff -N java/done.html --- java/done.html 28 May 2016 13:08:42 -0000 1.55 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,281 +0,0 @@ - - - -Done with GCJ - - - - -

Done with GCJ

- -

This page provides descriptions and links on projects - that are using the GCJ runtime and compiler. If you would like - your project to be listed here or know about a particular - project, please write to the java@gcc.gnu.org list.

- -

Entries are listed in chronological order.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ProjectDescriptionContact
iRATE radioiRATE radio is a popular - client/server mp3 player/downloader featuring collaborative filtering: - you rate the tracks and it uses your ratings and other people's to guess - what you'll like. iRATE uses GCJ together with the SWT toolkit to provide - native binaries on multiple platforms, including Windows and GNU/Linux. - iRATE has thousands of users, many of which use iRATE daily, making it - perhaps the most widely distributed GCJ-compiled program to date. - - Taras -
XWTXWT is the XML Windowing Toolkit. It lets you write remote - applications -- applications that run on a server, yet can - "project" their user interface onto any computer, anywhere on - the Internet. When built with gcj, it calls directly into the - host's graphic routines and can be turned into, for example, - an ActiveX control. - - Adam Megacz -
Autonomous HaulageModular Mining System is using gcj on an embedded - StrongARM processor to control autonomous trucks in mining haulage - systems. Note that they're not using libgcj, but rather an - in-house runtime that they wrote. -
jUSB/jPhotojUSB is an open source Java API for USB, with an - implementation that runs on recent GNU/Linux OS - distributions. - - jPhoto provides basic command line and library support for - the digital camera protocol on top of jUSB. The protocol is the - new USB standard for talking to such devices called PTP. - - David Brownell -
PALPAL is a Java library for use in molecular evolution and - phylogenetics. Basically, PAL includes classes and - methods for computationally intensive statistics that are - useful for the analysis of DNA sequences.
- - PAL 1.0 consists of 111 classes in 12 packages with more than - 20,000 lines of code, all of which compiles nicely into native - code using GCJ. -
- Korbinian Strimmer -
SwarmSwarm is a fine-grained distributed discrete event - simulator. Swarm is mainly used for agent-based - (bottom-up) modeling. Swarm is not written in Java, but - it has a JNI layer. It was done with JNI at first for - portability. And, since the simulator is not implemented - in C++, it wasn't expected to see major benefits from CNI... - - The tested configuration relies on Kaffe as equipped - with gcj support. On Intel Debian 2.2, up to 30% - performance gains over Kaffe's jit3 were witnessed. - - Marcus G. Daniel. -
- TamanoirTamanoir system is a complete framework that allows users - to easily deploy and maintain distributed active routers - on wide area networks. In the rapidly expanding field of - active and programmable networks, Tamanoir is designed - around a new kind of architecture dedicated to high - performance active networking. Its implementation features - a multi-threading approach to combine performance and - portability of services. It's written in Java and - standardly built using gcj. - Jean Patrick Gelas -
Fluid DynamicsAlejandro Rodríguez Gallego, at ICAI University (Spain) - has spent two years developing a Java program to solve - fluid dynamics. He says: - - - I have recently tested my program with GCJ and I have got - an incredible performance increase over HotSpot v2 (JDK 1.3 for - linux). -50% RAM were needed and execution time reduced in -15%. -
- GCJ will be the main compiler for my program. -
-
rhugAnthony Green and friends have set up rhug, a collection - of free software Java packages set up to build with gcj. - Both sources and RPMs are available. - Anthony Green -
WebMielChristophe Roux has been working on software for - community communications over http. This program, - WebMiel, uses Tomcat and has been working with gcj since - mid-2002. The documentation is in French. - Christophe Roux -
Freestyler ToolkitThe Freestyler Toolkit facilitates building with GCJ. - It focuses on simplifying the construction of - SWT Graphical User Interfaces and - XmlRpc servants that sit before MySQL database - backends. - Erik Poupaert -
Rimfaxe Web ServerRimfaxe is a web server featuring compilation of jsp pages - to .so libraries with gcj, SEDA-based architecture with - non-blocking I/O, servlet 2.3 / JSP 1.2 implementation - including filters and taglibs, and caching of static content. - Lars Andersen
JGachineJGachine is a networked game engine for 2D multi-player - (networked) games. JGachine is written in Java and C++. The - games themselves are written in pure Java and can be loaded - via network. - Jens Thiele
pdftk

If PDF is electronic paper, then pdftk is an electronic - staple-remover, hole-punch, binder, secret-decoder-ring, and - X-Ray-glasses. Pdftk is a useful tool for handling PDF - documents. Every PDF user should have one in the top drawer - of his/her desktop.

- -

Pdftk is also an example of how to use a library of Java - classes in a stand-alone C++ program. Specifically, it - demonstrates how GCJ and CNI allows C++ code to use - iText's (itext-paulo) Java classes.

-
Sid Steward
gcjwebplugingcjwebplugin is a web browser plugin to execute Java (tm) applets. - It supports Firefox, Galeon, Mozilla, Opera and many more browsers. - Michael Koch
H2 Database EngineH2 is a Java database engine. Apart from the usual features such as -SQL, transactions, JDBC API, referential integrity, the database also -supports clustering, views, subqueries, encryption, trigger and stored -procedures. As HSQLDB, database can be operated in the embedded and -server mode, with data kept in-memory or on disk. It is available as a -native executable (using GCJ) and as a Java library. - H2 maintainers
- - - Index: java/gcj2.html =================================================================== RCS file: java/gcj2.html diff -N java/gcj2.html --- java/gcj2.html 30 Jun 2014 09:20:15 -0000 1.11 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,97 +0,0 @@ - - - -The GCJ home page - - - - -

The GCJ home page

- -

What is it?

- -

We've written a front end to the GCC compiler which can natively -compile both Javatm source and -bytecode files. The compiler can also generate class files. This new -front end is integrated into GCC.

- - -

What you get

- -

The currently available code consists of several programs:

- -
- -
gcj
-
- A front end to gcc which is able to read Java ``.class'' files and - generate assembly code. gcj is also a convenient front end to - jvgenmain. Finally, gcj can read ``.java'' files and generate - assembly code or Java bytecode. -
- -
jvgenmain
-
- A small program to generate an appropriate ``main'' for a Java class. -
- -
gcjh
-
- A program to generate C++ header files corresponding to Java - .class files. -
- -
jcf-dump
-
- Reads a ``.class'' file and prints out all sorts of useful - information. -
- -
jv-scan
-
- Reads a ``.java'' file and prints some useful information. - For instance, it can tell you which classes are defined in that file. -
- -
- -

Making executables

- -

In order to make full executables, you'll need to link the - output of gcj with the appropriate runtime code. See the libgcj page for details on the runtime.

- -

There are also more detailed - instructions on compiling Java programs.

- -

How to get it

- -

The new Java front end is very easy to download and install. Since -it is it fully integrated into GCC, you can simply follow the -GCC download and build instructions. -Note that you'll want to configure GCC to use the -appropriate threads system; see the libgcj page for details.

- -

How to try it

- -

Once you've downloaded and installed gcj and libgcj, it is very -easy to try a small Java program of your own:

-
-	gcj --main=HelloWorld -o HelloWorld HelloWorld.java
-	./HelloWorld
-      
- - -

Return to main page

-
- -
- Java and all Java-based marks are trademarks or - registered trademarks of Sun Microsystems, Inc. in the United States - and other countries. The Free Software Foundation, Cygnus Solutions, - and Red Hat are independent of Sun Microsystems, Inc. -
- - - Index: java/gdb.html =================================================================== RCS file: java/gdb.html diff -N java/gdb.html --- java/gdb.html 25 Mar 2002 20:50:21 -0000 1.7 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,159 +0,0 @@ - - -Java Debugging with gdb - - - -

Java Debugging with gdb

- -

-It is possible to debug Java programs compiled with GCJ using GDB. -To do this, you need a recent version of GDB. A CVS snapshot version of GDB -is recommended: GDB 5.0 and earlier are not able to demangle the symbol names -generated by GCC 3.x's new C++/Java ABI. Alternatively, it should also be -possible to rebuild GDB 5.0 with an updated libiberty directory. GDB 5.1 will -include support for the new ABI. -

- -

-When debugging GCJ-compiled Java programs, you may need to -tell GDB to ignore the SIGPWR and SIGXCPU signals -(which are used by the garbage collector). This can be done with the -GDB commands: -

-
- -handle SIGPWR nostop noprint
-handle SIGXCPU nostop noprint
-
-
-

-Alternately you can place these two lines in the file .gdbinit -in $HOME or the directory where you're running GDB. -

- -

-Remember that some optimizations performed by the compiler can make debugging -results unpredictable. When debugging libgcj itself, it is often useful to -build a non-optimized library by using `make GCJFLAGS="-g"'. -

- -

-Here is an example of debugging a simple test program (which uses multiple -Java threads) in GDB: -

- -
- -$ javac TestT.java
-$ gcj -g --main=TestT -o TestT TestT.class
-$ gdb TestT
-GNU gdb 4.18
-Copyright 1998 Free Software Foundation, Inc.
-GDB is free software, covered by the GNU General Public License, and you are
-welcome to change it and/or distribute copies of it under certain conditions.
-Type "show copying" to see the conditions.
-There is absolutely no warranty for GDB. Type "show warranty" for details.
-This GDB was configured as "i386-redhat-linux"...
-(gdb) handle SIGPWR nostop noprint
-
-
-
-Signal        Stop      Print   Pass to program Description
-SIGPWR        No        No      Yes             Power fail/restart
-
-
- -(gdb) handle SIGXCPU nostop noprint
-
-
-
-Signal        Stop      Print   Pass to program Description
-SIGXCPU       No        No      Yes             CPU time limit exceeded
-
-
- -(gdb) break TestT.main
-Breakpoint 1 at 0x8049fa2: file TestT.java, line 64.
-(gdb) run
-
-
-
-Starting program: /disks/now/grad/mdw/src/ninja/test/mdw/TestT 
-[New Thread 16843 (manager thread)]
-[New Thread 16835 (initial thread)]
-[New Thread 16844]
-[Switching to Thread 16844]
-
-Breakpoint 1, TestT.main (args=@806cff0) at TestT.java:64
-64          TestT a1 = new TestT(1,false);
-
-
- -(gdb) where
-
-
-
-(gdb) where 
-#0  TestT.main (args=@806cff0) at TestT.java:64
-#1  0x4011033a in java::lang::FirstThread::run (this=@8064f90)
-    at /home/cs/mdw/disks/enclave1/libgcj-991104/libjava/java/lang/natFirstThread.cc:52
-#2  0x400ccdfa in java.lang.Thread.run_ (this=@8064f90)
-    at /home/cs/mdw/disks/enclave1/libgcj-991104/libjava/java/lang/Thread.java:119
-#3  0x4011554a in java::lang::Thread::run__ (obj=@8064f90)
-    at /home/cs/mdw/disks/enclave1/libgcj-991104/libjava/java/lang/natThread.cc:286
-#4  0x4012524a in really_start (x=@805fef0)
-    at /home/cs/mdw/disks/enclave1/libgcj-991104/libjava/posix-threads.cc:316
-#5  0x401d7ba6 in GC_start_routine (arg=@807ffe0)
-    at /home/cs/mdw/disks/enclave1/libgcj-991104/boehm-gc/linux_threads.c:533
-#6  0x401eece9 in pthread_start_thread (arg=@bf7ffe7c) at manager.c:204
-
- -

-Note that the stack trace includes both Java code and the native methods -in the libgcj runtime library! -

- -

-You can examine threads using the info threads and -thread commands: -

- -
- -(gdb) info threads
-
-
-
-* 3 Thread 16844  TestT.main (args=@806cff0) at TestT.java:64
-  2 Thread 16835 (initial thread)  0x4022a1bb in __sigsuspend (set=0xbffff4f4)
-    at ../sysdeps/unix/sysv/linux/sigsuspend.c:48
-  1 Thread 16843 (manager thread)  0x402b37d0 in __poll (fds=0x808fef0, 
-    nfds=1, timeout=2000) at ../sysdeps/unix/sysv/linux/poll.c:45
-
-
- -(gdb) thread 2
-
-
-
-[Switching to thread 2 (Thread 16835 (initial thread))]
-#0  0x4022a1bb in __sigsuspend (set=0xbffff4f4)
-    at ../sysdeps/unix/sysv/linux/sigsuspend.c:48
-48      ../sysdeps/unix/sysv/linux/sigsuspend.c: No such file or directory.
-Current language:  auto; currently c
-
-
- -(gdb) - -
- -
-
-Page written by -Matt Welsh -
- - - Index: java/projects.html =================================================================== RCS file: java/projects.html diff -N java/projects.html --- java/projects.html 13 May 2011 10:27:18 -0000 1.35 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,148 +0,0 @@ - - -The GCJ Projects List - - - - -

The GCJ Projects List

- -

-What follows is a list of projects that the GCJ community would love -to see someone pick up and run with. If you're interested in any of -these, be sure to send a note with your questions, ideas or intentions -to the java -mailing list. Similarly, if you would like to see a project listed -here that isn't, send a patch for this HTML file to the java-patches list. -

- - -

jar support

- -

-Modify gcj to obey the constraints layed out by the jar file -manifest file. -

- - -

Benchmark infrastructure

- -

-Measuring performance is tricky business. We currently do all our -performance measurements in an ad hoc manner. What is needed is some -infrastructure we can use to track performance regressions and -identify opportunities for improvement. -

-

-Bryce McKinlay has put -together a list of some benchmarks that run on GCJ. -Building some infrastructure around these would be incredibly useful. -

- - -

Performance improvements

- -

There are a few concrete performance improvements that we already know -we want:

- -
    -
  • If an object or array is allocated in static code that is - executed at most once (i.e. not in a loop or in a non-private - method), then we have the option of pre-allocating the object - or array in the static data or bss segment. This is most - obviously the right thing to do when the expression is an array - brace initializer whose elements are compile-time constants, since - then we can initialize the array statically. (This is already - implemented.) It also makes sense for array elements that - are initialized to link-time constants, such as references - to other statically allocated objects, as you might get - from a multi-dimensional array brace-initializer. -

    - It may also make sense to pre-allocate a non-array object. - It makes most sense when the object constructor is inlined, - especially if it turns out that most or all of the fields get - initialized to constants. Even if the constructor is not inlined, - it may still make sense to pre-allocate the object if it is - being assigned to a static final field: The tradeoff is that - you save the space needed for the call to allocate the object, but - you use more space if it turns out the class is never initialized. -

    - Note that if a statically allocated object contains - pointer fields then the gc has to know about the object. - The cleanest way is to make sure the object header has - appropriate flags so that the gc recognizes that the object is - static but has pointer fields. There is no need to register the - static object with the gc, since if it is live, it will get - traversed anyway (typically via the fields table of the declaring - class). -

  • -
- - -

Compiler improvements

- -
    -
  • Once we have tree-level inlining, we can use it to - sometimes eliminate unnecessary synchronizations. - Combined with a simple "no escape" flag, this could also - let us further optimize string concatenation without - having to introduce a new class in the runtime.
  • - -
  • When compiling from bytecode, GCJ generates tree nodes - as long as it is within a single "statement" - i.e. no branching - or side effects. However, any branching or other complications - causes RTL to be emitted. This is similar to the historical - way the C and C++ front-ends were implemented. Gcc now has support - for representing an entire method body as a tree node, and g++ - has been converted to do that, because it makes certain - optimizations more practical. Gcj already represents an entire - method body as a single tree structure when compiling from - Java source; we should do the same - when compiling from bytecode. To begin with, we can represent - control flow using GOTO_EXPR. However, if would - be better if we can deduce higher-level structure. I.e. it is - easy to generate - (COND_EXPR TEST (GOTO_EXPR L1) (GOTO_EXPR L2)), but it - would be better though harder to simplify that to a - COND_EXPR that does not use GOTO_EXPR. - The simplification is probably best done after we have generated - a correct but GOTO-based tree representation. - For example, if a label is only used once, we can move its code - to where the unique GOTO is.
  • - -
  • Add hooks to gcj and g++ to generate write barriers. - This would let us write a precise collector.
  • - -
  • Do escape analysis to detect method-local and - thread-local objects. This can yield a significant - performance improvement in some cases.
  • - -
  • Extend the existing null-pointer patch (for PR 2) to - optionally enable it for all method calls and field - dereferences. This will let gcj-compiled code work - correctly on systems without an MMU.
  • - -
  • The structure of expand_byte_code in - expr.c uses macros in a way that in retrospect - looks like a mistake. It should be re-written to be a simple - switch statement based on the structure of - verify_jvm_instructions in verify.c. - (There are actually two switch statements using the magic macros - in expr.c - look for the includes of - "javaop.def". They should both be re-written, but - second one is higher priority.)
  • -
- - -

Runtime improvements

- -
    -
  • Write a program to convert existing locale data into a - format we can use.
  • -
- - - - Index: java/tm.html =================================================================== RCS file: java/tm.html diff -N java/tm.html --- java/tm.html 31 Oct 2002 14:47:43 -0000 1.14 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ - - -GCJ - About - - - -

Java and all Java-based marks are trademarks or registered trademarks -of Sun Microsystems, Inc. in the United States and other countries. -The Free Software Foundation, Cygnus Solutions and Red Hat are -independent of Sun Microsystems, Inc.

- - -