Java: [ABI]: New verifier

Bryce McKinlay mckinlay@redhat.com
Wed Oct 6 23:22:00 GMT 2004


This patch is an initial attempt at replacing the bytecode verifier in 
the Java front end. I've checked it in to the gcj-abi-2-dev-branch (aka 
BC-ABI branch). The verifier is set up to build, but is not yet enabled. 
This is preliminary code - additional patches to follow. (I'm aware that 
the copyright notices need to be updated, etc).

This verifier is based on the verifier currently in libgcj, which was 
written by Tom Tromey, but converted to C. It would be nicer to keep the 
verifier in C++, but adding C++ code to the front end would require 
major build changes that are unlikely to be acceptable in the GCC 4.0 
timeframe. Also, the requirements of the two verifiers are a little 
different in some cases - for example, the runtime verifier recursively 
loads referenced classes to check things like type compatibility, while 
for the compiler's verifier, we want to assume that types are correct at 
compile time and instead emit a type assertion that is evaluated at 
runtime. Doing this with a shared, generic verifier would be possible, 
but would require quite a bit of code to be moved to the "glue" layer 
between the verifier and its host environment.

Bryce


-------------- next part --------------
A non-text attachment was scrubbed...
Name: java-verifier.patch
Type: text/x-patch
Size: 102470 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20041006/dba85eef/attachment.bin>


More information about the Java-patches mailing list